I am trying to do a basic puppet start.

Latest response

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

OK - I have read thru the discussion and while very informative it is not very helpful. I would like to see an example based upon Satellite 6 and using /etc/motd as a model so that" monkey see monkey do" can be done. I have written the cookbooks for installing Satellite 6 on Redhat 7.0 and the Cookbook for installing VM's on Satellite 6.0 on this discussion forum. Now I want to start using Puppet but what I would like is a cookbook to do what I asked in my question. This seems to be difficult to do. I would think that RedHat documentation group would sit down and figure out the basic things needed to start each part of the Satellite system and put together basic cookbooks so that I don't have to read 6 foot of documents to figure out how to use an expensive product. Satellite is not a cheep product but worth the money spent. I am just trying to avoid spending hours and a lot of putzzing around to get the systems to operate.

Bob

I do not have satellite 6.x yet, we're (I and my various customers) are looking to instantiate it at some point perhaps this year. Hopefully others that have crossed the bridge in the manner you describe in your reply above will chime in.

EDITED again

Robert,

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 ;)

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.