NOTE: this series is a work-in-progress that will be finished in due course. I leave it up here because the code and approach is likely to be nonetheless useful to people engaged in building a similar ELK / Puppet solution.
Introduction
In this second part of our series, ‘Building a highly available ELK solution with Puppet’, we look at our example base profile.
The example is artificially simple, and provides an illustration of the concepts for readers who are new to the roles and profiles pattern, and allows me to make some general points about writing roles and profiles that inform my decisions in subsequent ELK-related posts. Most readers will already have their own base profile, and if not, will probably have requirements that go beyond this contrived example.
If you are already familiar with the roles and profiles pattern, you may want to read the section about the yum configuration, and you may be interested in the firewall_multi module.
As mentioned in part I, the source code is available at Github. It is licensed under the MIT license.
Configuring the Puppetfile
Before we can write the base profile we need to install the Puppet Forge modules that it will depend upon, and to do that, we must set up our Puppetfile. If you have not used a Puppetfile before, have a look at the documentation here.
Why Librarian-puppet
It should be noted that I am using Tim Sharpe’s Librarian-puppet, the original Puppetfile processor and, in my opinion, still the best. Many users will be using r10k both to install modules as specified in Puppetfile, and also to deploy their code into target environments. Meanwhile, Puppet Enterprise users may be using Code Manager, which uses r10k under the hood.
The advantage of Librarian-puppet is that it is simpler, and it resolves dependencies. And if you, like me, intend to deploy your code onto Puppet Masters using the deployment capabilities of your CI/CD system, you may find that Librarian-puppet is still the right choice.
Puppetfile config for base profile
Our base profile requires the following modules:
We therefore add the following lines to our Puppetfile (source code):
forge 'https://forgeapi.puppetlabs.com'
mod 'puppetlabs/stdlib'
mod 'puppetlabs/ntp'
mod 'alexharvey/firewall_multi'
read more
Recent Comments