As part of our latest Puppet Enterprise release, 2016.2, we included some examples and items that are really helpful for those shops using ,or moving towards, Docker container technology. Now you are able to run Puppet Server and Puppet agents as containers.

Puppet has released several containers to the Docker hub. This write-up will use one of them, the agent-in-container. Go browse our docker hub to find things you might be able to use in your infrastructure.

In this post, I will use one container and apply it to CoreOS to get it registered to my Puppet Enterprise master.

For this exercise, I have a 3-node CoreOS cluster running on our OpenStack on-prem cloud. Let’s begin! I promise it to be super simple.

Let’s login to my CoreOS 1st instance and run the following command:

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=master.puppet.xuxo --environment=production --summarize

–server will be the hostname of your PE master.

Repeat the step in instance 2 and 3.

Wait some seconds and go to the PE Master console, click on your CoreOS nodes:

coreos

Now you can leverage facts and start working with CoreOS. Really…that’s it!

 

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s