DevOps(Day-37) : Setup a Jenkins Agent in Master (Part-2)

  • Log in to the Agent server and generate the ssh key by running the below command.

    ssh-keygen

  • Take the ssh key from the id_rsa.pub file and paste it into the authorized_keys folder of the Master server.

  • Navigate to the Master server Jenkins page and click on Manage Jenkins and then Manage Nodes and Cloud.

  • Click on the new node to edit the configuration.

  • Provide the configuration details as shown below.

  • In the Launch method section Hostname should be the agent public Ip and the credential should be the key generated in the agent server as mentioned in the above step.

    Click on Save.

  • Verify its status under the "Nodes" section.

Let's configure the node-to-app to a new agent.

  • Let's navigate to the todo project and select Configure. Provide agent name as shown below.

  • Click save and build now.

  • Check the console output of the pipeline.

  • Navigate to the URL and check.

    We have seen the application of the Master-Slave configuration.

    Thanks for reading my article. Have a nice day.

Comments

Popular posts from this blog

DevOps(Day-97): Meta-Arguments in Terraform

DevOps(Day-95): Auto Scaling with Terraform

DevOps (Day-1) Introduction