Jenkins master with SSH Slaves

Add new credential with ssh private key. Creation of this private key described in the github repository. Go to the Jenkins main menu -> Press Credentials -> (global)
add-ssh-key-tos-laves

Press Add Credentials -> Select SSH Username with private key -> Enter username jenkins -> Select Private key and enter Key from github repo folder -> Enter ID and Description and press OK button
insert-keys-to-jenkins

Go to the Jenkins main menu -> Manage Jenkins -> Manage Nodes -> Then press New Node
add-new-jenkins-node.png

Enter name of slave and select Permanent Agent and then press OK button
enter-name-of-node.png

Enter some name and Description -> Select execution count -> Enter home directory for Jenkins which we created from provisioning code -> Enter label name for this slave server -> Execute this slave when selected this label ‘sshslaves‘ -> Launch via SSH -> Enter slave IP address -> auto accept key and press Save button
enter-node-credentials.png

Go to create new Jenkins slave node 2. But this time copy from the first one.
copy-from-first-node.png

Change Description, IP address, and press to Save button:
change-copied-node-content

Look at the node list:
list-of-sshnodes

Create some project and test result. Enter label expression to filter in which slaves this job will b executed.
ADD-FS-Project.png

Add some Shell execution command
exec-some-shell-command.png

Result of the execution of command:
result-of-the-command-exec.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s