Installing a Jenkins slave on a production server
In this section, we will install a Jenkins slave on the production server. This will allow us to perform deployment on the production server. Execute the following steps:
- From the Jenkins dashboard, click on
Manage Jenkins
|Manage Nodes
. - Once on the
Node Manager
page, from the left-hand side menu click onNew Node
. - Give your new Jenkins slave node a name, as shown:
Adding a new Jenkins slave
- On the resultant page, you will be presented with a large number of options. Let us see them one by one.
- For the
Remote root directory
field, add the value/home/jenkins
. - For the
Labels
field, add the valueproduction
. - For the
Usage
field, chooseUse this node as much as possible
. - For the
Launch method
field, choose the optionLaunch slave agents via SSH
. - Under the
Host
field, add the IP address of the production server. - Under the
Credentials
field, choose the credentials that we created in the previous section.
- Leave the rest of the options as they are.
- Once done...