Puppet in Docker Creating a PuppetDB container

0 votes
Aug 20, 2019 in Puppet by Karan
• 19,610 points
1,255 views

1 answer to this question.

0 votes

We can run a PuppetDB server in a docker container. 

Inorder to run a PuppetDB, we need a Postgres Server running. Docker supports only PostgreSQL server

This too can be another container instance, or RDS (Relational Database Service) end point or a Physical DB somewhere.  

In addition, It requires a Puppet Master running. In order to use SSL certs during the initialization, you will need at least a token puppet master running that the container can connect to initialize the certs.

root@ubuntu:~# git clone https://github.com/tizzo/docker-puppetdb.git
Cloning into 'docker-puppetdb'...
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 12 (delta 3), reused 12 (delta 3), pack-reused 0
Unpacking objects: 100% (12/12), done.
Checking connectivity... done.

root@ubuntu:~# cd docker-puppetdb/

Create a Docker file compatible with Ubuntu 16.04 and then run the docker build.

root@ubuntu:~/docker-puppetdb# docker build .

Once this is completed we can create our PuppetDB container.

root@ubuntu:~# docker run --net puppet --name puppetdb-postgres -e POSTGRES_PASSWORD=puppetdb -e POSTGRES_USER=puppetdb -d postgres
855a6b13fefa4123d5e16cdde84ebc7174ba149e66699e4c94c14e8fbfcac22f

root@ubuntu:~# docker run --net puppet -d -P --name puppetdb --link puppetdb-postgres:postgres puppet/puppetdb
bfe56b64bd980d20570374ed8204136303d82de8cbf1a4279c2f2fd25a798f59

Container is running, we can even confirm its status by with this command, docker ps.

We can access our PuppetDB Dashboard at the URL >>http://Docker-Server-IP:32771.

answered Aug 20, 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,513 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
690 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
670 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,707 views
0 votes
1 answer

Puppet in Docker: How do I query PuppetDB API in a container setup?

PuppetDB exposes a dashboard, showing various operational ...READ MORE

answered Aug 20, 2019 in Puppet by Sirajul
• 59,230 points
1,095 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