@@ -182,13 +182,16 @@ Here are the steps you can follow to do so:
182
182
Testing a Builder Config Locally
183
183
================================
184
184
185
- It's possible to test a builder running against a local version of LLVM's
186
- buildmaster configuration. This can be helpful to allow quickly identifying
187
- and iterating over fixes to any issues in either the changes that introduce
188
- the new builder, or the machine configuration for your worker (preinstalled
189
- packages etc). A buildmaster launched in this "local testing" mode will bind
190
- only to local interfaces, use SQLite as the database, use a fixed password for
191
- workers, and disable things like GitHub authentication.
185
+ It is possible to test a builder running against a local version of LLVM's
186
+ buildmaster configuration. This allows you to test changes to builder,
187
+ worker, and buildmaster configuration. A buildmaster launched in this "local
188
+ testing" mode will:
189
+ * Bind only to local interfaces.
190
+ * Use SQLite as the database.
191
+ * Use a single fixed password for workers.
192
+ * Disable extras like GitHub authentication.
193
+
194
+ In order to use this "local testing" mode:
192
195
193
196
* Within a checkout of `llvm-zorg <https://github.com/llvm/llvm-zorg >`_,
194
197
create and activate a Python `venv
@@ -202,7 +205,8 @@ workers, and disable things like GitHub authentication.
202
205
pip install buildbot{,-console-view,-grid-view,-waterfall-view,-worker,-www}==3.11.7 urllib3
203
206
204
207
* Initialise the necessary buildmaster files, link to the configuration in
205
- ``llvm-zorg `` and run a litmus check (run in the directory of your choice):
208
+ ``llvm-zorg `` and ask ``buildbot `` to check the configuration. This step can
209
+ be run from any directory.
206
210
207
211
.. code-block :: bash
208
212
@@ -213,22 +217,19 @@ workers, and disable things like GitHub authentication.
213
217
ln -s /path/to/checkout/of/llvm-zorg/zorg/ .
214
218
BUILDMASTER_TEST=1 buildbot checkconfig
215
219
216
- * Start the buildmaster using the command below. After a few seconds to
217
- startup, you should be able to open the web UI at ``http://localhost:8011 ``.
218
- If there are any errors or this isn't working, be sure to check
219
- ``twistd.log `` for more information.
220
-
220
+ * Start the buildmaster.
221
221
.. code-block :: bash
222
222
223
223
BUILDMASTER_TEST=1 buildbot start --nodaemon .
224
224
225
- * With the above in place, you can now create and start a buildbot worker.
226
- Ensure you pick the correct name for the worker attached to the build
227
- configuration you want to test in
228
- ``buildbot/osuosl/master/config/builders.py ``. After doing the below, either
229
- wait until the poller sets off a build, or you can force a build to start in
230
- the web UI (which is also the best place to review the build results).
225
+ * After waiting a few seconds for startup to complete, you should be able to
226
+ open the web UI at ``http://localhost:8011 ``. If there are any errors or
227
+ this isn't working, check ``twistd.log `` (within the current directory) for
228
+ more information.
231
229
230
+ * You can now create and start a buildbot worker. Ensure you pick the correct
231
+ name for the worker associated with the build configuration you want to test
232
+ in ``buildbot/osuosl/master/config/builders.py ``.
232
233
.. code-block :: bash
233
234
234
235
buildbot-worker create-worker < buildbot-worker-root-directory> \
@@ -237,15 +238,24 @@ workers, and disable things like GitHub authentication.
237
238
test
238
239
buildbot-worker start --nodaemon < buildbot-worker-root-directory>
239
240
241
+ * Either wait until the poller sets off a build, or alternatively force a
242
+ build to start in the web UI (which is also the best place to review the
243
+ build results).
244
+
240
245
This local testing configuration defaults to binding only to the loopback
241
- interface for security reasons. If you want to run the test worker on a
242
- different machine, or to run the buildmaster on a remote server, ssh port
243
- forwarding can be used to make connection possible. For instance, if running
244
- the buildmaster on a remote server the following command will suffice to make
245
- the web UI accessible via ``http://localhost:8011 `` and make it possible for a
246
- local worker to connect to the remote buildmaster by connecting to
247
- ``localhost:9900 ``: ``ssh -N -L 8011:localhost:8011 -L 9990:localhost:9990
248
- username@server_address ``.
246
+ interface for security reasons.
247
+
248
+ If you want to run the test worker on a different machine, or to run the
249
+ buildmaster on a remote server, ssh port forwarding can be used to make
250
+ connection possible. For instance, if running the buildmaster on a remote
251
+ server the following command will suffice to make the web UI accessible via
252
+ ``http://localhost:8011 `` and make it possible for a local worker to connect
253
+ to the remote buildmaster by connecting to ``localhost:9900 ``:
254
+
255
+ .. code-block :: bash
256
+
257
+ ssh -N -L 8011:localhost:8011 -L 9990:localhost:9990 username@server_address
258
+
249
259
250
260
Best Practices for Configuring a Fast Builder
251
261
=============================================
0 commit comments