Pages

Monday, January 26, 2015

Red Hat Satellite 6 - Puppet, What the Hell do I do Now?

One of my major issues with Satellite 6 has been centralized configuration management.  In fact, not having configuration management working correctly is the major reason why my production systems are still using 5.7.

All the documentation I have found talks about what puppet is, where to get modules and how to get the modules into a content view. That's great.  After I get a module added to a content view, what then?  How do I actually make it do something?

After much Internet research, I have finally made the ntp puppet module actually configure something on a remote server through Satellite 6.  Here is what I did:

This document assumes you have already downloaded the ntp puppet module from the puppet forge (https://forge.puppetlabs.com/puppetlabs/ntp), uploaded it to a custom repository and published to a content view the server is subscribed to. Pretty much everything the official documentation has you do, besides actually doing something with it.

Configuring the ntpd pool server using the puppet module in Satellite 6.

  1. Sign into Satellite
  2. Click on Configure > Puppet classes
  3. Click on the ntp class name. (If there is nothing on this screen, you didn't do something correctly)
  4. Click on the Smart Class Parameter tab
  5. This screen shows all the available classes which can be set for this puppet module. 
  6. I want to make sure ntp is installed, is running and has my pool servers.
  7. Scroll down to "package ensure" and click on it.
  8. Check the box next to "Override." Set "Parameter type" to string. In "Default Value", type latest
  9. Scroll down to "servers" and click on it.
  10. Click the "Override" check box
  11. Set "Paramater type" to "array"
  12. In "Default value" type in a comma separated list of your ntp pool servers as follows:
    1. ["ntp1.example.com","ntp2.example.com"]
  13. Scroll to "service enable" and click on it
  14. Check the "Override" box
  15. Change "Parameter type" to "boolean"
  16. Type "true" into default value
  17. Scroll all the way down to the bottom of the page and press submit.
  18. Browse to Hosts > All Hosts
  19. Click on the server
  20. Click on Edit
  21. Click on Puppet Classes
  22. Expand the ntp class, click on ntp. ntp should show up under the "Included classes" area. Do not select any of the other things. I'm still looking into what those do.
  23. Click submit
  24. Click on the YAML button, this will show you exactly what is being passed to the puppet agent. You should see your additional configuration settings listed
  25. Click back
  26. Go onto the console of the server and run "puppet agent -tv" as root.  If everything is correct, your /etc/ntp.conf file should now have your servers in there. 
  27. I uninstalled the ntpd package and ran puppet, it installed the service, started it and setup my configuration file.
  28. Success!



5 comments:

Biju Joseph said...

Thank you for the post.

waldizzo said...

Hopefully it was helpful. Sadly, I've ran into what looks like a bug where the the puppet agent can no longer get the catalog from the puppet master. I have opened up a case with RH Support.

Unknown said...

You probably want to create a host group (or multiple) and assign the puppet classes to it. Host groups can be nested for easier management. Then you can assign the correct environment and host group to the hosts. This should make it easier to manage a large number of servers.

Also, you can tie your puppet classes into content views. This allows for promotion to the different environments which can be useful for make changes to a puppet module and rolling it out in a controlled fashion.

waldizzo said...

Thanks for the suggestions, Adam. Those are good ideas and I will implement puppet classes in that way.

Unknown said...

I am looking for guidance to setup satellite 6 and a separate puppet master and utilize this to periodic patching of Linux servers in my environment. Can you please guide me?