Installing Puppet on RHEL 7 / CentOS 7
Installing Puppet Server
- Enable the Puppet platform Yum repo
- Install puppet server
- Memory Configuration for puppet
- Start and Enable puppet server service
rpm -Uvh https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
yum install puppetserver
vi /etc/sysconfig/puppetserver
JAVA_ARGS="-Xms2g -Xmx2g"
Example:
For Setting Memory to 1 GB
JAVA_ARGS="-Xms1g -Xmx1g"
For Setting Memory to 512 MB
JAVA_ARGS="-Xms512m -Xmx512m"
systemctl start puppetserver
systemctl enable puppetserver
Installing Puppet Agent on Client Servers
- Enable the Puppet platform Yum repo
- Configure PATH Environment Variable
- Configure puppet server setting
- Enable puppet agent service
rpm -Uvh https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
source /etc/profile.d/puppet-agent.sh
puppet config set server puppet-master.example.com --section main
puppet resource service puppet ensure=running enable=true
Puppet Server Signing Agent Certificates
- List the certificates pending for signing
- Sign all Agent Certificates
- Puppet Server Deployment Configuration
/opt/puppetlabs/bin/puppetserver ca list
/opt/puppetlabs/bin/puppetserver ca sign --all
vi /etc/puppetlabs/code/environments/production/manifests/site.pp
Testing connection from puppet Agent to puppet server
- Login to the puppet Agent server and run following command to test Agent connection with puppet server.
puppet agent --test