I am trying to do a basic puppet start.
Does anyone have instructions on how to setup an initial puppet setup using the file /etc/motd as an example of how to build and control an file on a target machine using puppet from Satellite 6.0?
Bob
Responses
Robert, see this Red Hat Discussion at this URL: https://access.redhat.com/discussions/735323. Robert, make special note of PixelDrift's comments. He seems rather brilliant with the use of puppet
EDITED again
Robert,
- This will not satiate your full request, but see this one small example by PixelDrift at this Red Hat Discussion https://access.redhat.com/discussions/1326783.
- By the way, the replies given here are mostly from non-Red Hat community members such as myself, but Red-Hatters do chime in to discussion as well.
- Another example (for puppet on Satellite 6) not from a Red Hat website is here
- another example with apparent Satellite-6 puppet possibilities is at this non-Red Hat URL (Puppet Labs)
- Also, see this link (likely six foot long) documentation that the Red Hat person named xixi mentioned on the original link I replied to that will not be an immediate answer either...
There seems to be some activity regarding puppet on satellite 6.x on Puppet Labs discussion area. I know for many things I've had to implement, it was also a product of reading (as you described) six feet of documentation and trial/error/experimentation and finally success.
Good luck
Hi Robert,
I also unfortunately don't have access to Satellite 6 currently, but I did have Katello deployed at one stage (broke it recently). I assume the basic process of adding a Puppet module to Satellite 6 is the same.
1. Create a puppet module/class
2. Drop the puppet manifests into a specific location on the Satellite server
3. From Satellite it will search the local directory and provide a list of classes you can 'import'
4. Apply the module/class to the nodes you want
The manifest can start in a very basic form and include the motd file contents inline (to avoid external references to files/templates), something like:
class motd {
file { '/etc/motd':
owner => 'root',
group => 'root',
mode => 0644,
content => "Satellite 6 Puppet deployment is working",
}
}
I realise this isn't the level of detail you are looking for.. I will try and resurrect my Katello box and see if I can be more helpful with the steps for importing/configuring!
-edit-
Finally got another Katello installation up and running, the documentation for Puppet integration seems scarce if you are rolling your own modules etc.
The steps I have used to get the above module added to Katello/Foreman (no idea if they change the structure in Satellite 6)
1. Configure -> Environments
Create a new Puppet environment which will be used to house configs (eg. robert_test). One example use for this is having multiple environments (eg. build, dev, test, prod) so you can push the Puppet configuration through the environments. Ideally your puppet configuration should be stored on a git server and checked out using a CI process from your git server.
2. You will now need to make a module directory on the filesystem in your new environment. This directory must have a specific structure (following standard Puppet module configuration), in this example the structure is being created for demonstration purposes).
Via ssh:
mkdir -p /etc/puppet/environments/robert_test/modules/motd/manifests
The Puppet module structure is described here:
https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html
3. Now add an init.pp file to your module which is essentially an entry point for the module. The class name defined in init.pp should match the module name (explained in Puppet link above). In this example they are both 'motd'. This is the absolute minimum you need for a module, a module would usually include more components/classes.
vi /etc/puppet/environments/robert_test/modules/motd/manifests/init.pp
Paste in the example class I have included above and save the init.pp file.
4. Back in the web interface select 'Configure -> Puppet Classes', then click the 'Import from sat.hostname.here' button. If your module has been picked up correctly you should see it listed with the option to select it and click 'Update'.
Disclaimer: I am not sure how close this is to Satellite 6, or if Red Hat have specific suggestions around managing environment/classes. This just details getting your custom Puppet module/code into Katello/Foreman, and may not be how Red Hat want you to do it ;)
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
