Ticket ID #147 ‐ Installing and connecting and agent(Database server) - GriffinKat/group-a GitHub Wiki
Documentation of setting up the database server as a puppet agent
We created a Puppetmaster server to configure the other servers with the same configurations across the board.
I created two Puppetagents (DB-a and the Backup Server which means they receive their configurations from the Puppetmaster
Using Lab 2.2 Lab2.2_Puppet_Initial_Setup.docx
Here is a link to a word doc of this documentation (Basically what is in this wiki page, in a word doc)
https://otagopoly-my.sharepoint.com/:w:/g/personal/cosgbf1_student_op_ac_nz/EeWu7npMdvZBgHXVRgDIEFgBAwvTYWBYm5Bbg915eeo3sA?e=KvKRtU
Updated the servers using this command
sudo apt update && sudo apt upgrade
Put this command in the terminal sudo nano /etc/hosts
Copy this information under localhost line
10.2.0.5 mgmt-a
10.2.0.4 db-a
10.2.0.7 apps-a
10.2.0.6 backup-a
Test if working using this command
Ping mgmt-a
Installing and connecting an agent
Add the Puppet repository (do for only db server for now, we can do for others after getting this right): On your db server, use apt to install the puppet package and its dependencies.
wget https://apt.puppet.com/puppet7-release-jammy.deb
sudo dpkg -i puppet7-release-jammy.deb
sudo apt update
Install the Puppet agent package:
sudo apt install puppet-agent -y
• Configure the Puppet agent:
– Edit the Puppet agent configuration file:
sudo nano /etc/puppetlabs/puppet/puppet.conf
Add the following lines under the [main] section:
server = mgmt-x
certname =
[main]
certname = db-a.oe2.org.nz
server = mgmt-a
runinterval = 1h
Start and enable the Puppet agent:
sudo systemctl start puppet
sudo systemctl enable puppet
Verify the Puppet agent is running:
sudo systemctl status puppet
Verify a connection with the Puppetmaster
sudo puppet agent --server=mgmt-a --no-daemonize --verbose --onetime