Adding Slave Servers (non-win)

About

This article will cover how to add a slave server.  This will not cover how to add windows based slaves.  It will also have a EC2 server in mind but can be applied to any non-windows server.

Prerequisites

First off you will want your new slave server to have ssh access (port 22).

Setup Steps

Slave Machine

# init: [Slave] Create Account for Autobuild

slave:~$ sudo adduser jenkins master

 

# Step 1: Create private key and public key

slave:~$ ssh-keygen -t rsa -C "The access key for the slave"

(note: Enter passphrase)

Output:

private key: id_rsa         # copy to master

public key: id_rsa.pub    # copy to slave (.ssh/authorized_keys)

 

# Step 2: Setup Authorized key

slave:~$ cat id_rsa.pub > ~/.ssh/authorized_keys

 

Jenkins Master Machine

# Step 3: Setup the Credential key

[Manage Jenkins] -> [Manage Credential] -> [Add Credentials]:

Select: SSH Username with private key

Info

# you are on the slave

(a) copy the private key

   slave:~$ cd .ssh;cat id_rsa    

 

# you are on the Jenkins master

(b) paste to the jenkins master board

     Private key:

     Enter directly: <private key ascii>




# Step 4: Create Node

[Manage Jenkins] -> [Manage Node] -> [New Node]

 

Info

Remote FS root: <jenkins home>

Host: <slave ip>

Credentials: <select credentials>

 

This was adapted from the guide found at https://docs.google.com/document/d/1Qq-EkiUnC5x8BuM4AZWo-yRUQTrkberzz8JfdCM6yuc/edit

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk