How To Setup Jenkin on Rocky Linux 8.

Brief Introduction to Jenkins
Jenkins is an open-source automation server that enables developers to build, test, and deploy their software reliably. It facilitates continuous integration and continuous delivery (CI/CD) by automating the parts of software development related to building, testing, and deploying, thereby allowing teams to integrate changes more frequently and with higher confidence.
VM Specifications
  • Hostname: Rocky
  • CPU: 1
  • Memory: 1 GB
  • Disk: 16 GB
  • Internal IP: 172.16.1.252
  • External IP: 172.16.1.252
  • User: root
  • Password: redhat
Installation and Setup Steps

Install Java, wget, and rsyslog:

# dnf install java-17-openjdk-devel wget rsyslog

Start rsyslog service:

# systemctl start rsyslog

Add Jenkins repository:
# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
Import Jenkins GPG key:
# rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key
Install Jenkins:
# dnf install jenkins
Start Jenkins service:
# systemctl start jenkins
Enable Jenkins to start on boot:
# systemctl enable jenkins
Check Jenkins service status:
# systemctl status jenkins
Access Jenkins
Open a browser and navigate to http://jen01.darole.org:8080 


















Problem: 

Date: 26-May-2024

The DevOps team at xFusionCorp Industries is initiating the setup of CI/CD pipelines and has decided to utilize Jenkins as their server. Execute the task according to the provided requirements:

1. Install jenkins on jenkins server using yum utility only, and start its service. You might face timeout issue while starting the Jenkins service, please refer this link for help.

2. Jenkin's admin user name should be theadmin, password should be Adm!n321, full name should be Javed and email should be javed@jenkins.stratos.xfusioncorp.com.

Note:

1. For this task, access the Jenkins server by SSH using the root user and password S3curePass from the jump host.

2. Jenkin's admin user name should be theadmin, password should be Adm!n321, full name should be James and email should be james@jenkins.stratos.xfusioncorp.com.



# dnf install java-17-openjdk-devel wget rsyslog

# systemctl start rsyslog

# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo

# rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key

# sudo dnf install jenkins

# sudo systemctl start jenkins

# sudo systemctl enable jenkins

# sudo systemctl status jenkins


https://8080-port-5b716e355ad747c1.labs.kodekloud.com/

once plugin installation is completed, provide the user details and complete the installation.


Problem: 

Date: 27 May 2024

The Nautilus DevOps team has recently setup a Jenkins server, which they want to use for some CI/CD jobs. Before that they want to install some plugins which will be used in most of the jobs. Please find below more details about the task

1. Click on the Jenkins button on the top bar to access the Jenkins UI. Login using username admin and Adm!n321 password.

2. Once logged in, install the Git and GitLab plugins. Note that you may need to restart Jenkins service to complete the plugins installation, If required, opt to Restart Jenkins when installation is complete and no jobs are running on plugin installation/update page i.e update centre.

Note:

1. After restarting the Jenkins service, wait for the Jenkins login page to reappear before proceeding.

2. For tasks involving web UI changes, capture screenshots to share for review or consider using screen recording software like loom.com for documentation and sharing.


Problem

Date: 27 May 2024

The Nautilus team is integrating Jenkins into their CI/CD pipelines. After setting up a new Jenkins server, they're now configuring user access for the development team, Follow these steps:

1. Click on the Jenkins button on the top bar to access the Jenkins UI. Login with username admin and password Adm!n321.

2. Create a jenkins user named john with the passwordB4zNgHA7Ya. Their full name should match John.

3. Utilize the Project-based Matrix Authorization Strategy to assign overall read permission to the john user.

4. Remove all permissions for Anonymous users (if any) ensuring that the admin user retains overall Administer permissions.

5. For the existing job, grant john user only read permissions, disregarding other permissions such as Agent, SCM etc.

Note:

1. You may need to install plugins and restart Jenkins service. After plugins installation, select Restart Jenkins when installation is complete and no jobs are running on plugin installation/update page.

2. After restarting the Jenkins service, wait for the Jenkins login page to reappear before proceeding. Avoid clicking Finish immediately after restarting the service.

3. Capture screenshots of your configuration for review purposes. Consider using screen recording software like loom.com for documentation and sharing.

No comments:

Post a Comment