Ticket #141: Set Up Configuration Management System with Puppet - SupaHotBall/OE2-Group-D GitHub Wiki

Task

  • Set Up Puppet Master.
  • Configure the management server as the Puppet master.
  • Install and configure Puppet server software.
  • Set Up Puppet Agents.
  • Configure the other three servers as Puppet agents.
  • Install Puppet agent software on each server.
  • Ensure agents can communicate with the Puppet master.
  • Verify that the Puppet master and agents are functioning correctly.
  • Test configuration management by applying a sample manifest.

Steps Taken

Update all servers using sudo apt update && sudo apt upgrade

image

Adding host entries to /etc/hosts on all servers

Management Server

image

DB Server

image

Apps Server

image

Backup Server

image

Test network connectivity using the ping command

image

image

Add Puppet repo on the management server using the following code

 wget https://apt.puppetlabs.com/puppet7-release-jammy.deb
 sudo dpkg -i puppet7-release-jammy.deb
 sudo apt update

image

Install the Puppet server package

sudo apt install puppetserver -y

image

Configure the Puppet server by editing the puppet configuration file which can be found at /etc/puppetlabs/puppet/puppet.conf

image

Create the file site.pp in the manifests directory which is located at /etc/puppetlabs/code/environments/production/manifests/

image

Restart the Puppet server

sudo systemctl restart puppetserver

image

Start and enable the server, then verify that the Puppet server is running

sudo systemctl start puppetserver
sudo systemctl enable puppetserver
sudo systemctl status puppetserver

image

Regenerate certificates and clean CA folders if required

https://www.puppet.com/docs/puppet/7/ssl_regenerate_certificates.html

View pending certificate requests on the puppet management server

sudo puppetserver ca list

image

Sign the agent's certificate

sudo puppetserver ca sign --certname <AGENT_CERTNAME>

image

Edit site.pp file with vim package installation configuration

image

Uninstall VIM and check that the DB-server reinstalls it

image


Challenges

CA certificates could not be fetched, this was resolved after the certificates had been signed.


External Resources

N/A


Ticket Reference

https://rt.dataraster.com/Ticket/Display.html?id=141