How Do You Install Puppet Master on an AWS Instance of Ubuntu 16?

Updated 12/1/17

Problem scenario

You need to install open source Puppet version 5 on a server to become a Puppet Master.  You have an AWS Ubuntu Linux server.  You only have five minutes to do it.  How do you install Puppet Master immediately?

Solution
1.  Create puppetinstaller.sh in the /tmp directory.  It should have the following lines (stop before you get to step #2):

#!/bin/bash
# Written by continualintegration.com

apt-get update
apt-get -y install ntp
echo '
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org' >> /etc/ntp.conf

service ntp restart
cd ~ && wget https://apt.puppetlabs.com/puppet5-nightly/puppet5-nightly-release-xenial.deb
dpkg -i puppet5-nightly-release-xenial.deb
apt-get update
apt-get -y install puppetserver puppet-agent

2. Run this command:  bash /tmp/puppetinstaller.sh

3.  Verify it worked by running this command:  puppet -V
      
You are done with the installation when you see the numeric version from the above command.

4.  This is an optional configuration step.Mentally decide how much RAM you want Puppet Master application to have.  (In small development environments it is possible the role of Puppet Master competes with another purpose of the server.)  If you are not sure how much RAM you have, try run this command:  cat /proc/meminfo | grep Mem

Create this file or modify the existing one:  /etc/default/puppetserver
In this file put a stanza like one of the following, but if the file exists modify a single stanza you see that is like it:

JAVA_ARGS="-Xms512m -Xmx512m"

JAVA_ARGS="-Xms1g -Xmx1g"

JAVA_ARGS="-Xms2g -Xmx2g"

# The above stanzas would limit Puppet Master's RAM usage at 512 MB, 1 GB and 2 GB respectively.

#  If you want to increase the amount of virtual memory, you can use this posting for directions on how to create swap space.  If you want more RAM, you can upgrade the flavor of the AWS EC-2 instance (aka virtual server) by following this link.

If you want to see directions like these for installing Puppet Master on a Debian server in GCP, see this posting.

Leave a comment

Your email address will not be published. Required fields are marked *