Day 22
Day 22
Waterfall model
Agile methodology
Travis CI
Circle CI
---------------------------
---------------------------
SonarQube: Continouse inspection of code quality and also we can integrate this
tool inside the jenkins pipeline.
----------------------------------------------------------------------
For jenkins we require java and tomcat server.
We must install headless kernel (Devel) of java because we are using CLI.
Step-0 create new machine with 4GB RAm and min 2 CPU ( t3.mdedium)
Step-2
Step-3
java --version
Step-3.1
configure environemt variable in linux ( /root/.bash_profile )
vi /root/.bash_profile
export JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto.x86_64
source /root/.bash_profile
echo $JAVA_HOME
bash
Step-5 Cross check your security group for port 22 accessbiable for cluster
machine ( Master + wn1 + wn2 )
Also make sure port number 8080 is open for wolrd wide
Because jenkins uses apache tomcat app server and its port number 8080 / TCP
Step-6
wget -O /etc/yum.repos.d/jenkins.repo
https://pkg.jenkins.io/redhat-stable/jenkins.repo
yum upgrade
systemctl daemon-reload
Step-6 Now start jenkins server and config its default user :
systemctl start jenkins && systemctl enable jenkins
netstat -plant
su - jenkins
whoami
Step-7 Now create jenkin as sudo user ( Just like Super user root )
vi /etc/sudoers.d/jenkins
Step-9 Now Edit and add your hostname and cluster machine names in your
/etc/hosts
vi /etc/hosts
172.31.82.153 jenkins.tg.com
172.31.10.231 master.tg.com master
172.31.4.40 wn1.tg.com wn1
172.31.9.139 wn2.tg.com wn2
Step-10 create your ssh public key for JENKINS user and share with Master node
only.
su - jenkins
ssh-keygen -t rsa
pwd
/var/lib/jenkins
now share this above id_rsa.pub key with Master node root user
vi /root/.ssh/authorized_keys
pwd
whoami
Now logout
exit
Step-11 Now open jenkins server PUBLIC IP with port number 8080
http://18.234.207.242:8080/
Step-12
install java on Master node for communication between Jenkins server target server.
vi /root/.bash_profile
export JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto.x86_64
source /root/.bash_profile
echo $JAVA_HOME
Step-12.1
For CI / CD pipeline we require git software jenkins as well master node (TARGET
node)
Go to master.tg.com
DIY
[email protected]:cdtsbikaner/tomcat8.git