As discussed, Please find below details :
1) Nagios installation guide is attached.2) Puppet :Actually we need to do this before nagios set up so that host names do not change.As of now you can stop the running instances and create 2 new instances for Puppet master and Puppet Agent and perform the below steps.1) Login to both the instances2) Create a root password for both
- sudo passwd
- enter password and re enter password
- su
- you are root user now
- cd
- you will be in root directory of instance now
3) Edit /etc/hostname file for both instances as below :
- Instance 1 : puppetmaster.edureka.com
- Instance 2 : puppetclient.edureka.com
Reboot machines4) Edit /etc/hosts file for both instances :
- Instance 1 : Add the private ip of puppetclient and hostname of puppetclient and this word "puppet client "
- Instance 2 : Add the private ip of puppetmaster and hostname of puppetmaster and these words " puppetmaster" "puppet"
So, /etc/hosts file in both the machines should have details of both master and slave like shown below :192.168.1.17 puppetclient.edureka.com puppetclient192.168.1.16 puppetmaster.edureka.com puppetmaster puppet6) Login as root on both instances and reboot the machines7) Instance 1 : sudo apt-get updatesudo apt install puppetmasterInstance 2 : sudo apt-get updatesudo apt install puppet8) Now we will set the example to check :sudo mkdir -p /etc/puppet/modules/apache2/manifestssudo nano /etc/puppet/modules/apache2/manifests/init.ppEnter below lines in init.pp file we created aboveclass apache2 {package { 'apache2':ensure => installed,}service { 'apache2':ensure => true,enable => true,require => Package['apache2'],}}sudo nano /etc/puppet/manifests/site.ppEnter below lines in the created site.pp file abovenode 'puppetclient.edureka.com' {include apache2}Restart master daemonsudo systemctl restart puppetmaster.serviceOn Instance 2 run below command :sudo systemctl start puppet.servicesudo puppet agent --fingerprintOn Instance 1 Run below command :sudo puppet cert listsudo puppet cert sign puppetclient.edureka.comOn Instance 2 Run below commandsudo puppet agent --testThis should install puppet successfully, create certificate and pass it to master and install the apache2 in your instance 2 successfully.3369993) Jenkins installation :
Let us know if you need any help.
358848:41453