Welcome to Day 65 of our #90DaysOfDevOps series! Today, let's discuss about Jenkins, a stalwart in the Continuous Integration (CI) and Continuous Deployment (CD) landscape.
The Historical Canvas
Jenkins, an open-source automation server, has been a key player in CI/CD since its inception in 2011. Born from the Hudson project, Jenkins quickly rose to prominence due to its extensibility and vibrant plugin ecosystem.
Setting the Stage
Before we dive into the technicalities, let's set up Jenkins on our local machine or a cloud server. Installation is a breeze, and you'll find detailed guides on the official Jenkins website tailored to your platform.
Installation and Setup
For local environments, Jenkins offers a straightforward installation process. Once installed, you'll access its user-friendly web interface, opening the doors to a world of automation possibilities.
For Local Installation:
Pre-requisites: Ensure you have Java installed.
Download Jenkins: Visit the official Jenkins website and download the latest version.
Run the Installer: Execute the downloaded .war file using the command java -jar jenkins.war.
Access Jenkins: Open your browser and navigate to http://localhost:8080. Retrieve the initial admin password from the Jenkins console.
For Cloud Server Installation:
Provision Server: Set up a virtual server instance on your preferred cloud provider (AWS, GCP, Azure).
Install Java: Ensure Java is installed on your server.
Download Jenkins: Use wget or curl to fetch the Jenkins .war file.
Run Jenkins: Start Jenkins with java -jar jenkins.war.
Building Your First Jenkins Job
Now, let's roll up our sleeves and create a basic Jenkins job. A job in Jenkins is a defined task, often representing a step in your CI/CD pipeline.
Log In: Log in to the Jenkins web interface.
Create a New Job: Click on "New Item," enter a name for your job, and select "Freestyle project."
Configure Source Code Management: If your project is on Git, enter your repository URL.
Build Triggers: Decide when you want your build to run - perhaps when changes are pushed.
Build Steps: Add build steps based on your project requirements. For simplicity, start with a shell command like echo "Hello, Jenkins!".
In this brief journey into Jenkins, we've set the stage, installed the tool, and created a simple job. Jenkins, with its extensive plugin support, can be tailored to suit various project needs, from building traditional applications to deploying containers.
As you explore Jenkins further, remember its pivotal role in automating your software development lifecycle. This automation not only saves time but also enhances the reliability and consistency of your software delivery.
Thank you for joining us on this leg of our #90DaysOfDevOps adventure. Stay tuned for more insights into the tools and practices shaping the DevOps landscape! Remember, it's not just about exploring; it's about growing together.
With this, let's wrap this post here.
Thank you for reading!
*** Explore | Share | Grow ***
Comments