Skip to content

Commit e981fd6

Browse files
committed
Rewrite Linux installation tab with per-distro nested tabs
1 parent 97ab6db commit e981fd6

File tree

1 file changed

+136
-10
lines changed

1 file changed

+136
-10
lines changed

testing/new-buildbot-worker.rst

Lines changed: 136 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,144 @@ the steps below as appropriate if you choose that path.
7272

7373
.. tab:: Linux
7474

75-
* If your package manager provides the buildbot worker software, that is
76-
probably the best way to install it; it may create the buildbot user for
77-
you, in which case you can skip the next step. Otherwise, do ``pip install
78-
buildbot-worker`` or ``pip3 install buildbot-worker``.
79-
* Create a ``buildbot`` user (using, eg: ``useradd``) if necessary.
80-
* Log in as the buildbot user.
75+
.. tab:: Fedora / RHEL / CentOS
8176

82-
In a terminal window for the buildbot user, issue the following commands (you
83-
can put the ``buildarea`` wherever you want to)::
77+
**Fedora**::
8478

85-
mkdir buildarea
86-
buildbot-worker create-worker buildarea buildbot-api.python.org:9020 workername workerpasswd
79+
dnf install buildbot-worker
80+
81+
**RHEL 8** (requires EPEL)::
82+
83+
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
84+
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
85+
dnf install buildbot-worker
86+
87+
**RHEL 9** (requires EPEL)::
88+
89+
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
90+
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
91+
dnf install buildbot-worker
92+
93+
**CentOS Stream 9 / 10** (requires CRB + EPEL)::
94+
95+
dnf config-manager --set-enabled crb
96+
dnf install epel-release epel-next-release
97+
dnf install buildbot-worker
98+
99+
The RPM creates a ``buildbot-worker`` system user (nologin shell, home
100+
at ``/var/lib/buildbot/worker``), installs a templated systemd unit
101+
``buildbot-worker@.service``, and creates ``/var/lib/buildbot/worker/``.
102+
103+
Create the worker (replace ``WORKERNAME`` and ``WORKERPASSWD`` with
104+
the credentials provided to you from your buildmaster-config issue)::
105+
106+
sudo -u buildbot-worker buildbot-worker create-worker \
107+
/var/lib/buildbot/worker/WORKERNAME \
108+
buildbot-api.python.org:9020 WORKERNAME WORKERPASSWD
109+
110+
Edit ``info/admin``, ``info/host``, and ``buildbot.tac`` in the worker
111+
directory (see below for recommended settings).
112+
113+
Enable and start the service::
114+
115+
systemctl enable --now buildbot-worker@WORKERNAME.service
116+
117+
.. tab:: Debian / Ubuntu
118+
119+
::
120+
121+
apt install buildbot-worker
122+
123+
The package creates a ``buildbot`` system user, installs a templated
124+
systemd unit ``buildbot-worker@.service``, and creates
125+
``/var/lib/buildbot/workers/``.
126+
127+
Create the worker (replace ``WORKERNAME`` and ``WORKERPASSWD`` with
128+
the credentials provided to you from your buildmaster-config issue)::
129+
130+
sudo -u buildbot buildbot-worker create-worker \
131+
/var/lib/buildbot/workers/WORKERNAME \
132+
buildbot-api.python.org:9020 WORKERNAME WORKERPASSWD
133+
134+
Edit ``info/admin``, ``info/host``, and ``buildbot.tac`` in the worker
135+
directory (see below for recommended settings).
136+
137+
Enable and start the service::
138+
139+
systemctl enable --now buildbot-worker@WORKERNAME.service
140+
141+
.. tab:: FreeBSD
142+
143+
::
144+
145+
pkg install devel/py-buildbot-worker
146+
147+
The port creates a ``buildbot`` system user (nologin shell, home at
148+
``/var/db/buildbot``) and installs an ``rc.d`` script at
149+
``/usr/local/etc/rc.d/buildbot-worker`` with profile support.
150+
The default base directory is ``/var/db/buildbot/workers``.
151+
152+
Create the worker (replace ``WORKERNAME`` and ``WORKERPASSWD`` with
153+
the credentials provided to you from your buildmaster-config issue)::
154+
155+
su -m buildbot -c "buildbot-worker create-worker \
156+
/var/db/buildbot/workers/WORKERNAME \
157+
buildbot-api.python.org:9020 WORKERNAME WORKERPASSWD"
158+
159+
Edit ``info/admin``, ``info/host``, and ``buildbot.tac`` in the worker
160+
directory (see below for recommended settings).
161+
162+
Enable and start the service. The rc.d script uses profile names as
163+
shell variable identifiers, so pick a short name without hyphens
164+
(it does not need to match the worker name)::
165+
166+
sysrc buildbot_worker_enable=YES
167+
sysrc buildbot_worker_profiles="myworker"
168+
sysrc buildbot_worker_myworker_enable=YES
169+
sysrc buildbot_worker_myworker_basedir=/var/db/buildbot/workers/WORKERNAME
170+
service buildbot-worker start
171+
172+
.. tab:: Other / pip
173+
174+
For distros without a ``buildbot-worker`` package, install via pip::
175+
176+
pip install buildbot-worker
177+
178+
**NixOS** users should use the built-in ``services.buildbot-worker``
179+
NixOS module; see the
180+
`nixpkgs module source <https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/continuous-integration/buildbot/worker.nix>`__
181+
for available options.
182+
183+
**Arch Linux** has buildbot packages in the AUR, but they are
184+
currently unmaintained. Using pip is more reliable.
185+
186+
pip does **not** create a system user, directories, or service unit.
187+
Set these up manually. On distros with ``useradd``::
188+
189+
useradd --system --shell /sbin/nologin \
190+
--home-dir /var/lib/buildbot/worker --create-home buildbot-worker
191+
192+
On Alpine Linux (BusyBox)::
193+
194+
adduser -S -D -H -h /var/lib/buildbot/worker -s /sbin/nologin buildbot-worker
195+
196+
Then create the directories::
197+
198+
mkdir -p /var/lib/buildbot/worker
199+
chown buildbot-worker:buildbot-worker /var/lib/buildbot/worker
200+
201+
Create the worker (replace ``WORKERNAME`` and ``WORKERPASSWD`` with
202+
the credentials provided to you from your buildmaster-config issue)::
203+
204+
sudo -u buildbot-worker buildbot-worker create-worker \
205+
/var/lib/buildbot/worker/WORKERNAME \
206+
buildbot-api.python.org:9020 WORKERNAME WORKERPASSWD
207+
208+
Edit ``info/admin``, ``info/host``, and ``buildbot.tac`` in the worker
209+
directory (see below for recommended settings).
210+
211+
On systemd-based distros, a service unit must also be installed; see
212+
the service management section below.
87213

88214

89215
.. tab:: macOS

0 commit comments

Comments
 (0)