wiki:doc/build/AddingBuildSlaves

This page outlines how to add a new build slave to the Tor project's Hudson instance.

There are two prerequisites to running a build slave. You must:

  1. Create a new node in Hudson and give it a name, either by doing it yourself (if you're an admin) or by asking an admin to do it for you
  2. Get an openvpn cert by emailing torproject-admin@… and telling them the name of the machine.
  3. Get a copy of the public key and put it in the ~/.ssh/authorized_keys of the node. For OSX slaves, remove everything but the last ssh-rsa key before putting it in ~/.ssh/authorized_keys.

Linux

  1. Install OpenVPN on the build machine
  2. Put the cert in /etc/openvpn
  3. Create a config file that looks like the following, taking care to replace the pkcs12 XXXX.vpn.hudson.torproject.org.p12 line with the name of your actual certifice, and put it somewhere like /etc/openvpn/hudson.conf:
    remote vpn.hudson.torproject.org 5912
    
    dev tun-hudson
    
    keepalive 30 60
    
    comp-lzo
    verb 3
    mute 10
    
    tls-client
    tls-remote "master.vpn.hudson.torproject.org"
    pull
    
    pkcs12 XXXX.vpn.hudson.torproject.org.p12
    
    comp-lzo
    # comment out on windows:
    user nobody
    group nogroup
    persist-key
    persist-tun
    
  4. Restart OpenVPN (/etc/init.d/openvpn restart) and watch /var/log/syslog. You should see a lot of information about connections and IPs that indicates that the tunnel is working. Try to ping 172.30.30.1.
  5. Open https://hudson.torproject.org/. Find your Agent. Go into the 'configure' screen and change the launch method to 'Launch slave agents on Unix machines via SSH'. The output from ifconfig for your tun device will tell you which IP to use here. Add your username (probably hudson) and the path to the ssh key (/home/hudson/.ssh/id_rsa) and save.
  6. Try launching the slave agent. If it succeeds, you should be able to add jobs for it.

You should now be able to configure new jobs for this build slave.

OS X

  1. Install TunnelBlick on the build machine.
  2. Put the cert in ~/Library/Application Support/TunnelBlick/Configurations/.
  3. Edit openvpn.conf as follows:
    remote vpn.hudson.torproject.org 5912
    
    dev tun
    
    keepalive 30 60
    
    comp-lzo
    verb 3
    mute 10
    
    tls-client
    tls-remote "master.vpn.hudson.torproject.org"
    pull
    
    pkcs12 XXXX.vpn.hudson.torproject.org.p12
    
    comp-lzo
    # comment out on windows:
    user nobody
    group nogroup
    persist-key
    persist-tun
    
  4. Start TunnelBlick. You should see a lot of information about connections and IPs that indicates that the tunnel is working. Try to ping 172.30.30.1.
  5. Open https://hudson.torproject.org/. Find your Agent. Go into the 'configure' screen and change the launch method to 'Launch slave agents on Unix machines via SSH'. The output from ifconfig for your tun device will tell you which IP to use here. Add your username (probably hudson) and save.
  6. Try launching the slave agent. If it succeeds, you should be able to add jobs for it.
  7. Install git from MacPorts.

You should now be able to configure new jobs for this build slave.

Last modified 7 years ago Last modified on Jun 11, 2011, 3:38:09 PM