Changes between Version 55 and Version 56 of SettingUpBuildslave


Ignore:
Timestamp:
09/23/16 08:09:25 (8 years ago)
Author:
Samuli Seppänen
Comment:

More cleanup, not done yet

Legend:

Unmodified
Added
Removed
Modified
  • SettingUpBuildslave

    v55 v56  
    1010* Samuli (mattock on IRC)
    1111
     12'''NOTE:''' The buildslave needs root access to be able to connect to the t_client.sh test servers using OpenVPN. Moreover, anyone who controls the buildmaster can do whatever he wants on the buildslaves by simply modifying the build procedure. For this reason you should only run buildslaves on expendable virtual machines.
     13
    1214= Setting up the VPN connection =
    1315
     
    3436== Getting the OpenVPN configuration file ==
    3537
    36 Buildmaster maintainers will provide you with an OpenVPN configuration with inlined ca.crt and ta.key. You can use pretty much any semi-recent OpenVPN version to connect to the community VPN server.
     38Buildmaster maintainers will provide you with an OpenVPN configuration with inlined ca.crt and ta.key. You can use pretty much any semi-recent OpenVPN version to connect to the community VPN server. Place the configuration file to the usual place, e.g. ''/etc/openvpn/buildslave.conf''.
     39
     40== Enabling OpenVPN on boot ==
     41
     42Non-systemd distros typically blindly launch connections for every ''.conf'' file they find under ''/etc/openvpn''. Thus launching the connection is as simple as
     43
     44{{{
     45$ service openvpn start
     46}}}
     47
     48Systemd distros require extra hacking to enable autostart for a particular VPN connection:
     49
     50{{{
     51$ ln -s /etc/systemd/system/multi-user.target.wants/openvpn@$buildslave.service /usr/lib/systemd/system/openvpn@.service
     52}}}
     53
     54Launching the VPN connection is still fairly straightforward:
     55
     56{{{
     57$ systemctl start openvpn@buildslave
     58}}}
    3759
    3860== Testing OpenVPN connectivity ==
     
    4668= Setting up a buildslave =
    4769
    48 Buildbot versions 0.7.x and 0.8.x are known to work with our current (0.8.5) buildmaster. Buildbot 0.9.x is known _not_ to work.
     70Buildbot versions 0.7.x and 0.8.x are known to work with our current (0.8.5) buildmaster. Buildbot 0.9.x is known _not_ to work. Generic setup instructions are available in the [http://docs.buildbot.net/current the buildbot manual].
    4971
    5072== Common setup tasks ==
     
    6183
    6284This will create a buildslave instance to ''/var/lib/buildbot/slaves/openvpn''. You do ''not'' need to use that directory, but Debian and Ubuntu use it by default, and it seems like a reasonable place on RedHat derivatives as well.
     85
     86The buildslave directory has a *.tac file with the buildbot config, so the settings can be edited later on. You can get the <buildslave-password> from the buildmaster admins.
    6387
    6488=== Starting the buildslave at boot-time ===
     
    76100$ buildslave start /var/lib/buildbot/slaves/openvpn
    77101}}}
    78 to ''/etc/rc.local'' or similar startup script. Yet another option is to make cron test if buildslave is running, and to launch it if it's not.
     102to ''/etc/rc.local'' or similar startup script. Yet another option is to make cron periodically test if buildslave is running, and to launch it if it's not.
    79103
    80104== Installation and setup using distro packages on Debian/Ubuntu ==
     
    99123SLAVE_ENABLED[1]=1
    100124SLAVE_NAME[1]=openvpn
     125# root user is needed, see above
    101126SLAVE_USER[1]=root
    102127SLAVE_BASEDIR[1]=/var/lib/buildbot/slaves/openvpn
     
    123148}}}
    124149
    125 After the install you have to create the buildslave instance as described above in "Setting up a new buildslave instance" section.
     150After the install you have to create the buildslave instance as described above in "Setting up a new buildslave instance" section. Then start the buildslave with
     151
     152{{{
     153$ buildslave start /var/lib/buildbot/slaves/openvpn
     154}}}
    126155
    127156Unfortunately there is no startup script in the buildbot-slave Fedora package, so you will have to create a startup script yourself. See "Starting the buildslave at boot-time" section (above) for details.
     
    143172}}}
    144173
    145 
    146 
    147 You can install any version that is known to be compatible with our buildmaster - see above for details. Once buildslave is installed you can and should switch to an ordinary user account.
    148 
    149 Buildslave configuration is covered thoroughly in the [http://docs.buildbot.net/current the buildbot manual]. Basically you just step through the "Creating a buildslave" section in the buildbot manual except that you could skip step 1 ("Set up the account") because the connectivity tests require root access.
    150 
    151 Step-by-step, the following is needed:
    152 
    153  1. create a user ("buildbot")
    154  1. create a buildslave configuration, in a subdirectory of buildbot's home directory
    155 {{{
    156 user$ sudo su - buildbot
    157 buildbot$ buildslave create-slave ~/build-openvpn 10.177.36.101:9989 <buildbot name> <buildbot pass>
    158 }}}
    159 this will create a subdirectory "build-openvpn/" which has a *.tac file with the buildbot config (so, username, buildmaster, etc. can be edited later on).  {{{ <buildbot-name> }}} and {{{ <buildbot-pass> }}} need to be coordinated with the buildmaster admins (mattock).
    160  4. ensure the community VPN is up (ping 10.177.36.101 works)
    161  1. start the buildslave
    162 {{{
    163 buildbot$ buildslave start ~/build-openvpn
    164 }}}
    165  1. ensure that community VPN and buildslave get started at boot time...
     174You can install any version that is known to be compatible with our buildmaster (see above)
     175
     176Next setup a buildslave instance as described in "Setting up a new buildslave instance", and then start the buildslave:
     177
     178{{{
     179$ buildslave start /var/lib/buildbot/slaves/openvpn
     180}}}
     181
     182Finally you need to ensure that buildslave starts at boot-time; see "Starting the buildslave at boot-time" section, above, for details.
     183
    166184
    167185In case you need to run the buildslave as a limited user you may follow these steps: