How to Set Up a Windows Slave Node in Jenkins
Jenkins is a powerful tool for automating build and deployment processes. Setting up a Windows Slave Node in Jenkins allows you to run tasks on a Windows-based machine while managing everything from a central Jenkins Master server. In this guide, we will walk you through the steps needed to configure a Windows Slave Node, ensuring your Jenkins setup is efficient and scalable.

Step 1: Install Jenkins and Set Up Java Development Kit (JDK)
Before proceeding, ensure you have a Windows machine with Jenkins and JDK (version 8 or above) installed. You can download Jenkins and JDK from their respective official websites. After installation, verify that both are properly set up on your system.
Step 2: Set the Environment Variables
After the installation of Jenkins and JDK, set up the environment variables for both. This ensures Jenkins can interact with the JDK, allowing you to execute Java-based tasks.
Step 3: Create a Jenkins Directory on the C Drive
Create a directory named Jenkins on your C:/ drive (e.g., C:/Jenkins). This folder will serve as the workspace for the Jenkins node. Copy the path “C:/Jenkins” for the upcoming configurations.
Step 4: Configure Jenkins Master Node
- In Jenkins, navigate to Manage Jenkins → Configure System.
- Locate the section for the Jenkins Location and update the Master’s IP address. This is crucial for proper communication between the master and slave nodes.
Step 5: Add a New Node to Jenkins
- Go to Manage Jenkins → Manage Nodes.
- Click on New Node, and enter a name for your new slave node, such as Windows_Slave.
- Select the Permanent Agent radio button and click OK.
Step 6: Configure Slave Node Settings
- Node Name: Assign a name for your node, such as “Windows_Slave”.
- Remote Root Directory: Enter the path “C:/Jenkins” (or the path you created earlier).
- Executors: Keep the default value of 1 executor unless you require more.
- Labels: Use labels to group your slave node logically (e.g., “windows”).
- Usage: Select Use this node as much as possible.
- Launch Method: Choose Launch agent via Java Web Start.
Once these fields are completed, click Save to store the configurations.
Step 7: Connect the Windows Slave Node
- After saving, you will see the Windows_Slave node listed under Manage Nodes.
- Click on this node to view the connection instructions.
- Download the agent.jar file to your local machine.
Step 8: Place the agent.jar File on the Slave Node
- Copy the agent.jar file into the C:/Jenkins directory on your Windows slave node.
- Open Command Prompt and navigate to the C:/Jenkins directory.
- Run the command provided on the Jenkins node page to connect the slave node to the master.
Once connected, your Windows slave node will be visible under the Manage Nodes section.
Step 9: Create a Workspace on the Slave Node
- To create a workspace on the slave node, start by creating a Freestyle Project in Jenkins.
- Under the project configuration, check the box Restrict where this project can be run.
- Enter the name of your Windows slave node (e.g., Windows_Slave) or the label you assigned earlier.
- In the Build section, select Execute Windows batch command. This allows you to execute Windows-specific commands within the workspace.
Step 10: Execute Build and Verify the Workspace
- After configuring the necessary build steps, click Save and then Build Now.
- The build process will execute on the Windows slave node, creating a workspace within the designated directory (e.g., C:/Jenkins).
You can now directly view the workspace, tools, and configurations from the C:/Jenkins directory, where Jenkins has executed your tasks.
Conclusion: Simplifying DevOps with Jenkins and ZippyOPS
Setting up a Windows Node in Jenkins helps distribute workloads across different environments, streamlining build and deployment tasks. By using this setup, you can scale your Jenkins pipeline effectively and ensure your builds are completed on the most suitable platform.
If you’re looking for a more comprehensive solution, consider partnering with ZippyOPS. ZippyOPS provides consulting, implementation, and managed services across multiple DevOps domains, including DevOps, DevSecOps, DataOps, and Cloud. Whether you’re integrating AIOps, MLOps, or working with Microservices, ZippyOPS can help you automate and optimize your infrastructure. For more information, explore ZippyOPS services or reach out to sales@zippyops.com.



