Skip to content

Commit db77f33

Browse files
committed
Expand/modernize instructions for adding a new worker
1 parent 2733039 commit db77f33

2 files changed

Lines changed: 31 additions & 7 deletions

File tree

README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,35 @@ a `*/15` cron interval using the `update-master` target in `Makefile`.
4747

4848
## Add a worker
4949

50-
The list of workers is stored in `/etc/buildbot/settings.yaml` on the server.
51-
A worker password should be made of 14 characters (a-z, A-Z, 0-9 and special
52-
characters), for example using KeePassX.
50+
To add a worker, people follow the [Devguide](https://devguide.python.org/testing/new-buildbot-worker/)
51+
which directs them to an issue template to fill out.
52+
Make sure you have all the info the template asks for.
5353

54-
* Generate a password
55-
* Add the password in `/etc/buildbot/settings.yaml`
56-
* Restart the buildbot server: `make restart-master`
54+
If the owner did not request a new password (that is, they're reusing one
55+
from an existing worker):
56+
57+
* Make a PR (or ask the new owner to make a PR) that adds the worker to
58+
`master/custom/workers.py`, with the owner username as first component
59+
* Check `/etc/buildbot/settings.yaml` on the server: the email and GitHub
60+
username should match
61+
* Merge the PR
62+
* Watch the logs; wait for Salt to pull the PR and restart the server.
63+
* Close the issue. You're done.
64+
65+
When adding a new owner, or a new worker password for an existing owner,
66+
do the following first:
67+
68+
* Generate a password using e.g.:
69+
70+
import secrets
71+
secrets.token_urlsafe(14)
72+
73+
* Check the username doesn't already exist in `/etc/buildbot/settings.yaml`
74+
* Add an owner entry to `/etc/buildbot/settings.yaml`
75+
* Check the config using `make check` (on the server)
76+
* E-mail the password to the new owner.
77+
* As above: add the worker to `master/custom/workers.py`; merge; restart.
5778

58-
Documentation: http://docs.buildbot.net/current/manual/configuration/workers.html#defining-workers
5979

6080
## Testing changes locally
6181

master/custom/workers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
from custom.worker_downtime import no_builds_between
1212

13+
# List of workers.
14+
# See also: Buildbot worker documentation, http://docs.buildbot.net/current/manual/configuration/workers.html#defining-workers
15+
16+
1317

1418
# By default, the buildmaster sends a simple, non-blocking message to each
1519
# worker every hour. These keepalives ensure that traffic is flowing over the

0 commit comments

Comments
 (0)