Configuring a Puppet Server lab
Note
This all started from a failed attempt to follow PluralSight’s Puppet sysadmin course using Apache and Passenger. Ran into dependency issues which Ben Piper provided solutions for on his github page but beyond that continued to run into issues with the lab environment. I was more interested in getting a test environment up and running so I could start rapid prototyping our Puppet workflow, not infrastructure as that is already in place.
Anyways, i’ll be using CentOS 7 minimal bare installs and build a very minimum configuration to get the following up and running.
- Puppet Master
- DNS Server
- Wiki Server
Pre-Puppet Configuration Tasks (All Servers)
Configure Network
sudo vi /etc/sysconfig/network-scripts/name-of-youractiveinterface
Find and replace onboot=no
to onboot=yes
Restart network service sudo systemctl restart network
Confirm you are getting network connectivity. nmcli
or ping google.com
Add dns entries
Add all hosts to /etc/hosts on each server if you do not have a dns server configured.
Install Updates
sudo yum update -y
NTP and date/time configuration.
sudo yum -y install ntp
sudo timedatectl set-timezone "America/Chicago"
sudo systemctl start ntpd
. Configure host names and dns entries as we do not have a primary dns server(yet).
- On both: Configure SELinux
- On both: Configure firewalld settings.
- Add puppet repos
Puppet Installation
On the master:
sudo rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
sudo yum -y install puppetserver
Configure memory allocation for puppet master:
vi /etc/sysconfig/puppetserver
Find and modify -> JAVA_ARGS="-Xms3g -Xmx3g"
Start and enable Puppet Server
sudo systemctl start puppetserver
sudo systemctl enable puppetserver
Installing Agents
sudo rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
sudo yum -y install puppet-agent
sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
Cert Signing From the Agents:
sudo /opt/puppetlabs/bin/puppet agent -t server="puppet01.test.local"
From the Master:
sudo /opt/puppetlabs/bin/puppet cert list
sudo /opt/puppetlabs/bin/puppet cert sign wiki01.test.local