Auto-tools/Projects/Lifeguard
< Auto-tools | Projects
Goals
Lifeguard will be a library used to manage a pool of devices, primarily those in use by buildbot for running mobile/B2G unittests. Lifeguard will track the status of all devices registered with it, attempt to recover devices that go offline, and respond to requests for a device by "checking out" a known good device and returning its identifier to the requester.
Non-Goals
Lifeguard will not be responsible for flashing or installing builds on target devices.
Design
TBD, but Autophone provides some of this already, so probably is a good place to start.
Requirements
- Lifeguard should provide a mechanism for devices to register themselves with it.
- Once a device is registered with Lifeguard, it should periodically poll the device to verify that it's still alive.
- If the polling fails, Lifeguard should attempt to recover the device by resetting its power up to N times.
- If resetting the device fails, Lifeguard should mark the device as 'offline'.
- Lifeguard should provide a web UI that users can use to see and change the status of connected devices.
- The UI should allow users to set the status of the device (offline or online) and to attempt rebooting or resetting its power.
- If a user marks a device as online, Lifeguard should attempt to bring the device online; if it fails, it should return the status to offline.
- Lifeguard should provide an API with which remote components can interact with it.