ReleaseEngineering/Applications/Slavealloc: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(added deployment information)
Line 25: Line 25:
  sandbox/bin/slavealloc dbinit -D sqlite:///slavealloc.db
  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.
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.
== Production Instance ==
=== Deployment Requests ===
To request an update to the code for slavealloc, file a bug in "Infrastructure & Operations -  WebOps: IT-Managed Tools" with the following information ([https://bugzilla.mozilla.org/enter_bug.cgi?alias=&assigned_to=server-ops-webops%40mozilla-org.bugs&attach_text=&blocked=&bug_file_loc=http%3A%2F%2F&bug_severity=normal&bug_status=NEW&comment=Please%20deploy%20the%20revision%20specified%20TIME_CRITERIA%0D%0A%0D%0AThe%20mana%20page%20for%20this%20app%20is%3A%0D%0A%20%20https%3A%2F%2Fmana.mozilla.org%2Fwiki%2Fdisplay%2Fwebsites%2FReleng%2BCluster&component=WebOps%3A%20IT-Managed%20Tools&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=&dependson=&description=&flag_type-4=X&flag_type-481=X&flag_type-607=X&flag_type-674=X&flag_type-791=X&flag_type-800=X&flag_type-811=X&form_name=enter_bug&keywords=&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=All&priority=--&product=Infrastructure%20%26%20Operations&qa_contact=nmaul%40mozilla.com&rep_platform=All&requestee_type-4=&requestee_type-607=&requestee_type-753=&requestee_type-791=&requestee_type-800=&short_desc=update%20slavealloc%20app%20on%20releng%20cluster%20to%20revision%20REVISION_NUMBER&status_whiteboard=&target_milestone=---&version=other bugzilla template]):
* Name of the cluster ("releng cluster") ''pre-entered''
* Short name of the site (e.g., "slavealloc") ''pre-entered''
* Revision to update to ''REVISION_NUMBER in template''
* Any limitations on timing ("not before", etc.) ''TIME_CRITERIA in template''
* Link to the relevant mana page ''pre-entered''


== See Also ==
== See Also ==
* See [[User:Djmitche/Slave Allocator Proposal]]
* See [[User:Djmitche/Slave Allocator Proposal]]
* See https://mana.mozilla.org/wiki/display/IT/Slavealloc for more detail on the setup at Mozilla.
* See https://mana.mozilla.org/wiki/display/IT/Slavealloc for more detail on the setup at Mozilla.

Revision as of 18:36, 8 August 2013

Application Description

Slavealloc is a client-server application. The client is 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 buildbot.tac file suitable for use to start buildslave.

The slavealloc server is a implemented as a small Twisted application (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.

Production Instance

Deployment Requests

To request an update to the code for slavealloc, file a bug in "Infrastructure & Operations - WebOps: IT-Managed Tools" with the following information (bugzilla template):

  • Name of the cluster ("releng cluster") pre-entered
  • Short name of the site (e.g., "slavealloc") pre-entered
  • Revision to update to REVISION_NUMBER in template
  • Any limitations on timing ("not before", etc.) TIME_CRITERIA in template
  • Link to the relevant mana page pre-entered

See Also