Jenkins is an open source automation server or tools for continuous integration and continuous delivery (CI/CD) pipelines that are widely used in various sectors. It helps automate various aspects of software development, including building, testing, and deploying applications. Jenkins allows developers to define and execute workflows that facilitate integration of code changes into a shared repository such as a Git repository and subsequent deployment of the application.
Some key features of Jenkins:
1. Continuous Integration (CI): Jenkins helps developers to frequently save changes to the code they create in a shared repository. It can automatically trigger build processes whenever changes are pushed to the repository, allowing teams to identify integration issues early and fix them quickly. This reduces the ability of developers to work.
2. Continuous Delivery (CD): The Jenkins deployment process automatically supports continuous delivery of software. Jenkins can test and deploy applications in different environments, such as testing, staging and production, ensuring a streamlined and consistent release pipeline.
3. Extensibility: Jenkins has a huge ecosystem of plugins that automatically extend its functionality. These plugins can cover a wide range of areas including source code management, build tools, testing frameworks, deployment platforms and notification systems. Developers can customize Jenkins in various ways to suit their specific needs.
4. Distributed Architecture: Jenkins can distribute workloads across multiple machines simultaneously, allowing parallel execution of tasks. This feature helps improve resource utilization and build and deployment times properly.
5. Easy Configuration: Jenkins provides a web-based interface and a domain-specific language (DSL) called “jenkinsfile” for configuring and defining pipelines. Users can define their CI/CD workflows using a declarative syntax or a script-based approach.
6. Community and Integration: Jenkins has a large and active community that contributes plugins, provides support, and shares best practices. It integrates well with various version control systems, build tools, testing frameworks, and other software development tools.
Overall, Jenkins helps automate repetitive tasks in the software development lifecycle, promoting collaboration, efficiency, and the rapid delivery of high-quality software for software firms.
Jenkins Installation Steps:
To install Jenkins follow the below steps:
Step 1: Install Java
Update System Packages:
# yum update -y
Install Java Development Kit (JDK):
Java must require to run Jenkins. Install the Java OpenJDK package.
# yum install java-11-openjdk -y
Step 2: Setup Jenkins repository
Need to add Jenkins Repository and import the Jenkins repository key
# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
# rpm –import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
Step 3: Install Jenkins
Before installing Jenkins need to install two language packages to overcome the error ‘Failed to start jenkins continuous integration server’. It will fix the the Jenkins start problem.
# yum install dejavu-sans-fonts -y
# yum install fontconfig -y
# yum install jenkins -y
Reload the system daemon:
# systemctl daemon-reload
Enable and Start Jenkins Service:
# systemctl enable jenkins
# systemctl start jenkins
Check the Jenkins Server:
systemctl status jenkins
Step 4: Configure Firewalld
If you have the firewalld service enabled, allow inbound connections to Jenkins :
# firewall-cmd –permanent –zone=public –add-port=8080/tcp
# firewall-cmd –reload
Step 5: Access Jenkins Web Interface:
Open a web browser and visit http://172.22.10.20:8080. You should see the Jenkins setup page.
Step 6: Unlock Jenkins:
To retrieve the initial admin password, run the following command-
# cat /var/lib/jenkins/secrets/initialAdminPassword
Copy the password and paste it into the Jenkins setup wizard to unlock Jenkins. and Customize Plugin Installation (Optional): You can choose to install suggested plugins or select specific plugins based on your needs.
Step 7: Create an Admin User:
Provide the necessary details to create an administrator user for Jenkins.
Step 8: Start using Jenkins:
Once the setup is complete, Jenkins is ready to use. You can start creating your CI/CD pipelines and jobs.
You can view the YouTube Video of Jenkins Installation in CentOS Linux 7.