Skip to main content
Jump to: navigation, search

Difference between revisions of "Jenkins/Connecting JIPP to an external slave"

(Windows via jnlp)
(Redirected page to Jenkins)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The Jenkins (JIPP) instances hosted by the Eclipse Foundation are located on a private, non-routable network that can only establish HTTP/S connections to the Internet. To connect your JIPP to an external slave, you'll need to perform some SSH wizardry:
+
#REDIRECT [[Jenkins]]
 
+
 
+
== *NIX and SSH slaves ==
+
 
+
* On your JIPP, create a job that will only run this shell script once. Edit as required.
+
 
+
    ssh-keygen -t rsa -b 4096 -C "CBI genie" -f ~/.ssh/id_rsa.cbi -N ""
+
    chmod 600 ~/.ssh/id_rsa.cbi.pub
+
    echo "Adding pub key to authorized_keys file to log into build.eclipse.org"
+
    cat ~/.ssh/id_rsa.cbi.pub >> ~/.ssh/authorized_keys
+
    echo "Copy this key to your remote server's ~/.ssh/authorized_keys file"
+
    cat ~/.ssh/id_rsa.cbi.pub
+
    echo "Creating config"
+
    echo "" >> ~/.ssh/config
+
    echo "Host build.eclipse.org" >> ~/.ssh/config
+
    echo "StrictHostKeyChecking no" >> ~/.ssh/config
+
    echo "Host external-slave" >> ~/.ssh/config
+
    echo "StrictHostKeyChecking no" >> ~/.ssh/config
+
    echo "IdentityFile ~/.ssh/id_rsa.cbi"  >> ~/.ssh/config
+
    echo "PubkeyAuthentication yes"  >> ~/.ssh/config
+
    echo "ServerAliveInterval 60"  >> ~/.ssh/config
+
    echo "ProxyCommand ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa.cbi build.eclipse.org netcat %h 22"  >> ~/.ssh/config
+
    chmod 600 ~/.ssh/config
+
    echo
+
    echo "Finished setting up SSH config"
+
    cat ~/.ssh/config
+
 
+
* Copy the public key that appears in the console to the authorized_keys file of the remote server, as instructed.
+
* In Jenkins' management, create a new slave node. Choose the option to "Launch slave via execution of command on Master".
+
 
+
* Use this command, replacing (projectname) with the name of your project and username with the external username. Sadly, I cannot get bash ~ or $HOME here.  If you want to make sure the slave jar is always the same version as the slave, make sure you use the slave jar available from your JIPP instance.
+
 
+
    ssh -C -i /opt/public/hipp/homes/genie.(projectname)/.ssh/id_rsa.cbi username@external-slave "wget -qO slave.jar https://ci.eclipse.org/cbi/jnlpJars/slave.jar ; java -jar slave.jar"
+
 
+
== Windows via jnlp ==
+
 
+
To be determined, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=490701 bug 490701]. SSH also works if OpenSSH/Cygwin is installed on the Windows host.
+

Latest revision as of 12:21, 7 November 2018

Redirect to:

Copyright © Eclipse Foundation, Inc. All Rights Reserved.