Skip to main content
Jump to: navigation, search

Jenkins/Connecting JIPP to an external slave

< Jenkins
Revision as of 14:57, 18 March 2016 by (Talk | contribs) (Windows via jnlp)

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/
   echo "Adding pub key to authorized_keys file to log into"
   cat ~/.ssh/ >> ~/.ssh/authorized_keys
   echo "Copy this key to your remote server's ~/.ssh/authorized_keys file"
   cat ~/.ssh/
   echo "Creating config"
   echo "" >> ~/.ssh/config
   echo "Host" >> ~/.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 -i ~/.ssh/id_rsa.cbi netcat %h 22"  >> ~/.ssh/config
   chmod 600 ~/.ssh/config
   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 ; java -jar slave.jar"

Windows via jnlp

To be determined

Back to the top