Puppet in Docker Building a Puppet environment in docker

0 votes
I want to run puppet on a set of containers (ie), containers as a service. Can somebody please help me in setting up the puppet environment?
Aug 19, 2019 in Puppet by Karan
• 19,610 points
1,306 views

1 answer to this question.

0 votes

You can run your Puppet infrastructure on top of a containers-as-a-service platform. 

This can be accomplished with the puppet/puppetserver image, which will deploy a fully functioning Puppet master:

$ docker run --net puppet --name puppet --hostname puppet puppet/puppetserver
  • The Puppet master is created in a container called puppet on a Docker network named "puppet." 

  • The only piece you really need is docker run puppet/puppetserver, but the other bits allow you to attach your master to a specific network, name the container for easy reuse, and set the hostname so container-based agent nodes can find it.

  • All the open-source components of a stand-alone Puppet infrastructure are available in this same fashion, including Puppet Server, PuppetDB and various dashboards. You can put them all back together as a stack with Docker Compose.

  • You can manually install docker-compose or install it using the docker::compose class.

  • To test the power of Docker Compose, create a docker-compose.yml file.

  • The file describes several container images, including puppetserver, puppetdb-postgres, puppetboard and puppetexplorer. 

  • These last two are browser-based dashboard components that will become accessible when Docker Compose completes.

  • Everything will be pulled, built and booted from a single command executed from the directory where you’ve saved your docker-compose.yml file:

$ docker-compose up

  • This would probably take some time to pull down and install everything into a series of containers, but when it’s done you’ll have a whole environment, which gives you a way to get a very useful test environment in just a couple of minutes. 

  • Instead of setting up number of VM's, you could see how this works at a minute level.

  • You can now experiment with the  combination of Puppet and Docker that gives you new and powerful ways to expand your development environment. 

  • Instead of deploying one Puppet node at a time, you can use simple Docker commands to do the work for you.

answered Aug 19, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Is it possible to install puppet agent in a docker container on linux?

Hey @Janice, this is pretty simple. Create ...READ MORE

answered Mar 12, 2019 in Puppet by Jason
1,516 views
0 votes
1 answer

Puppet in Docker: Running puppet commands inside a docker container.

You can use Puppet commands, such as resource.  The following command ...READ MORE

answered Aug 19, 2019 in Puppet by Sirajul
• 59,230 points
692 views
0 votes
1 answer

Puppet in Docker : How to mount Puppet on a CentOS container?

Run the following command: docker run --volumes-from=puppet-agent centos ...READ MORE

answered Aug 19, 2019 in Puppet by Sirajul
• 59,230 points
673 views
0 votes
1 answer

Puppet in Docker: Can a docker container use Puppet only at Run-time?

Docker provides a solution to this problem ...READ MORE

answered Aug 19, 2019 in Puppet by Sirajul
• 59,230 points
759 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,715 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP