Public | Automated Build

Last pushed: 16 hours ago
Short Description
Run puppetserver on Ubuntu 14.04
Full Description

Puppet Server (Not Puppet Master)


Usage:

Step 1: Download the image

On your docker host:

> docker pull technopreneural/docker-ubuntu-14.04-puppetserver

Step 2: Run a container.

On the your docker host:

> docker run -d --name puppetserver \
-p 443:443 -p 8140:8140 -p 8142:8142 -p 61613:61613 \
-v /Users/user/Downloads/puppet:/etc/puppetlabs/code \
technopreneural/docker-ubuntu-14.04-puppetserver

In the command above, we name the container puppetserver. We then bind the exposed ports to the equivalent ports on the docker host (mandatory). We can also bind the volume to a folder if we want to (optional).

Step 3: Connect puppet nodes as necessary.

On your puppet node (e.g. Ubuntu 16.04):

> curl -O http://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
> sudo dpkg -i puppetlabs-release-pc1-xenial.deb
> sudo apt-get update && sudo apt-get install -y puppet-agent
> sudo su -
# puppet agent --test
Info: Creating a new SSL key for ubuntu.localdomain 
Exiting; failed to retrieve certificate and waitforcert is disabled

In the first two lines above, we download and install repository information. Next we install the puppet-agent. In the last line, we manually register the puppet node with the puppetserver.

NOTE: For every node you register manually, you need to accept on the puppetserver by manually signing the certificates for each node.

On the puppetserver:

> sudo su -
# puppet cert list
  "ubuntu.localdomain" (SHA256) FF:88:97:DC:AF:A8:BD:0D:6F:98:33:EB:BA:38:94:EB:55:0E:BF:EF:04:5D:27:BF:E7:39:FB:82:8F:4B:94:75

# puppet cert sign ubuntu.localdomain

In the above, we first list down all certificate signing requests from new nodes. Then, we sign the request.

On the puppet node, you can test:

> puppet agent --test
Signing Certificate Request for:
  "ubuntu.localdomain" (SHA256) FF:88:97:DC:AF:A8:BD:0D:6F:98:33:EB:BA:38:94:EB:55:0E:BF:EF:04:5D:27:BF:E7:39:FB:82:8F:4B:94:75
Notice: Signed certificate request for ubuntu.localdomain
Notice: Removing file Puppet::SSL::CertificateRequest ubuntu.localdomain at '/etc/puppetlabs/puppet/ssl/ca/requests/ubuntu.localdomain.pem'
Docker Pull Command
Owner
technopreneural

Comments (0)