Skip to content

Commit 766ccd6

Browse files
levlazzware
authored andcommitted
Adjust buildworker (buildslave) page for a Buildbot 0.9.x world (GH-291)
Fixes GH-290. Also makes linkcheck play nicely with the new buildbot.python.org.
1 parent 84224ae commit 766ccd6

File tree

4 files changed

+80
-73
lines changed

4 files changed

+80
-73
lines changed

buildbots.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Continuous Integration
77

88
To assert that there are no regressions in the :doc:`development and maintenance
99
branches <devcycle>`, Python has a set of dedicated machines (called *buildbots*
10-
or *build slaves*) used for continuous integration. They span a number of
10+
or *build workers*) used for continuous integration. They span a number of
1111
hardware/operating system combinations. Furthermore, each machine hosts
1212
several *builders*, one per active branch: when a new change is pushed
1313
to this branch on the public Mercurial repository, all corresponding builders
@@ -209,7 +209,7 @@ Custom builders
209209
When working on a platform-specific issue, you may want to test your changes on
210210
the buildbot fleet rather than just on Travis and AppVeyor. To do so, you can
211211
make use of the `custom builders
212-
<http://buildbot.python.org/all/waterfall?category=custom.stable&category=custom.unstable>`_.
212+
<http://buildbot.python.org/all/#/builders?tags=custom.unstable&tags=custom.stable>`_.
213213
These builders track the ``buildbot-custom`` short-lived branch of the
214214
``python/cpython`` repository, which is only accessible to core developers.
215215

@@ -233,4 +233,4 @@ recommend you change (temporarily, of course) the contents of the
233233
the ``Tools/buildbot/test.bat`` script.
234234

235235
.. seealso::
236-
:ref:`buildslave`
236+
:ref:`buildworker`

buildslave.rst renamed to buildworker.rst

+67-69
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11

2-
.. _buildslave:
2+
.. _buildworker:
33

4-
Running a buildslave
5-
====================
4+
Running a buildbot worker
5+
=========================
66

77
.. highlight:: bash
88

99
Python's :ref:`buildbots` system was discussed earlier. We sometimes refer to
10-
the collection of *build slaves* as our "buildbot fleet". The machines that
10+
the collection of *build workers* as our "buildbot fleet". The machines that
1111
comprise the fleet are voluntarily contributed resources. Many are run by
1212
individual volunteers out of their own pockets and time, while others are
1313
supported by corporations. Even the corporate sponsored buildbots, however,
1414
tend to exist because some individual championed them, made them a reality, and
1515
is committed to maintaining them.
1616

1717
Anyone can contribute a buildbot to the fleet. This chapter describes how
18-
to go about setting up a buildslave, getting it added, and some hints about
18+
to go about setting up a buildbot worker, getting it added, and some hints about
1919
buildbot maintenance.
2020

2121
Anyone running a buildbot that is part of the fleet should subscribe to the
@@ -24,18 +24,18 @@ mailing list. This mailing list is also the place to contact if you want to
2424
contribute a buildbot but have questions.
2525

2626
As for what kind of buildbot to run...take a look at our `current fleet
27-
<http://buildbot.python.org/all/buildslaves>`_. Pretty much anything that isn't
27+
<http://buildbot.python.org/all/#/workers>`_. Pretty much anything that isn't
2828
on that list would be interesting: different Linux/UNIX distributions,
2929
different versions of the various OSes, other OSes if you or someone are
3030
prepared to make the test suite actually pass on that new OS. Even if you only
3131
want to run an OS that's already on our list there may be utility in setting it
32-
up: we also need to build and test python under various alternate build
32+
up; we also need to build and test python under various alternate build
3333
configurations. Post to the mailing list and talk about what you'd like to
3434
contribute.
3535

3636

37-
Preparing for buildslave setup
38-
------------------------------
37+
Preparing for buildbot worker setup
38+
-----------------------------------
3939

4040
Since the goal is to build Python from source, the system will need to have
4141
everything required to do normal python development: a compiler, a linker, and
@@ -45,33 +45,33 @@ everything required to do normal python development: a compiler, a linker, and
4545
compiled python.
4646

4747
In order to set up the buildbot software, you will need to obtain an identifier
48-
and password for your buildslave so it can join the fleet. Email
49-
[email protected] to discuss adding your buildslave and to obtain the
50-
needed slavename and password. You can do some of the steps that follow
48+
and password for your worker so it can join the fleet. Email
49+
[email protected] to discuss adding your worker and to obtain the
50+
needed workername and password. You can do some of the steps that follow
5151
before having the credentials, but it is easiest to have them before
52-
the "buildslave" step below.
52+
the "buildbot worker" step below.
5353

5454

55-
Setting up the buildslave
56-
-------------------------
55+
Setting up the buildbot worker
56+
------------------------------
5757

5858
Conventional always-on machines
5959
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060

6161
You need a recent version of the `buildbot <http://buildbot.net/>`_ software,
6262
and you will probably want a separate 'buildbot' user to run the buildbot
6363
software. You may also want to set the buildbot up using a virtual
64-
environment, depending on you manage your system. We won't cover how to that
64+
environment, depending on how you manage your system. We won't cover how to that
6565
here; it doesn't differ from setting up a virtual environment for any other
6666
software, but you'll need to modify the sequence of steps below as appropriate
6767
if you choose that path.
6868

6969
For Linux:
7070

71-
* If your package manager provides the buildbot slave software, that is
71+
* If your package manager provides the buildbot worker software, that is
7272
probably the best way to install it; it may create the buildbot user for
7373
you, in which case you can skip that step. Otherwise, do ``pip install
74-
buildbot-slave``.
74+
buildbot-worker``.
7575
* Create a ``buildbot`` user (using, eg: ``useradd``) if necessary.
7676
* Log in as the buildbot user.
7777

@@ -80,42 +80,40 @@ For Mac:
8080
* Create a buildbot user using the OS/X control panel user admin. It
8181
should be a "standard" user.
8282
* Log in as the buildbot user.
83-
* Install either the Python 2.7 bundle from python.org [#]_, or pip.
84-
* Open a terminal window.
85-
* Execute ``pip install buildbot-slave``.
83+
* Install the buildbot worker [#]_ by running ``pip install buildbot-worker``.
8684

8785
For Windows:
8886

8987
* Create a buildbot user as a "standard" user.
9088
* Install the latest version of Python 2.7 from python.org.
9189
* Open a Command Prompt.
92-
* Execute ``python -m pip install pypiwin32 buildbot-slave`` (note that
90+
* Execute ``python -m pip install pypiwin32 buildbot-worker`` (note that
9391
``python.exe`` is not added to ``PATH`` by default, making the
9492
``python`` command accessible is left as an exercise for the user).
9593

9694
In a terminal window for the buildbot user, issue the following commands (you
9795
can put the ``buildarea`` wherever you want to)::
9896

9997
mkdir buildarea
100-
buildslave create-slave buildarea buildbot.python.org:9020 slavename slavepasswd
98+
buildbot-worker create-worker buildarea buildbot.python.org:9020 workername workerpasswd
10199

102-
(Note that on Windows, the ``buildslave`` command will be in the
100+
(Note that on Windows, the ``buildbot-worker`` command will be in the
103101
:file:`Scripts` directory of your Python installation.)
104102

105-
Once this initial slave setup completes, you should edit the files
103+
Once this initial worker setup completes, you should edit the files
106104
``buildarea/info/admin`` and ``buildarea/info/host`` to provide your contact
107105
info and information on the host configuration, respectively. This information
108106
will be presented in the buildbot web pages that display information about the
109-
builders running on your buildslave.
107+
builders running on your worker.
110108

111-
You will also want to make sure that the buildslave is started when the
109+
You will also want to make sure that the worker is started when the
112110
machine reboots:
113111

114112
For Linux:
115113

116114
* Add the following line to ``/etc/crontab``::
117115

118-
@reboot buildslave restart /path/to/buildarea
116+
@reboot buildbot-worker restart /path/to/buildarea
119117

120118
Note that we use ``restart`` rather than ``start`` in case a crash has
121119
left a ``twistd.pid`` file behind.
@@ -126,13 +124,13 @@ For OSX:
126124

127125
mkdir bin
128126

129-
* Place the following script, named ``run_slave.sh``, into that directory::
127+
* Place the following script, named ``run_worker.sh``, into that directory::
130128

131129
#!/bin/bash
132130
export PATH=/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
133131
export LC_CTYPE=en_US.utf-8
134132
cd /Users/buildbot/buildarea
135-
twistd --nodaemon --python=buildbot.tac --logfile=buildbot.log --prefix=slave
133+
twistd --nodaemon --python=buildbot.tac --logfile=buildbot.log --prefix=worker
136134

137135
If you use pip with Apple's system python, add '/System' to the front of
138136
the path to the Python bin directory.
@@ -147,14 +145,14 @@ For OSX:
147145
<plist version="1.0">
148146
<dict>
149147
<key>Label</key>
150-
<string>net.buildbot.slave</string>
148+
<string>net.buildbot.worker</string>
151149
<key>UserName</key>
152150
<string>buildbot</string>
153151
<key>WorkingDirectory</key>
154152
<string>/Users/buildbot/buildarea</string>
155153
<key>ProgramArguments</key>
156154
<array>
157-
<string>/Users/buildbot/bin/run_slave.sh</string>
155+
<string>/Users/buildbot/bin/run_worker.sh</string>
158156
</array>
159157
<key>StandardOutPath</key>
160158
<string>twistd.log</string>
@@ -167,27 +165,27 @@ For OSX:
167165
</dict>
168166
</plist>
169167
170-
The recommended name for the file is ``net.buildbot.slave``.
168+
The recommended name for the file is ``net.buildbot.worker``.
171169

172170
For Windows:
173171

174-
* Add a Scheduled Task to run ``buildslave start buildarea`` as the
172+
* Add a Scheduled Task to run ``buildbot-worker start buildarea`` as the
175173
buildbot user "when the computer starts up". It is best to provide
176-
absolute paths to the ``buildslave`` command and the :file:`buildarea`
174+
absolute paths to the ``buildbot-worker`` command and the :file:`buildarea`
177175
directory. It is also recommended to set the task to run in the
178176
directory that contains the :file:`buildarea` directory.
179177

180-
* Alternatively (note: don't do both!), set up the buildslave
178+
* Alternatively (note: don't do both!), set up the worker
181179
service as described in the `buildbot documentation
182180
<http://trac.buildbot.net/wiki/RunningBuildbotOnWindows#Service>`_.
183181

184-
To start the buildslave running for your initial testing, you can do::
182+
To start the worker running for your initial testing, you can do::
185183

186-
buildslave start buildarea
184+
buildbot-worker start buildarea
187185

188186
Then you can either wait for someone to make a commit, or you can pick a
189-
builder associated with your buildslave from the `list of builders
190-
<http://buildbot.python.org/all/buildslaves>`_ and force a build.
187+
builder associated with your worker from the `list of builders
188+
<http://buildbot.python.org/all/#/builders>`_ and force a build.
191189

192190
In any case you should initially monitor builds on your builders to make sure
193191
the tests are passing and to resolve any platform issues that may be revealed
@@ -196,19 +194,19 @@ only of failures on your builders, so doing periodic spot checks is also a good
196194
idea.
197195

198196

199-
Latent slaves
200-
^^^^^^^^^^^^^
197+
Latent workers
198+
^^^^^^^^^^^^^^
201199

202-
We also support running `latent buildslaves
203-
<http://docs.buildbot.net/current/manual/cfg-buildslaves.html#latent-buildslaves>`_
204-
on the AWS EC2 service. To set up such a slave:
200+
We also support running `latent workers
201+
<http://docs.buildbot.net/current/manual/cfg-workers.html#latent-workers>`_
202+
on the AWS EC2 service. To set up such a worker:
205203

206204
* Start an instance of your chosen base AMI and set it up as a
207-
conventional slave.
208-
* After the instance is fully set up as a conventional slave (including
209-
slave name and password, and admin and host information), create an AMI
205+
conventional worker.
206+
* After the instance is fully set up as a conventional worker (including
207+
worker name and password, and admin and host information), create an AMI
210208
from the instance and stop the instance.
211-
* Contact the buildmaster administrator who gave you your slave
209+
* Contact the buildmaster administrator who gave you your worker
212210
name and password and give them the following information:
213211

214212
* Instance size (such as ``m4.large``)
@@ -221,63 +219,63 @@ on the AWS EC2 service. To set up such a slave:
221219
The buildmaster cannot guarantee that it will always shut down your
222220
instance(s), so it is recommended to periodically check and make sure
223221
there are no "zombie" instances running on your account, created by the
224-
buildbot master. Also, if you notice that your slave seems to have been
222+
buildbot master. Also, if you notice that your worker seems to have been
225223
down for an unexpectedly long time, please ping the `python-buildbots
226224
<https://mail.python.org/mailman/listinfo/python-buildbots>`_ list to
227225
request that the master be restarted.
228226

229-
Latent slaves should also be updated periodically to include operating system
230-
or other software updates, but when do do such maintenance is largely up to you
231-
as the slave owner. There are a couple different options for doing such
227+
Latent workers should also be updated periodically to include operating system
228+
or other software updates, but when to do such maintenance is largely up to you
229+
as the worker owner. There are a couple different options for doing such
232230
updates:
233231

234232
* Start an instance from your existing AMI, do updates on that instance,
235233
and save a new AMI from the updated instance. Note that (especially for
236-
Windows slaves) you should do at least one restart of the instance after
234+
Windows workers) you should do at least one restart of the instance after
237235
doing updates to be sure that any post-reboot update work is done before
238236
creating the new AMI.
239237
* Create an entirely new setup from a newer base AMI using your existing
240-
slave name and password.
238+
worker name and password.
241239

242240
Whichever way you choose to update your AMI, you'll need to provide the
243241
buildmaster administrators with the new AMI ID.
244242

245243

246-
Buildslave operation
247-
--------------------
244+
Buildbot worker operation
245+
-------------------------
248246

249-
Most of the time, running a buildslave is a "set and forget" operation,
247+
Most of the time, running a worker is a "set and forget" operation,
250248
depending on the level of involvement you want to have in resolving bugs
251249
revealed by your builders. There are, however, times when it is helpful or
252250
even necessary for you to get involved. As noted above, you should be
253251
subscribed to ``[email protected]`` so that you will be made
254252
aware of any fleet-wide issues.
255253

256254
Necessary tasks include, obviously, keeping the buildbot running. Currently
257-
the system for notifying buildbot owners when their slaves go offline is not
255+
the system for notifying buildbot owners when their workers go offline is not
258256
working; this is something we hope to resolve. So currently it is helpful if
259-
you periodically check the status of your buildslave. We will also contact you
257+
you periodically check the status of your worker. We will also contact you
260258
via your contact address in ``buildarea/info/admin`` when we notice there is a
261259
problem that has not been resolved for some period of time and you have
262260
not responded to a posting on the python-buildbots list about it.
263261

264-
We currently do not have a minimum version requirement for the buildslave
262+
We currently do not have a minimum version requirement for the worker
265263
software. However, this is something we will probably establish as we tune the
266-
fleet, so another task will be to occasionally upgrade the buildslave software.
264+
fleet, so another task will be to occasionally upgrade the buildbot worker software.
267265
Coordination for this will be done via ``[email protected]``.
268266

269-
The most interesting extra involvement is when your buildslave reveals a unique
267+
The most interesting extra involvement is when your worker reveals a unique
270268
or almost-unique problem: a test that is failing on your system but not on
271269
other systems. In this case you should be prepared to offer debugging help to
272-
the people working on the bug: running tests by hand on the buildslave machine
270+
the people working on the bug: running tests by hand on the worker machine
273271
or, if possible, providing ssh access to a committer to run experiments to try
274272
to resolve the issue.
275273

276274

277275
Required Ports
278276
--------------
279277

280-
The buildslave operates as a *client* to the *buildmaster*. This means that
278+
The worker operates as a *client* to the *buildmaster*. This means that
281279
all network connections are *outbound*. This is true also for the network
282280
tests in the test suite. Most consumer firewalls will allow any outbound
283281
traffic, so normally you do not need to worry about what ports the buildbot
@@ -325,10 +323,10 @@ suite.
325323
Security Considerations
326324
-----------------------
327325

328-
We only allow builds to be triggered against commits to the CPython repository,
329-
or committer-initiated branches hosted on hg.python.org. This means that the
330-
code your buildbot will run will have been vetted by a committer. However,
331-
mistakes and bugs happen, as could a compromise, so keep this in mind when
326+
We only allow builds to be triggered against commits to the
327+
`CPython repository on GitHub <https://github.com/python/cpython>`_.
328+
This means that the code your buildbot will run will have been vetted by a committer.
329+
However, mistakes and bugs happen, as could a compromise, so keep this in mind when
332330
siting your buildbot on your network and establishing the security around it.
333331
Treat the buildbot like you would any resource that is public facing and might
334332
get hacked (use a VM and/or jail/chroot/solaris zone, put it in a DMZ, etc).

conf.py

+9
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,12 @@
229229
('index', 'pythondevelopersguide', u"Python Developer's Guide Documentation",
230230
[u'Brett Cannon'], 1)
231231
]
232+
233+
# ignore linkcheck anchors for /#/$ANCHOR since it is used for
234+
# dynamic pages such as http://buildbot.python.org/all/#/console
235+
# http://www.sphinx-doc.org/en/stable/config.html?highlight=linkcheck#confval-linkcheck_anchors_ignore
236+
linkcheck_anchors_ignore = [
237+
# match any anchor that starts with a '/' since this is an invalid HTML anchor
238+
'\/.*',
239+
]
240+

index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Full Table of Contents
345345
compiler
346346
coverity
347347
clang
348-
buildslave
348+
buildworker
349349
motivations
350350
gitbootcamp
351351

0 commit comments

Comments
 (0)