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
Adding host entries to /etc/hosts on all servers
Management Server
DB Server
Apps Server
Backup Server
Test network connectivity using the ping command
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
Install the Puppet server package
sudo apt install puppetserver -y
Configure the Puppet server by editing the puppet configuration file which can be found at /etc/puppetlabs/puppet/puppet.conf
Create the file site.pp in the manifests directory which is located at /etc/puppetlabs/code/environments/production/manifests/
Restart the Puppet server
sudo systemctl restart puppetserver
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
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
Sign the agent's certificate
sudo puppetserver ca sign --certname <AGENT_CERTNAME>
Edit site.pp file with vim package installation configuration
Uninstall VIM and check that the DB-server reinstalls it
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