Task - 4 DevOps Assembly Lines

Task - 4 DevOps Assembly Lines

Task Overview :

Create A dynamic Jenkins cluster and perform task-3 using the dynamic Jenkins cluster. Steps to proceed as:

  1. When we launch the job it should automatically starts job on slave based on the label provided for dynamic approach.
  2. Create a job chain of job1 & job2 using build pipeline plugin in Jenkins
  3. Job1 : Pull the Github repo automatically when some developers push repo to Github and perform the following operations as:
Image for post

Requirement for performing task :

So before we start we have to set the remote login for the docker services. for doing this we have to change the file /usr/lib/systemd/system/docker.service

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service
Wants=network-online.target
Requires=docker.socket

[Service]
Type=notify
𝘌𝘹𝘦𝘤𝘚𝘵𝘢𝘳𝘵=/𝘶𝘴𝘳/𝘣𝘪𝘯/𝘥𝘰𝘤𝘬𝘦𝘳𝘥 -𝘏 𝘧𝘥:// -𝘏 𝘵𝘤𝘱://0.0.0.0:4243 ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always

"/usr/lib/systemd/system/docker.service"
systemctl daemon-reload
systemctl restart docker

Step 1 :

In this step we have to create a Dockerfile that has web server installed. So when we push the html code it will be launched on the webserver.

Image for post

Step 2 :

Then we have to create a Jenkins job which will download the code and Dockerfile from the github automatically after pushing it to the github.

Image for post
Image for post

Step 3 :

In this step ew will build our docker image from the file. And after building the image it will be pushed to docker hub.

Image for post

Step 4 :

Now we need to a configuration of the kubectl, so we have to create a configuration file for this.

Image for post
Image for post
Image for post

Step 5 :

And now we have to configure cloud for docker in our jenkins,so we will need docker plugin for this or it will not work.

Image for post
Image for post
Image for post

Step 6 :

In this last step we have to create a jenkins job which will deploy the image.

Image for post

Comments

Post a Comment

Popular posts from this blog

Deploying wordpress on kubernetes using terraform with RDS

🎴Layout, ⚡ Hot Reload in Flutter!!!