Jenkins Part1 DEVOPS ONLINE TRAINING
July 10, 2026 — LiveStream
Disclosure: some links above are affiliate links — if you buy through them I may earn a small commission at no extra cost to you. Thanks for supporting the channel!
Are you looking to kickstart your journey into the world of DevOps? Understanding Jenkins is absolutely essential, as it's the undisputed champion for orchestrating CI/CD pipelines and driving seamless automation in modern software development. This comprehensive guide will walk you through the fundamentals of Jenkins, from installation to running your first automated job, ensuring you grasp the core concepts of this powerful DevOps tool.
Dekho, in today's fast-paced tech world, if your team isn't delivering software quickly and reliably, you're already behind. That's where DevOps comes in, right? It's all about bridging the gap between development and operations, fostering collaboration, and automating as much as possible. And when we talk about automation, especially for building, testing, and deploying code, one name shines brightest: Jenkins. For anyone getting into DevOps training, mastering Jenkins is non-negotiable.
Simply put, Jenkins is an open-source automation server. Think of it as the central nervous system of your software development lifecycle. Its primary role is to automate the non-human parts of the software development process, with continuous integration and facilitating continuous delivery. But it’s much more than just a build server, yaar. It’s a highly extensible system that helps teams automate everything from compiling code and running unit tests to packaging applications, deploying them to various environments, and even running acceptance tests.
Before Jenkins and similar tools, developers would often write code for weeks, then merge it all at once, leading to a "merge hell" – conflicts, broken builds, and long debugging cycles. The integration process was a bottleneck, not an enabler. Jenkins changed this paradigm by promoting Continuous Integration (CI).
So, why is it indispensable?
When we talk about CI/CD, we're essentially talking about a set of practices that enable rapid, reliable, and frequent delivery of software. Jenkins is at the very heart of making this a reality. Let's break down how it fits into CI/CD:
CI is the practice of frequently merging all developers' working copies to a shared mainline. Jenkins monitors your version control system (like Git). The moment a developer pushes new code, Jenkins springs into action:
This continuous feedback loop drastically reduces the time and effort required to integrate changes and maintain a stable codebase. It means your code is always in a releasable state, or at least you know exactly when it isn't.
Building on CI, Continuous Delivery (CD) is the practice where every change that passes the automated tests is automatically prepared for a release to production. Jenkins helps here by:
With Continuous Delivery, you have the capability to deploy to production at any time, though it still requires a manual push or approval. This gives businesses immense flexibility and agility.
This is the ultimate evolution of CD. With Continuous Deployment, every change that passes all stages of your CI/CD pipeline is automatically deployed to production, without human intervention. Jenkins can be configured to manage this entire process, making releases truly automated end-to-end. While not every organization adopts full continuous deployment due to various regulatory or business reasons, Jenkins provides the backbone to achieve it if desired. The goal, ultimately, is to get valuable software into the hands of users faster and more reliably.
Chalo, enough gyaan for now. Let's get our hands dirty and install Jenkins. For any DevOps training, hands-on experience is paramount. We’ll focus on installing Jenkins on a Linux-based system, specifically Ubuntu, which is a common choice in production environments and for learning purposes. Make sure you have a fresh Ubuntu instance (or any Debian-based distribution) ready. You'll need root or sudo privileges for these steps.
Before installing Jenkins, you need to ensure Java is installed. Jenkins is a Java-based application, so it needs a Java Runtime Environment (JRE) to run. The recommended version is OpenJDK 11. Let's install it.
Open your terminal and run these commands:
sudo apt update
sudo apt install openjdk-11-jre -y
After installation, you can verify the Java version:
java -version
You should see output similar to this, indicating OpenJDK 11 is installed:
openjdk version "11.0.19" 2023-04-18
OpenJDK Runtime Environment (build 11.0.19+7-post-Ubuntu-1ubuntu122.04.1)
OpenJDK 64-Bit Server VM (build 11.0.19+7-post-Ubuntu-1ubuntu122.04.1, mixed mode, sharing)
If you have multiple Java versions, you might need to configure the default using sudo update-alternatives --config java. For a fresh install, this should usually not be an issue.
Now that Java is sorted, let's proceed with installing Jenkins. We'll add the Jenkins repository to our system's package manager, so we can install it like any other software package and keep it updated easily.
First, we need to add the GPG key for the Jenkins repository. This key is used to verify the authenticity of the packages from the repository.
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
Next, we'll add the Jenkins repository URL to our system's sources list. This tells APT where to find the Jenkins packages.
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
Now, update your local package index to include the new Jenkins repository, and then install Jenkins.
sudo apt update
sudo apt install jenkins -y
This command will download and install Jenkins along with its dependencies. During the installation, Jenkins will be configured to start automatically on boot.
After installation, Jenkins should start automatically. You can check its status using:
sudo systemctl status jenkins
You should see output indicating that Jenkins is active (running). If it's not running, you can start it with sudo systemctl start jenkins.
If you have a firewall enabled (like UFW), you need to open port 8080, which is the default port Jenkins runs on. Without this, you won't be able to access the Jenkins web interface from your browser.
sudo ufw allow 8080
sudo ufw enable
With Jenkins installed and running, it's time to access its web interface and complete the initial setup. Open your web browser and navigate to http://your_server_ip_or_hostname:8080.
You'll be greeted by an "open up Jenkins" screen. This is a security measure. Jenkins generates an initial admin password and stores it in a file on the server.
Go back to your terminal and use the following command to retrieve the password:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Copy the long alphanumeric string displayed. This is your initial password.
Paste this password into the "Administrator password" field in your browser and click "Continue."
The next screen will ask you to install plugins. Plugins are the lifeblood of Jenkins, extending its functionality tremendously. For beginners, it's always best to:
Click "Install suggested plugins." Jenkins will now download and install these plugins. This process can take a few minutes, depending on your internet connection.
Once the plugin installation is complete, you'll be prompted to "Create First Admin User." Fill in the details: username, password, full name, and email address. Remember these credentials, as they will be your primary login for Jenkins.
Click "Save and Finish."
Finally, you'll see a "Jenkins is Ready!" screen. Click "Start using Jenkins." You will be redirected to the Jenkins dashboard. Congrats, boss! Your Jenkins environment is now up and running, ready for you to start automating tasks.
This initial setup is crucial for any Jenkins tutorial, as it forms the foundation for all your future automation efforts. You've successfully navigated the basics of Jenkins installation and configuration.
Now that Jenkins is alive and kicking, let's create our first automation job. This is where the real fun begins! We'll start with a "Freestyle project," which is a flexible option for simple tasks. Imagine we just want Jenkins to run a simple shell script to display a "Hello, DevOps!" message and list some files. A very basic continuous integration example.
The Jenkins dashboard is your command center. You'll see options like "New Item," "People," "Build History," "Manage Jenkins," etc. Take a moment to familiarize yourself with the layout. The left-hand navigation pane is particularly useful.
Follow these steps to create your first Jenkins job:
On the Jenkins dashboard, click on "New Item" in the left-hand navigation pane.
MyFirstJob. Choose a descriptive name.Click "OK."
You'll be taken to the job configuration page. This page has many sections, but for our first job, we'll only focus on a few key ones:
For this simple job, we won't integrate with a version control system yet. Leave "None" selected. In a real-world scenario, this is where you'd connect to Git (GitHub, GitLab, Bitbucket) to pull your source code.
This section defines when your job should run. For now, leave these unchecked. We'll trigger it manually. In future, this is where you configure automated triggers like "Poll SCM" (check for code changes periodically) or "Webhook" (trigger build on every push).
Leave this as default for now.
This is where you define the actual work Jenkins will do. We want to run a shell command.
A text area will appear. Enter your shell commands here. Let's add two simple commands:
echo "Hello, DevOps! This is MyFirstJob running successfully!"
echo "Current directory contents:"
ls -la
This section defines what Jenkins should do after the build steps are complete (e.g., send email notifications, archive artifacts). For now, we'll leave this empty.
Scroll down and click "Save." Your job is now created and configured!
You'll be redirected to the job's main page for MyFirstJob. On the left-hand side, you'll see "Build Now."
Click "Build Now." You'll see a build appear in the "Build History" panel on the left. A small spinning blue icon indicates it's running (or has succeeded). A red icon means failure, and yellow means unstable.
Once the build finishes (it should be very quick for this simple job), click on the build number (e.g., #1) in the "Build History" panel. Then, on the left, click "Console Output."
This console output shows you everything Jenkins did during that build. You should see your "Hello, DevOps!" message and the directory listing. If you see SUCCESS at the end, then congratulations! You've successfully run your first automated job using Jenkins.
This fundamental exercise is crucial for any DevOps training, demonstrating how to leverage Jenkins for automation. You've taken your first step towards building complex CI/CD pipelines!
Running a simple shell script is just the tip of the iceberg with Jenkins. To truly harness its power for robust DevOps automation and scalable CI/CD pipelines, you need to understand a few more core concepts.
As your Jenkins usage grows, one server might not be enough to handle all the builds and tests. That's where the Master-Agent architecture comes in.
Why this architecture?
Configuring agents involves setting up SSH or JNLP connections from the agent to the master, or having the master launch agents via cloud providers like AWS EC2 or Kubernetes. This is a critical next step when scaling your Jenkins setup.
Jenkins out-of-the-box is powerful, but its true strength lies in its ecosystem of thousands of plugins. Plugins allow Jenkins to integrate with virtually any tool or service in your development stack. Jab tak plugin hai, Jenkins hai!
Some essential plugin categories include:
To install plugins, navigate to "Manage Jenkins" > "Plugins" > "Available plugins" from your Jenkins dashboard. Search for the plugin you need, select it, and click "Install without restart" or "Download now and install after restart." Exploring and leveraging the right plugins is key to building robust and efficient CI/CD pipelines with Jenkins.
As a senior DevOps engineer, I'll tell you some wisdom:
/var/lib/jenkins directory (or wherever you configured JENKINS_HOME) contains all your job configurations, build history, plugins, and user data. Back it up regularly!jenkins user. Ensure this user has the necessary permissions to access files, directories, or run commands on the agent machine.In DevOps, Jenkins serves as the primary automation server for orchestrating the entire software delivery pipeline. It automates repetitive tasks such as compiling source code, running automated tests (unit, integration, functional), packaging applications into deployable artifacts, and deploying them to various environments (development, staging, production). This enables teams to implement Continuous Integration (CI) by frequently merging code, and Continuous Delivery/Deployment (CD) by reliably and rapidly releasing software changes.
Jenkins has a learning curve, but it's not overly difficult for beginners, especially with good guidance. The initial setup and creating simple Freestyle jobs are quite straightforward. The complexity increases when you start building advanced pipelines using Groovy-based Jenkinsfiles (Pipeline as Code), integrating numerous plugins, and setting up distributed builds with agents. However, with consistent practice and leveraging its extensive documentation and community support, beginners can become proficient in Jenkins for effective DevOps automation.
While Jenkins is incredibly popular, several strong alternatives exist, each with its strengths. Popular choices include:
Jenkins integrates with thousands of other tools primarily through its extensive plugin architecture. Developers can install plugins that provide native support for various tools, such as:
Toh, dekha na? This was just the Part 1 of your DevOps training with Jenkins, but you've already laid a solid foundation. You've learned what Jenkins is, why it's crucial for CI/CD automation, how to install it, and even ran your first automated job. This is not just theoretical knowledge; this is practical, job-ready skill development. As you progress, you'll dig deeper into advanced pipeline scripting, agent management, and integrating more sophisticated tools, expanding your capabilities for robust DevOps automation. Bilkul, your journey to becoming a pro DevOps engineer has truly begun. Keep practicing, keep learning, and keep automating!
If you found this guide useful and want to see these steps in action, I highly recommend watching the full video on the @explorenystream channel. Don't forget to like, share, and subscribe for more amazing DevOps content!