Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

This is a work in progress...

Creating a Puppet Master Server

For this Instruction I am using 2 Virtual Machines on Ubuntu 16.04 LTS

Code Block
languagebash
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 puppetserver

Modifying the Memory Limit on Puppet Master

Puppet default memory use is 2GB edit the puppetserver file to change it to 512mb.

...

Code Block
languagebash
# Modify this if you'd like to change the memory allocation, enable JMX, etc
JAVA_ARGS="-Xms512m -Xmx512m -XX:MaxPermSize=256m"

Defining the DNS for the Server

For the Puppet Agents to find the Puppet Master server the DNS needs to be defined in the configuration file.

Code Block
languagebash
sudo vi /etc/puppetlabs/puppet/puppet.conf

Add this to the end of the file since our server ip is 192.168.237.130 we will use this in our example.

Code Block
languagebash
dns_alt_names = hostname,192.168.237.130
[main]
certname = 192.168.237.130
server = 192.168.237.130
environment = production
runinterval = 5m

Start the Puppet Server and Enable Start on Reboot

Code Block
languagebash
sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true

Should be followed by

Code Block
languagebash
Notice: /Service[puppet]/ensure: ensure changed 'stopped' to 'running'
service { 'puppet':
 ensure => 'running',
 enable => 'true',
}

Creating the Puppet Agent Node

Code Block
languagebash
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 puppet-agent

Configuring the Config File to Find the Puppet Master Server

Code Block
languagebash
sudo vi /etc/puppetlabs/puppet/puppet.conf


[main]
certname = puppetagent3
server = 192.168.237.130
environment = production
runinterval = 20m


How to Execute Puppet Scripts

...