Puppet is configuration management tool. In this article, we will focus on installing Puppet master and puppet client.
Puppet is designed in an agent-master architecture in this write up although puppet also has concept of Puppet Hiera. Puppet agent chronically sends facts to puppet master and request a catalog. The puppet master compiles and returns respective node’s catalog.
Ntp – The timing of the master and client nodes should be accurately in sync with the NTP server because the Puppet server will be acting as the certificate authority.
DNS/Hosts Entry – The Puppet agent uses the hostname to communicate with the Puppet Server. So, make sure agent nodes can resolve the hostname of the Puppet Server
Installing the Puppet Server role:
To install the Puppet Server, we would need to add the puppet repository by installing the repository configuration package.
Install the Puppet server using the below command.
rpm -Uvh https://yum.puppet.com/puppet6-release-el-8.noarch.rpm
Once repository is enabled, we will install puppet master by using following command.
yum install -y puppetserver
By default, Puppet Server is configured to use 2GB of memory. You can change the memory allocation by editing the java variables in
JAVA_ARGS="-Xms2g -Xmx2g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
Here you can change the -Xms and -Xmx variables according the vm memory availability. We have observed values below 1 GB generally doesn’t perform well.
We will start editing Puppet’s configuration file consists of two sections named [master] and [main] for Puppet server and agent respectively.
# Pupper Server Configuration
dns_alt_names = puppetserver,puppetserver.itzgeek.local # Puppet Agent Configuration
certname = puppetserver.itzgeek.local server = puppetserver.itzgeek.local runinterval = 30m
Generate the root and intermediate signing CA for Puppet Server.
puppetserver ca setup
Start and enable the Puppet Server.
systemctl start puppetserver
systemctl enable puppetserver