Recently, Puppet added some cool stuff on their Docker hub page. You can now deploy puppetserver, puppetDB, and agents as containers.

Why is this ultracool? Well, I can now bind an awesome container OS like CoreOS to my Puppet Enterprise master and config manage it! That is exactly the super hip thing we are going to do in this blog post.

Installing CoreOS is beyond the scope of this post and there are a lot of good guides out there on the subject. For some guidance, check this doc.

My installation has 3 nodes: coreos01.puppet.xuxo, coreos02.puppet.xuxo, coreos03.puppet.xuxo. So….Let’s begin! As usual, I promise this to be super simple.


Login to each coreOS instance and perform this step:

docker run -v /tmp:/tmp -v /etc:/etc -v /var:/var -v /usr:/usr -v /lib64 /lib64 -d --net=host puppet/puppet-agent-debian agent --verbose --no-daemonize --logdest=console --server=your-master-fqdn --environment=production --summarize

On this command I am using the –net=host argument to use the underlying network and name resolution on the OS. Adjust accordingly.

Wait a minute or two and you will see your coreOS hosts in the Puppet Console. It will also gather facts for the OS and report them:


Finally, we can apply changes to the OS as you are used to with Puppet. As an example, we can modify (or create) /etc/resolv.conf:


Told you it was simple!

This new technique of putting the Puppet agent in a container creates a whole new way of managing newer infrastructures and OSes.

Please visit Gareth Rushgrove examples’ repo for more Puppet Docker fun.

Thanks for reading this post.


2 thoughts on “Puppet + CoreOS: A super quick guide!

    1. Oh you could totally do that. As an added one, you can also have Kubernetes deploy a container named registrator and publish it all to Consul! I have not taken the time to install Kube in my Infra but I will make a part 2 to this post when I do. Thanks so much for the note!

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s