ReleaseEngineering/PuppetAgain/Modules/buildslave: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This module installs and sets up the buildslave software. Including ''buildslave'' will do both. | This module installs and sets up the buildslave software. Including ''buildslave'' will do both. | ||
= Requirability = | |||
The ''buildslave'' class can be required, if necessary: | The ''buildslave'' class can be required, if necessary: | ||
| Line 5: | Line 7: | ||
require => Class['buildslave'] | require => Class['buildslave'] | ||
= buildslave::install = | = Embedded Classes = | ||
== buildslave::install == | |||
This class installs the buildbot and buildbot-slave packages in a virtualenv keyed from the version number, with a symlink at ''/tools/buildbot'' denoting the active version. This class embodies the intelligence of what version(s) of Buildbot to install. | This class installs the buildbot and buildbot-slave packages in a virtualenv keyed from the version number, with a symlink at ''/tools/buildbot'' denoting the active version. This class embodies the intelligence of what version(s) of Buildbot to install. | ||
Revision as of 16:01, 11 November 2013
This module installs and sets up the buildslave software. Including buildslave will do both.
Requirability
The buildslave class can be required, if necessary:
require => Class['buildslave']
Embedded Classes
buildslave::install
This class installs the buildbot and buildbot-slave packages in a virtualenv keyed from the version number, with a symlink at /tools/buildbot denoting the active version. This class embodies the intelligence of what version(s) of Buildbot to install.
Internally, it uses buildslave::install::version to install the correct versions, e.g.,
buildslave::install::version {
"0.8.4":
active => false;
"0.8.5":
active => true;
}
This nested class takes an ensure parameter (absent or present) and an active parameter, which if true causes the /tools/buildbot symlink to point to the given version.
Upgrading
To add a new version of buildbot:
- establish the desired version of the buildbot source, on the 'slaves' branch of build/buildbot
- tag it with SLAVE_X_Y_Z_MOZN as appropriate
- add slave/buildslave/VERSION containing the lower-case form, e.g., 3.4.1-moz3. similarly for master/buildslave/VERSION
- run 'setup.py sdist' in the slave/ directory and in the master/ directory
- copy the resulting {master,slave}/dist/buildbot-*.tar.gz into the python-packages directory (see ReleaseEngineering/PuppetAgain/Python)
- add a new case to modules/buildslave/manifests/install/version.pp setting any relevant variables for the install.
- invoke the new case from modules/buildslave/manifests/install.pp
buildslave::startup
This class makes sure that the buildslave will start up appropriately. This class supports a number of different startup techniques:
- initd -- a linux initscript which runs after puppet, and which invokes runslave.py in the proper context
- launchd -- an OS X launchd plist which runs as the logged-in user (hopefully the builder user), and does not start until a sentinel file is touched by the puppet startup script, indicating it is complete.
See ReleaseEngineering/Buildslave_Startup_Process for more details on the startup process.