Dynamic Jenkins Cluster

Dynamic Jenkins Cluster

Firstly edit this file “/lib/systemd/system/docker.service” on the host. Here we have to add “-H tcp://0.0.0.0:4252” on line no 14 as shown in Figure 01. By this, we can access the docker daemon service of the host machine in the Jenkins using port no. 4243.

No alt text provided for this image

Created a container image that’s has Linux and other basic configuration required to run Slave for Jenkins. When we launch the job it will automatically starts job on slave based on the label provided for dynamic approach.

No alt text provided for this image

Now we have to add details in cloud node for dynamic clustering.

No alt text provided for this image

Job 1

Pull the Github repo automatically when some developers push repo to Github and perform the following operations as:

1. Create the new image dynamically for the application and copy the application code into that corresponding docker image

2. Push that image to the docker hub

No alt text provided for this image
No alt text provided for this image

Job2

Launch the application on the top of Kubernetes cluster performing following operations:

1. If launching first time then create a deployment of the pod using the image created in the previous job. Else if deployment already exists then do rollout of the existing pod making zero downtime for the user.

2. If Application created first time, then Expose the application. Else don’t expose it.

No alt text provided for this image



Muskan Agarwal

Business Technology Solutions Associate Consultant @ ZS Pune

4 年

Awesome ??

回复

要查看或添加评论,请登录

Sandeep Singh Rajawat的更多文章

社区洞察

其他会员也浏览了