Jenkins Master And Slave Configuration Using AWS EC2 Instance (original) (raw)

Last Updated : 23 Jul, 2025

Optimizing the jenkins performance enhances the scalability by configuring the master-slave architecture using AWS EC2 Instances. Distributed workloads efficiently secures seamless CI/CD process for your projects. In this Article you will guide how to configure jenkins master-slave nodes using AWS EC2 Instances.

What Is Jenkins?

Jenkins is an open-source automation server that facilitates the automation of several stages of the software development lifecycle, including application development, testing, and deployment. Operating within servlet containers like Apache Tomcat, the technology is server-based. Continuous delivery (CD) and Continuous integration (CI) pipelines can be created and managed with Jenkins. The development, testing, and deployment of software applications are automated using CI/CD pipelines. You will be able to release software more regularly and with fewer problems if you do this.

Jenkins Master-Slave Architecture

**Master-Slave Architecture: The diagram shows a Jenkins Master and multiple Jenkins Slaves in a master-slave architecture. In this setup, the Jenkins Master manages and coordinates the execution of jobs across the Jenkins Slaves.

Jenkins- Master Slave Architecture

**Note: There is no need of Jenkins in the slave or worker machine

**Need Of Java In Jenkins Master Node

The Jenkins Master is the central control unit. It manages tasks like:

**Need Of Java In Jenkins Slave Node

Configuring Jenkins Master And Slave Using AWS EC2 Instance

Here we are using Amazon Web Services To achieve Jenkins master's and slave.

**Step 1: Create two EC2 instances and name them as Jenkins Server and Jenkins Node.

**Step 2: In one of the nodes install Jenkins which is going to act as the master node and install Java in the second server which is going to act as the slave or worker node. Establish the SSH to the worker node and create a directory called node1.

Creating a directory

**Step 3: Open Jenkins and click on Manage Jenkins there you will find an option called Manage Nodes and Clouds. Click on that option.

manage nodes and cloud

**Step 4: On the left side you will se an option called new node click on it, there you need to configure all the details of the slave or worker node. In the node name section give the name of the node you want.

 Navigate to + New Node

**Step 5: Configure all the details that have been asked in that section as shown below.

Configuration details of node

**Step 6: Select the launch method as Launch agents via SSH in the host section give the IP addres of the slave or worker node in the creadentials configure you ssh key.

Launching SSH Agent

**Step 7: Know you can see that you salve was online and ready to use it with your projects.

Slave was running

Integration Of Slave Node To Jenkins Project

Follow the steps mentioned below to integrate the jenkins project with the slave.

**Step 1: Click on general and click on ristrict where the project should run ther you will get an drop down named label expression.

node configuration

Conclusion

In this article we have seen that the how to configure the jenkins master and slave this master and slave are widely used in the orgnizations by which it will reduce the load ion the master node and distributes it to the slave nodes.