Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

[![Check config](https://github.com/python/buildmaster-config/actions/workflows/check.yml/badge.svg)](https://github.com/python/buildmaster-config/actions/workflows/check.yml)

> [!NOTE]
> This README has instructions for Buildbot administrators.
> User guides are in the Devguide:
> - [Working with buildbots](https://devguide.python.org/testing/buildbots/)
> - [New buildbot workers](https://devguide.python.org/testing/new-buildbot-worker/)


## Private settings

The production server uses /etc/buildbot/settings.yaml configuration file which
Expand Down Expand Up @@ -47,15 +54,35 @@ a `*/15` cron interval using the `update-master` target in `Makefile`.

## Add a worker

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

If the owner did not request a new password (that is, they're reusing one

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a highlight or !NOTE that following applies only the buildbot master administrators, not everyone.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.
Pretty much all the README is aimed at administrators, so I added the note at the top.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. didn't realize this. I thought it was part of the devguide.

from an existing worker):

* Make a PR (or ask the new owner to make a PR) that adds the worker to
`master/custom/workers.py`, with the owner username as first component.
* Check `/etc/buildbot/settings.yaml` on the server: the email and GitHub
username should match.
* Merge the PR.
* Watch the logs; wait for Salt to pull the PR and restart the server.
* Close the issue. You're done.

When adding a new owner, or a new worker password for an existing owner,
do the following first:

* Generate a password using e.g.:

import secrets
print(secrets.token_urlsafe(14))

* Generate a password
* Add the password in `/etc/buildbot/settings.yaml`
* Restart the buildbot server: `make restart-master`
* Check the username doesn't already exist in `/etc/buildbot/settings.yaml`.
* Add an owner entry to `/etc/buildbot/settings.yaml`.
* Check the config using `make check` (on the server).
* E-mail the password to the new owner.
* As above: add the worker to `master/custom/workers.py`; merge; restart.

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

## Testing changes locally

Expand Down
4 changes: 4 additions & 0 deletions master/custom/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

from custom.worker_downtime import no_builds_between

# List of workers.
# See also: Buildbot worker documentation, http://docs.buildbot.net/current/manual/configuration/workers.html#defining-workers



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