Changes between Version 55 and Version 56 of SettingUpBuildslave
- Timestamp:
- 09/23/16 08:09:25 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SettingUpBuildslave
v55 v56 10 10 * Samuli (mattock on IRC) 11 11 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 12 14 = Setting up the VPN connection = 13 15 … … 34 36 == Getting the OpenVPN configuration file == 35 37 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. 38 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. Place the configuration file to the usual place, e.g. ''/etc/openvpn/buildslave.conf''. 39 40 == Enabling OpenVPN on boot == 41 42 Non-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 48 Systemd 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 54 Launching the VPN connection is still fairly straightforward: 55 56 {{{ 57 $ systemctl start openvpn@buildslave 58 }}} 37 59 38 60 == Testing OpenVPN connectivity == … … 46 68 = Setting up a buildslave = 47 69 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. 70 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. Generic setup instructions are available in the [http://docs.buildbot.net/current the buildbot manual]. 49 71 50 72 == Common setup tasks == … … 61 83 62 84 This 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 86 The 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. 63 87 64 88 === Starting the buildslave at boot-time === … … 76 100 $ buildslave start /var/lib/buildbot/slaves/openvpn 77 101 }}} 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.102 to ''/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. 79 103 80 104 == Installation and setup using distro packages on Debian/Ubuntu == … … 99 123 SLAVE_ENABLED[1]=1 100 124 SLAVE_NAME[1]=openvpn 125 # root user is needed, see above 101 126 SLAVE_USER[1]=root 102 127 SLAVE_BASEDIR[1]=/var/lib/buildbot/slaves/openvpn … … 123 148 }}} 124 149 125 After the install you have to create the buildslave instance as described above in "Setting up a new buildslave instance" section. 150 After 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 }}} 126 155 127 156 Unfortunately 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. … … 143 172 }}} 144 173 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... 174 You can install any version that is known to be compatible with our buildmaster (see above) 175 176 Next 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 182 Finally you need to ensure that buildslave starts at boot-time; see "Starting the buildslave at boot-time" section, above, for details. 183 166 184 167 185 In case you need to run the buildslave as a limited user you may follow these steps: