Day 28 Task: Jenkins Agents??????
Nikita Parmar
Frontend Developer ???? | Competitive programmer | DevOps Learner ?? | Linux ???? | Git & Github ?? | GSsoc'23 contributor |
Here we will deploy a web app through Jenkins master to Jenkins worker node.
1.?????Create EC2 instances as
·???????jenkins-server
·???????Jenkins-agent-1
2.?????Generate SSH keys on “Jenkins-server” by running
“ssh-keygen”
3.?????Now goto “.ssh” folder and there will be public and private key in Jenkins-server.
4.?????Add public key from “Jenkins-server” to “Jenkins-agent-1” under location “.ssh/authorized_keys”
5.?????Now, go to the Jenkins dashboard, and click on “Manage Jenkins”.
6.?????Now, click on “Manage Nodes and Clouds”
7.?????Now, click on “+ New Node”
8.?????Add details of your second node, accordingly.
9.?????Now click on “Ok”, and the node will be connected and online.
10.??Now, go to configurations in your task or project scheduled in Jenkins, and add the Label as same with the name of Node
11.??Click on Save, and your project will be tied to Agent2.
12.??Now, build your project.
13.??Now, the web app will be up and running on “Jenkins-agent-1” and can be accessible via:
<ip of Jenkins agent:8001>