Setup Jenkins Master Slave Configuration on AWS

Learn how to setup Jenkins master slave configuration on AWS

Setup Jenkins Master Slave Configuration on AWS

In this tutorial, we will learn how to setup Jenkins Master Slave configuration in AWS EC2 server.


Prerequisites:

1. Launch 2 AWS EC2 Linux instances (Follow Here).

2. Configure Jenkins on an EC2 Linux instance which will act as Master Node (Follow Here).

3. Second EC2 Linux Server will act as a Slave Node for Jenkins.

Configure Jenkins Slave Node:

Create user, ssh keys and copy it to authorized_keys.

Configure Jenkins Master Node:

Copy the slave node’s public key to master node’s known_hosts file.

Configure New Node in Jenkins:

1. Click on Manage Jenkins.

2. Click on Manage Nodes and Clouds

3. Click on New Node

4. Enter Node name and select Permanent Agent. Click OK

5. Enter node configuration details as shown below.

6. In Credentials, Click Add -> Jenkins

7. In Add Credentials, choose kind as “SSH Username with private key”8. In Username field, enter the same username which we created on Slave Node – jenkins-slave19. In Private Key, choose Enter directly

10. Go to Slave EC2 server and copy the private key.

       sudo su - jenkins-slave1
       cd .ssh
       more id_rsa
11. Paste the key in the Private key field in Jenkins.12. Click on Add.13. In the Node Configuration page choose the new credential.14. Click on Save.

15. Click on the new node (slave1) and select “log”.

16. “Agent successfully connected and online” is displayed in the logs.


Bijan Patel
Full Stack Test Automation Expert | Selenium Framework Developer | Certified Tosca Automation Specialist | Postman | DevOps | AWS | IC Agile Certified | Trainer | Youtuber | Blogger|

Launch your GraphyLaunch your Graphy
100K+ creators trust Graphy to teach online
𝕏
QASCRIPT 2024 Privacy policy Terms of use Contact us Refund policy