Links:
1: [Link]
2: [Link]
3: [Link]
4: [Link]
3367
===================== Commands ======
--------------------------- Install Master -------------
hostname
ifconfig -a /// ip addr show
[Link]
Modify:
vi /etc/hosts
[Link] [Link] puppet
Set the hostname:
hostnamectl set-hostname [Link]
Chek the F/W status:
systemctl status firewalld ----> CentOS
sudo ufw status ----> Ubuntu
Enable the repo:
wget [Link]
sudo dpkg -i [Link]
Red Hat operating systems: yum install puppetserver
Debian and Ubuntu operating systems: apt-get install puppetserver
update: PATH
bash -l
puppetserver -v
sudo systemctl start puppetserver
systemctl status puppetserver
systemctl enable puppetserver
=================================================
Installation of client
Step # 1: Install the client
All the steps remain same, you need to install puppet agent:
sudo apt-get install puppet-agent
Configure the clinet:
Configuration at client:
cd /etc/puppetlabs/puppet
vi [Link]
[main]
certname = [Link]
server = [Link]
started the service
ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet -----> creation of Sym-link
systemctl start puppet
systemctl status puppet
ystemctl enable puppet
We went to master: Who is your client
------------------------------------------
puppetserver ca sign --certname [Link]
Certificate autorization in puppet
Checkit master or polling the master:
-----------------------------------------
PupppetC $ puppet agent -vt
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for [Link]
Info: Applying configuration version '1690649613'
Notice: Applied catalog in 0.01 seconds
PupppetC $
================ LAB ======
Master:
---------
cd /etc/puppetlabs/code/environments/production/manifests
vi [Link] ----> puppet program
user { 'test':
ensure => present,
}
========================== Jenkins ==================
[Link]
Installation of Java
java -version
sudo apt update
sudo apt install openjdk-11-jre
java -version
Debian/Ubuntu
curl -fsSL [Link] | sudo tee
/usr/share/keyrings/[Link] > /dev/null
echo deb [signed-by=/usr/share/keyrings/[Link]]
[Link] binary/ | sudo tee
/etc/apt/[Link].d/[Link] > /dev/null
sudo apt-get update
sudo apt-get install jenkins
Start Jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
sudo systemctl enable jenkins
Access Jenkins
[Link]
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Setting the Java_Home
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
echo $PATH
[Link]
Installing TOMCAT
-------------------
Step 1: Install Java
sudo apt-get update
sudo apt-get install default-jdk
========================
Step 2: Install Tomcat
sudo apt install unzip wget
cd /tmp
wget [Link]
[Link].sha512
[Link]
[Link]
unzip apache-tomcat-*.zip
sudo mkdir -p /opt/tomcat
sudo mv apache-tomcat-8.5.89 /opt/tomcat/
===========================
Step 3: Change Tomcat Server Port
Jenkins is running on Port 8080, and tomcat defalut port is also 8080. So we need
to change the Tomcat port:
Let's make the PORT number of TOmcat to 9000
cd /opt/tomcat/apache-tomcat-8.5.89/conf/
vi [Link] file
Search for Connector and change the Port Value, save the file.
8080 ----> 9090
===========================
Step 4: Change Permission of Scripts in /bin
cd /opt/tomcat/apache-tomcat-8.5.89/bin
ls -la
sudo chmod +x *
./[Link]
./[Link]
=========================
Step 6: Configure Jenkins with Tomcat for Auto Deployment of Artifacts.
Set Credentials of Tomcat that Jenkins use.
cd /opt/tomcat/apache-tomcat-8.5.89/conf
update [Link] file.
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-script,manager-gui"/>
=====================
Step 6 : Restart the tomcat server
/opt/tomcat/apache-tomcat-8.5.47/bin/[Link]
/opt/tomcat/apache-tomcat-8.5.47/bin/[Link]
Login Jenkins:
=================
Install Plugins:
Copy Artifact
Deploy to container
/opt/tomcat/apache-tomcat-8.5.90/webapps/manager/META-INF
[Link]
<!--
<Valve className="[Link]"
allow="127\.\d+\.\d+\.\d+|::1|[Link]" />
-->
/opt/tomcat/apache-tomcat-8.5.47/bin/[Link]
/opt/tomcat/apache-tomcat-8.5.47/bin/[Link]