Build Jenkins Pipeline Using Git, Docker Hub, Podman and Kubernetes - Part 1
In this Blog we will Understand each component functionality and try to setup complete Environment.
Git is a distributed version control system that allows you to track changes to your code over time. It is a popular tool among developers because it is easy to use, efficient, and reliable.Git is used to track changes to files in a repository. A repository is a collection of files that are managed by Git. You can create a new repository or clone an existing repository.To add a file to a repository, you use the git add command. To commit changes to the repository, you use the git commit command.
Jenkins is an open-source automation server that helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.
JNLP stands for Java Web Start. It is a technology that allows you to run Java applications without having to install them on your computer. JNLP is used by Jenkins to launch agents on remote machines.When you create a Jenkins agent, you can choose to use JNLP as the connection protocol. This will allow the agent to connect to the Jenkins master without having to install the Jenkins CLI on the remote machine.To use JNLP, you need to configure the Jenkins master and the agent. On the Jenkins master, you need to enable JNLP and specify the port that the agents will connect to. On the agent, you need to download the JNLP launcher and configure it to connect to the Jenkins master.
Docker Hub is a cloud-based registry that hosts Docker images. It is a popular choice for storing and sharing Docker images because it is easy to use, reliable, and secure.
Kubernetes (K8s) is an open-source system for managing containerized applications. It is a portable, extensible, and scalable platform that can be used to deploy applications on a variety of infrastructures, including on-premises, public clouds, and hybrid clouds.Kubernetes provides a set of tools and services that allow you to automate the deployment, scaling, and management of containerized applications.
Podman is a daemonless container engine for developing, managing, and running containers on your Linux® systems. It is based on the Open Container Initiative (OCI) specification and it is compatible with Docker images.
Let's start with Environment preparation:
Install GIT to you local machine. Here i am using Oracle Linux 8.
1) dnf install -y git
2) git help
3) git config --global user.name "Nikhil Verma"
4) git config --global user.email firstname.lastname@example.org
Check configuration: git config --global --list
In case you want to modify : git config --global --edit
Let's create a directory and init GIT:
1) mkdir jenkins-pipeline
2) cd jenkins-pipeline
3) git init jenkins-pipeline
4) Check status : git status ( We need to make Branch name set as Master not main)
5) I already created my Repo : https://github.com/vnikhil89/jenkins-pipeline.git
Now our GIT and Github repository ready.
Lets start with Jenkins Deployment
For Jenkins deployment i am using Terraform and Oracle Cloud Infrastructure.
You will find complete repo here :
To learn how to do Terraform deployment on OCI , please refer this Blog :
Next Blog we will configure Jenkins and create Kubernetes cluster .