Skip to main content
Jump to: navigation, search

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

(Windows via jnlp)
Line 21: Line 21:
 
     echo "PubkeyAuthentication yes"  >> ~/.ssh/config
 
     echo "PubkeyAuthentication yes"  >> ~/.ssh/config
 
     echo "ServerAliveInterval 60"  >> ~/.ssh/config
 
     echo "ServerAliveInterval 60"  >> ~/.ssh/config
     echo "ProxyCommand ssh -i ~/.ssh/id_rsa.cbi build.eclipse.org netcat %h 22"  >> ~/.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
 
     chmod 600 ~/.ssh/config
 
     echo  
 
     echo  

Revision as of 18:07, 5 November 2016

The Hudson (HIPP) instances hosted by the Eclipse Foundation are located on a private, non-routable network that cannot establish connections to the Internet (except http/s downloads using Proxy). To connect your HIPP to an external slave, you'll need to perform some SSH wizardry:


*NIX and SSH slaves

  • On your HIPP, 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 Hudson's 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 hse the slave jar available from your HIPP instance.
   ssh -C -i /opt/public/hipp/homes/genie.(projectname)/.ssh/id_rsa.cbi username@external-slave "wget -qO slave.jar https://hudson.eclipse.org/cbi/jnlpJars/slave.jar ; java -jar slave.jar"

Windows via jnlp

To be determined, see bug 490701

Back to the top