Using 2 Ubuntu 20.04, (puppet has a .deb for focal) install_puppet#install_puppet

Instances

puppetmaster 10.0.1.249 agent 10.0.1.7 (replaced?) agent2 10.0.1.112

^60d9d7

Enable the Puppet platform on Apt (both master and agent)

wget https://apt.puppetlabs.com/puppet8-release-focal.deb 
sudo dpkg -i puppet8-release-focal.deb 
sudo apt update -y

Did not have Java installed Installting 17.0.8

sudo apt install openjdk-17-jre-headless -y


sudo apt-get install puppetserver -y
sudo systemctl enable puppetserver

So before this works need to solve the issue. But we need to install it so the config file appears and we can edit it

I edit file located in /etc/default/puppetserver

sudo systemctl start puppetserver
sudo systemctl status puppetserver


Used find instead of which not sure why did work this time

ubuntu@ip-10-0-1-249:~$ sudo find / -type f puppetserver
find: paths must precede expression: `puppetserver'
ubuntu@ip-10-0-1-249:~$ sudo find / -type f -name puppetserver
/etc/init.d/puppetserver
/etc/default/puppetserver
/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver


Maybe not even mention this part The env variable we create does not registe with sudo need to keep this in mind when we need to run it with sudo

sudo apt policy puppetserver


No need to run sudo ufw allow 8140/tcp . I have firewall disabled in OS, need to open in security Group

ubuntu@ip-10-0-1-249:~$ sudo ufw status
Status: inactive

Need to have DNS for hostname puppet

trying this the command we need to use full path with sudo. As expected there are no certificate request cuse we have not agents yet

sudo /opt/puppetlabs/server/apps/puppetserver/bin/puppetserver ca list


Agent

First we add DNS to resovle puppet to master IP. /etc/hosts

Enable the Puppet platform on Apt

wget https://apt.puppetlabs.com/puppet8-release-focal.deb 
sudo dpkg -i puppet8-release-focal.deb 
sudo apt update -y

Install agents

sudo apt-get install puppet-agent -y
sudo systemctl enable puppet
sudo systemctl start puppet
sudo systemctl status puppet


Will navigate to the directory of puppetserver so when i run it with sudo dont have to specify the full path. With puppet ca list i see the certifacte requests of my 2 agents Then we sign the certificate we can sign indidivual certifacates i opted out for --all
Here appears old agent1

when calling agent need to use sudo

sudo /opt/puppetlabs/puppet/bin/puppet agent --test