ReleaseEngineering/Applications/Slavealloc: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 20: Line 20:
== Security ==
== Security ==
The slave allocator hands out low-security slave passwords in the .tac files, which are stored in cleartext in the database.  It does not do any sort of authentication either for read or modify operations, and relies on the Build VLAN firewalls to prevent external access.
The slave allocator hands out low-security slave passwords in the .tac files, which are stored in cleartext in the database.  It does not do any sort of authentication either for read or modify operations, and relies on the Build VLAN firewalls to prevent external access.
== Development ==
Install 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.


== Monitoring ==
== Monitoring ==
Line 76: Line 63:
=== Slave Side ===
=== Slave Side ===
All slaves run [http://hg.mozilla.org/build/puppet-manifests/file/tip/modules/buildslave/files/runslave.py runslave.py] during startup.  This file is distributed via puppet. The larger slave-startup process is described in [[ReleaseEngineering/Buildslave Startup Process]].
All slaves run [http://hg.mozilla.org/build/puppet-manifests/file/tip/modules/buildslave/files/runslave.py runslave.py] during startup.  This file is distributed via puppet. The larger slave-startup process is described in [[ReleaseEngineering/Buildslave Startup Process]].
== 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 Also ==
See [[User:Djmitche/Slave Allocator Proposal]]
See [[User:Djmitche/Slave Allocator Proposal]]
canmove, Confirmed users
1,394

edits