ReleaseEngineering/PuppetAgain/Modules/generic worker

From MozillaWiki
Jump to: navigation, search

This module is currently only supported on macOS. It installs and configures Generic Worker for executing TaskCluster tasks.

Windows

For deploying generic-worker on Windows, see Open Cloud Config repository. In particular, for deploying on hardware on Windows, see PRs #53, #67, #78.

macOS

A service called net.generic.worker will be created from a launch agent installed at:

/Library/LaunchAgents/net.generic.worker.plist

The main script which executes the worker is installed at:

/usr/local/bin/run-generic-worker.sh

This in turn calls the go binary, located at:

/usr/local/bin/generic-worker

The configuration file is generated and installed at:

/etc/generic-worker.config

The worker will execute tasks from the following working directory:

/Users/cltbld

It will only start, once this file is created (the name is a legacy from buildbot days):

/var/tmp/semaphore/run-buildbot

Currently, the worker is configured to run as follows:

1) tasks will be run as the cltbld user, rather than creating per-task users like it typically does on Windows 2) after each task run, the machine will be rebooted by /usr/local/bin/run-generic-worker.sh

The above linked generic worker github repository has a README.md explaining all config options, should you wish to change them. Note, they can also be seen by executing:

generic-worker --help

In order to have a full understanding of the complete responsibilities and activities of the worker, it is only necessary to read the --help, view the worker configuration, and read the run-generic-worker.sh script which is specific to this puppet repo (i.e. is different to the run script we would use in AWS EC2, for example).

Upgrading the generic worker binary

Note, the generic_worker binary itself comes from the generic_worker package. This short package file documents where to download the binaries from, where to install them to, and which version number should be used.