ReleaseEngineering/Applications/SlaveAPI: Difference between revisions
(Created page with "= What is it? SlaveAPI is a service that is intended to be a single point of entry for all actions related to slaves. Clients interact with it through a simple REST API and it...") |
(No difference)
|
Revision as of 20:57, 8 October 2013
= What is it? SlaveAPI is a service that is intended to be a single point of entry for all actions related to slaves. Clients interact with it through a simple REST API and it communicates with many other systems on the backend to fulfill the requests (eg, bugzilla, slavealloc, inventory) made.
Its source code lives on git.mozilla.org.
Where is it?
SlaveAPI has both a dev and production instance. Each lives on its own machine within the RelEng network. These machines are managed by PuppetAgain.
Requirements/dependencies
SlaveAPI depends on many Python packages to function correctly. Installing it through its setup.py will take care of pulling in everything you need.
Deployment
Changes to SlaveAPI's config or credentials file should be done through Puppet. Both instances will pick up the changes and automatically reload the server.
Changes to SlaveAPI's code are a little trickier. SlaveAPI itself is deployed through pip by Puppet, so the first step is to upload a new version of SlaveAPI to PuppetAgain and update the version in the Puppet manifests. Once those are done the machine will automatically install the new version. However, the SlaveAPI service must be restarted to pick up the changes. You can do this by logging onto the machine and running the following:
sudo su - cltbld cd /builds/slaveapi/dev (or prod) slaveapi-server.py stop slaveapi.ini && slaveapi-server.py start slaveapi.ini
The manual restart will be done automatically once bug 924616 is fixed.
API Documentation
TBD