Over the next several days I will be creating a series of posts that describe how I am using Puppet. I wrote previously about why puppet sucks and further about how I'd rather being using chef, but alas, I am using puppet and it does get the job done.
The reason I am posting now is that I finally feel that I have a handle on how to effectively lay out configuration files and manage machines with puppet now. I hope that this information is useful to someone.
The first thing that you need to keep in mind is separate your configs as much as makes sense. For example, every service should have it's own config file. Here is my /etc/puppet heirarchy:
This may seem a bit chicken before the egg as it doesn't describe how to effectively use any of these files, but I'll post again shortly with an example nodes.pp and base.pp to help defining what a base class looks like.
The reason I am posting now is that I finally feel that I have a handle on how to effectively lay out configuration files and manage machines with puppet now. I hope that this information is useful to someone.
The first thing that you need to keep in mind is separate your configs as much as makes sense. For example, every service should have it's own config file. Here is my /etc/puppet heirarchy:
/etc/puppet/ /etc/puppet/puppet.conf /etc/puppet/fileserver.conf /etc/puppet/autosign.conf /etc/puppet/manifests /etc/puppet/manifests/users /etc/puppet/manifests/users/virt_systems_users.pp /etc/puppet/manifests/users/jlitton.pp /etc/puppet/manifests/users/dmartin.pp /etc/puppet/manifests/users/virt_dev_users.pp /etc/puppet/manifests/users/developer.pp /etc/puppet/manifests/users/virt_developer_user.pp /etc/puppet/manifests/users/bmatheny.pp /etc/puppet/manifests/groups /etc/puppet/manifests/groups/develper.pp /etc/puppet/manifests/groups/virt_wheel_group.pp /etc/puppet/manifests/nodes.pp /etc/puppet/manifests/services /etc/puppet/manifests/services/varnish.pp /etc/puppet/manifests/services/blog.pp /etc/puppet/manifests/services/lvs.pp /etc/puppet/manifests/services/sql.pp /etc/puppet/manifests/services/presentation.pp /etc/puppet/manifests/services/services.pp /etc/puppet/manifests/services/xen.pp /etc/puppet/manifests/services/daemon /etc/puppet/manifests/services/daemon/postfix.pp /etc/puppet/manifests/services/daemon/bacula-server.pp /etc/puppet/manifests/services/daemon/apache.pp /etc/puppet/manifests/services/daemon/mon.pp /etc/puppet/manifests/services/daemon/nfs.pp /etc/puppet/manifests/services/daemon/logrotate.pp /etc/puppet/manifests/services/daemon/ssh.pp /etc/puppet/manifests/services/daemon/bacula-client.pp /etc/puppet/manifests/services/daemon/ntp.pp /etc/puppet/manifests/services/daemon/stunnel.pp /etc/puppet/manifests/services/daemon/syslog-ng.pp /etc/puppet/manifests/services/daemon/ampstack.pp /etc/puppet/manifests/services/daemon/yum.pp /etc/puppet/manifests/services/daemon/snmp.pp /etc/puppet/manifests/services/daemon/named.pp /etc/puppet/manifests/services/daemon/memcache.pp /etc/puppet/manifests/services/daemon/tftpd.pp /etc/puppet/manifests/services/daemon/heartbeat.pp /etc/puppet/manifests/services/daemon/dhcp.pp /etc/puppet/manifests/services/daemon/mysql.pp /etc/puppet/manifests/site.pp /etc/puppet/manifests/os /etc/puppet/manifests/os/redhat.pp /etc/puppet/manifests/environments /etc/puppet/manifests/environments/development.pp /etc/puppet/manifests/environments/test.pp /etc/puppet/manifests/environments/production.pp /etc/puppet/manifests/templates /etc/puppet/manifests/templates/base.pp /etc/puppet/manifests/templates/xenguest.ppAdmittedly this could use some cleanup, but the point is if you are going to manage any significant number of machines, you need to start defining services from the beginning.
This may seem a bit chicken before the egg as it doesn't describe how to effectively use any of these files, but I'll post again shortly with an example nodes.pp and base.pp to help defining what a base class looks like.































Comments for Puppet Revisited
Leave a comment