Setup Puppet repo:
wget https://apt.puppet.com/puppet-release-$(lsb_release -sc).deb
sudo dpkg -i puppet-release-$(lsb_release -sc).deb
sudo apt update
Setup Ruby and R10K:
sudo apt install rubygems -y
sudo gem install r10k
Edit the /etc/hosts
file to add the puppet server IP on both server and agent nodes:
sudo vim /etc/hosts
# changes the master file for cloud-init images
sudo vim /etc/cloud/templates/hosts.debian.tmpl
Add the following line in the /etc/hosts
file:
192.168.1.116 puppet
Install Puppet client:
sudo apt install puppet
Install Puppet server:
sudo apt install puppetserver
Modify Memory:
sudo vim /etc/default/puppetserver
JAVA_ARGS="-Xms2g -Xmx2g"
Start the puppet server:
sudo systemctl enable puppetserver
sudo systemctl start puppetserver
Check status puppet server:
sudo systemctl status puppetserver
Set soft links for puppet:
sudo ln -s /opt/puppetlabs/bin/puppet /usr/local/bin/puppet
sudo ln -s /opt/puppetlabs/bin/puppetserver /usr/local/bin/puppetserver
Install puppet agent:
sudo apt install puppet-agent
Start the puppet agent:
sudo systemctl enable puppet
sudo systemctl start puppet
Check status puppet agent:
sudo systemctl status puppet