Public Repository

Last pushed: a year ago
Short Description
Starts a Puppet Server :)
Full Description

A community puppet server can be hosted using this image. The image has the auto sign agent set to true.

Pre-create a folder structure as below into the /opt/puppet/code folder

├── environments
│ └── production
│ ├── environment.conf
│ ├── hieradata
│ ├── manifests
│ └── modules
└── modules

Use this command : mkdir -p code/{environments/production/{hieradata,manifests,modules},modules}
Create a file called environment.conf

These folders will persist the catalogs that are created.

Create a mapping for puppet command using a script as below. Save the script to /usr/local/bin/puppet on the host.
chmod to 777

*** puppet *

docker exec -i puppet puppet $@

To Run:
docker run -i -t -d --name puppet --hostname puppet -v /opt/puppetlabs/server/data/puppetserver/yaml:/opt/puppetlabs/server/data/puppetserver/yaml -v /opt/puppetlabs/server/data/puppetserver/reports:/opt/puppetlabs/server/data/puppetserver/reports -v /etc/puppetlabs/code:/etc/puppetlabs/code -p 8140:8140 getting2vinod/puppet /bin/bash

Start the server service

puppet master

On the agent or client the certificates need to regenerated (need to find the folder mapping on the server for this)

  1. remove the contents of the ssl folder /etc/puppetlabs/puppet/ssl/ or C:\ProgramData\PuppetLabs\puppet\etc\ssl
  2. remove the agent cache /opt/puppetlabs/puppet/cache/client_data/catalog/ or C:\ProgramData\PuppetLabs\puppet\cache\client_data\catalog
  3. run the agent using

puppet agent -t

Open the port 8140 for the vm.

Docker Pull Command