Puppet in Docker: Configuring Puppet containers using Docker compose.

0 votes
I want to launch a stack consisting of Puppet Server, PuppetDB, a PostgresDB container for PuppetDB and the open source dashboards Puppetboard and Puppet Explorer in Docker containers.

I heard this could be easily done using docker-compose. How can i do this using docker-compose?

Should i specify all these configurations in the docker-compose.yaml file?

somebody please help!
Aug 20 in Puppet by Sam
• 4,320 points
81 views

1 answer to this question.

0 votes

Using Docker compose you can define a set of containers, along with their relationships, in a YAML file. And then use the docker-compose CLI to launch and manage them.

For this example there's a compose file using the version 2 schema. This means you will need at least Docker Engine 1.10 and Compose 1.6.

Here's the docker-compose.yml for the your scenario:

version: '2'
services:
     puppet:
     container_name: puppet
     hostname: puppet
     image: puppet/puppetserver
     ports:
        - 8140
     volumes:
        - ./code:/etc/puppetlabs/code/
        - ./puppet/ssl:/etc/puppetlabs/puppet/ssl/
        - ./puppet/serverdata:/opt/puppetlabs/server/data/puppetserver/
     #environment:
     # - PUPPETDB_SERVER_URLS=https://puppetdb.local:8081
     #links:
     # - puppetdb:puppetdb.local
puppetdb-postgres:
       container_name: postgres
       image: puppet/puppetdb-postgres
       environment:
          - POSTGRES_PASSWORD=puppetdb
          - POSTGRES_USER=puppetdb
       expose:
          -5432
       volumes:
          - ./puppetdb-postgres/data:/var/lib/postgresql/data/
puppetdb:
       hostname: puppetdb
       image: puppet/puppetdb
       ports:
          - 8080
          - 8081
       volumes:
          - ./puppetdb/ssl:/etc/puppetlabs/puppet/ssl/
puppetboard:
       image: puppet/puppetboard
       ports:
          - 8000
puppetexplorer:
       image: puppet/puppetexplorer
       ports:
          - 80
       read_only: true
answered Aug 20 by Sirajul
• 39,540 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer

Puppet in Docker : How do i create puppet containers?

For creating puppet containers, first we need ...READ MORE

answered Aug 20 in Puppet by Sirajul
• 39,540 points
59 views
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 in Puppet by Jason
181 views
0 votes
1 answer

How do I enable puppet collection repository in puppet if I am using Puppet 6.7?

In Puppet6.7 you have to enable Puppet ...READ MORE

answered Jul 31 in Puppet by Sirajul
• 39,540 points
38 views
0 votes
1 answer
0 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
• 56,940 points
232 views
0 votes
1 answer

Puppet+Docker: Using Docker-Compose with Puppet

Docker Compose describes a set of containers ...READ MORE

answered Aug 14 in Puppet by Sirajul
• 39,540 points
142 views
0 votes
1 answer

Puppet in Docker : Benefit of using puppet in docker

Here's to how this approach proves beneficial: One ...READ MORE

answered Aug 19 in Puppet by Sirajul
• 39,540 points
17 views