The main motive of this article is to solve real-world problems. Can you imagine the loss of Instagram, not only loss but also hate of a million users it receives if it is even down by a few seconds, so nobody would want that, right?
It can be solved by using automatic rollout of updates using Kubernetes and managing the build triggers by Jenkins.
So let us get going, on how to solve this major issue in this easy way.
1. Build Pipeline Plugin
2. Docker Plugin
3.GitHub Plugin
First of all, we need to set up socket binding so as to allow the docker services of this VM to be used by others also. For this, we need to enable TCP support also. This is done by adding _-H tcp://0.0.0.0:1234 in /usr/lib/systemd/system/docker.service _file in the docker server.
vim /usr/lib/systemd/system/docker.service
change configuration of the docker services
Now restart your docker services using:
systemctl daemon-reload
systemctl restart docker
Now, a container image is created that has Linux and other basic configuration required to run Slave for Jenkins.
Step by step explanation of the Dockerfile are:
#dockerfiles #jenkins #kubernetes #rolling-updates #docker