|
|
| (One intermediate revision by one other user not shown) |
| Line 1: |
Line 1: |
| == Application Description ==
| |
| Slavealloc is a client-server application. The client is [http://hg.mozilla.org/build/puppet-manifests/file/tip/modules/buildslave/files/runslave.py runslave.py]. Communication is via a very basic HTTP request to http://slavealloc.build.mozilla.org/gettac/$slavename, where the response is expected to be a <tt>buildbot.tac</tt> file suitable for use to start buildslave.
| |
|
| |
|
| The slavealloc server is a implemented as a small Twisted application ([http://hg.mozilla.org/build/tools/file/tip/lib/python/slavealloc source]) which serves the tac generator, a JSON REST interface, and a client-side JavaScript interface.
| |
|
| |
| The same source code also implements a command-line frontend to the REST interface.
| |
|
| |
| == Requirements ==
| |
| The server depends on
| |
| * MySQL database
| |
| * Python
| |
| ** Twisted
| |
| ** SQLAlchemy
| |
|
| |
| == Development ==
| |
| First, install build/tools in a virtualenv:
| |
| cd tools
| |
| virtualenv sandbox
| |
| sandbox/bin/pip install -e .
| |
| Then you can run the slavealloc daemon locally from the root of the tools repository with a simple:
| |
| sandbox/bin/twistd -noy lib/python/slavealloc/contrib/slavealloc-combined.tac
| |
| Note that due to what I believe to be a bug in pip, you may need to explicitly install Twisted to get the twistd executable installed:
| |
| pip install -U twisted
| |
| To set up a fresh database, use
| |
| sandbox/bin/slavealloc dbinit -D sqlite:///slavealloc.db
| |
| This configuration will use SQLite to access {{{slavealloc.db}}} in the current directory. You can hack on the static web content while the daemon is running.
| |
|
| |
| == See Also ==
| |
| * See [[User:Djmitche/Slave Allocator Proposal]]
| |
| * See https://mana.mozilla.org/wiki/display/IT/Slavealloc for more detail on the setup at Mozilla.
| |