Cloud project ( Jenkins)- Racha ben arous (M2 Data Science)
Cloud project ( Jenkins)- Racha ben arous (M2 Data Science)
MAIL: RASHA.BENAROUS@GMAIL.COM
ROADMAP OF NECESSARY STEPS
5
1 2 4
3 PHASE 5: DEPLOYMENT
PHASE 1: BASIC PHASE 2: TOOL PHASE 3: SECURITY PHASE 4: AND UPDATES
SETUP CONFIGURATION AND KEYS PIPELINE SETUP 1. Access the Tomcat interface.
2. Modify the project via GitLab.
1. Change the machine hostname.
1. Add required plugins in 1. Create the Jenkins 3. Re-run the pipeline to build and
2. Install OpenJDK (Java). 1. Generate a public key
Jenkins. pipeline for deployment deploy the project.
3. Install Maven for build and add it to GitLab.
2. Identify and configure (with Maven and 4. Verify the implemented changes.
management. 2. Add the private key to
Tomcat and GitLab. Tomcat).
4. Install and configure Jenkins. Jenkins.
1
PHASE 1: BASIC SETUP
Why?
To clearly identify the machine as the Jenkins server in the network.
1
PHASE 1: BASIC SETUP
2/INSTALLING OPENJDK 17
java -version
Why?
Jenkins requires Java to run.
1
PHASE 1: BASIC SETUP
Why?
Maven is used to automate builds, manage dependencies, and package Java projects.
1
PHASE 1: BASIC SETUP
http://13.53.38.185:8080
1
PHASE 1: BASIC SETUP
WHY?
THESE PLUGINS ENABLE GITLAB INTEGRATION, MAVEN BUILDS, AND PIPELINE MANAGEMENT.
2 PHASE 2: TOOL CONFIGURATION
IDENTIFY AND CONFIGURE TOMCAT AND GITLAB.
1. Generate a public key for Jenkins: 2. Add the public key to GitLab under:
1. CREATE THE JENKINS PIPELINE FOR DEPLOYMENT (WITH MAVEN AND TOMCAT)
pipeline {
Adding Pipeline Configurations agent any
stages {
stage('Clone') {
steps {
git 'https://gitlab.com/<repo>'
}
}
stage('Build') {
It’s just an example steps {
sh 'mvn clean install'
}
}
stage('Deploy') {
steps {
sh 'scp target/*.war tomcat@<server>:<path>'
}
}
}
}
5 PHASE 5: DEPLOYMENT AND UPDATES