Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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

Line 1: Line 1:
The Hudson (HIPP) 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 HIPP to an external slave, you'll need to perform some SSH wizardry:
+
The Hudson/Jenkins (HIPP/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:
  
  
 
== *NIX and SSH slaves ==
 
== *NIX and SSH slaves ==
  
* On your HIPP, create a job that will only run this shell script once. Edit as required.
+
* 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 ""
 
     ssh-keygen -t rsa -b 4096 -C "CBI genie" -f ~/.ssh/id_rsa.cbi -N ""
Line 30: Line 30:
  
 
* Copy the public key that appears in the console to the authorized_keys file of the remote server, as instructed.
 
* 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".
+
* 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 hse the slave jar available from your HIPP instance.
+
* 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://hudson.eclipse.org/cbi/jnlpJars/slave.jar ; java -jar slave.jar"
+
     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 ==
 
== Windows via jnlp ==
  
 
To be determined, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=490701 bug 490701]
 
To be determined, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=490701 bug 490701]

Revision as of 10:41, 23 November 2017

The Hudson/Jenkins (HIPP/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:


*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 bug 490701

Back to the top