Puppet on Ubuntu 16.04, installation and configuration

Puppet on Ubuntu 16.04, installation and configuration for Servers and Clients.

Puppet on Ubuntu 16.04, installation and configuration

puppet-on-ubuntu-16-04

On a previously installed Ubuntu 16.04 Server machine, run the following commands:

#:~$ wget https://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 puppetserver

You configure the memory to use for Java

#:~$ sudo vi /etc/default/puppetserver
Change this value
#JAVA_ARGS="-Xms2g -Xmx2g -XX:MaxPermSize=256m"
JAVA_ARGS="-Xms512m -Xmx512m"
#:~$ sudo systemctl start puppetserver
#:~$ sudo systemctl enable puppetserver

On a previously installed Ubuntu 16.04 Client machine (via pxe), you run the following commands:


#:~$ wget https://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

The host file is edited by identifying the client’s / ip name and the Puppet Server’s / ip name.

#:~$ sudo cat /etc/hosts
192.168.0.150 ubuntu ubuntu.local
192.168.0.100 pxe pxe.local

You run the following command to create the client certificate.

sudo /opt/puppetlabs/bin/puppet agent —test

Returning to the server, you must now validate the client’s certificate:

#:~$ sudo /opt/puppetlabs/bin/puppet cert list
#:~$ sudo /opt/puppetlabs/bin/puppet cert sign ubuntu.local

The result should be:

Notice: Signed certificate request for ubuntu.local
Notice: Removing file Puppet::SSL::CertificateRequest ubuntu.local at ‘/etc/puppetlabs/puppet/ssl/ca/requests/ubuntu.local.pem’

The client is now configured and synchronized with the Puppet Server.