Auto-tools/Projects/Lifeguard

< Auto-tools‎ | Projects
Revision as of 23:56, 2 October 2012 by Jgriffin (talk | contribs)

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

  1. Lifeguard should provide a mechanism for devices to register themselves with it.
  2. Once a device is registered with Lifeguard, it should periodically poll the device to verify that it's still alive.
    1. If the polling fails, Lifeguard should attempt to recover the device by resetting its power up to N times.
    2. If resetting the device fails, Lifeguard should mark the device as 'offline'.
  3. Lifeguard should provide a web UI that users can use to see and change the status of connected devices.
    1. The UI should allow users to set the status of the device (offline or online) and to attempt rebooting or resetting its power.
    2. 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.
  4. Lifeguard should provide an API with which remote components can interact with it.