crosskylabadmin/

directory
v0.0.0-...-9994f1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause

README

#ChromeOS Skylab Admin

[TOC]

Overview

Chrome OS Skylab Admin is a Google App Engine app (in Go) that supports the following:

Manage Lab Device Inventory

Lab device inventory is broadly composed of the following:

  • Device hardware attributes - Static (immutable) hardware characteristics of lab devices
    • E.g. device model, SoC architecture, graphics chip family, bluetooth, etc...
  • Lab device configuration - Lab deployment details needed to communicate with, manage, and run tests on a specific device
    • E.g. hostname, servo port, servo host, etc...
  • Lab device state - Current status information about a given device
    • E.g. Scheduling availability, servo health, etc...

This service is responsible for managing and providing access to this config.

Currently, the config is backed by the Skylab inventory repo and cached/served from Datastore.

Updates to this config come from the following sources:

  • skylab command-line tool
    • Supports adding new lab devices and setting lab-specific details
    • Supports administrative updates/operations to lab devices
  • Lab device bots
    • Device bots dynamically detect hardware attributes and report them to this service
    • Device bots also report lab device status information

This config is then sourced/read by device bots to support the following:

  • Reported to swarming as schedulable attributes that will match test requests
  • Lab setup is used to communicate with the device and device peripherals

Keep Devices Healthy

This service is trying to keep devices in a healthy, schedulable state at all times. Device health can degrade for many reasons (bad test, provisioning failure, etc...) and this service supports recovering those devices with the following:

  • API to manually schedule device repair jobs (invoked via skylab tool)
  • Scheduling automated repair jobs for any devices it detects as unhealthy

Other Admin Functions

This service is a bit of a catch-all and performs various other functions required to keep the system healthy.

For example, here are some of the additional functions (not comprehensive):

  • Triggers balancing across critical device pools
  • Reports time-series metrics used for monitoring/analysis
  • Reports inventory to Drone Queen for drone/bot management

Code/Development Setup

For initial setup, follow the Chrome Infra Go procedures

For environment setup, follow the Bootstrap procedures

Application Environments

Test

  • Unit testing - 'cd go/src/infra/appengine/crosskylabadmin && make test'
  • Functional/integration testing - No automated testing

Release Procedures

  • cd go/src/infra/appengine/crosskylabadmin
  • make up-staging && switch-staging (Staging)
  • make up-prod && switch-prod (Production)

Directories

Path Synopsis
api
fleet/v1
Package fleet contains service definitions for fleet management in crosskylabadmin.
Package fleet contains service definitions for fleet management in crosskylabadmin.
gaev2
adminclient
This is the client (called "adminclient") for the GAEv2 version of CrOSSkylabAdmin.
This is the client (called "adminclient") for the GAEv2 version of CrOSSkylabAdmin.
crosadm
This is the main entrypoint for the GAEv2 version of CrOSSkylabAdmin.
This is the main entrypoint for the GAEv2 version of CrOSSkylabAdmin.
internal
app/clients/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
app/config
Package config contains service configuration endpoints and data definition for crosskylabadmin.
Package config contains service configuration endpoints and data definition for crosskylabadmin.
app/cron
Package cron implements handlers for appengine cron targets in this app.
Package cron implements handlers for appengine cron targets in this app.
app/frontend/datastore/stableversion
Package stableversion provides functions to store stableversion info in datastore
Package stableversion provides functions to store stableversion info in datastore
app/frontend/util
Package swarming contains utilities for skylab swarming tasks.
Package swarming contains utilities for skylab swarming tasks.
app/queue
Package queue implements handlers for taskqueue jobs in this app.
Package queue implements handlers for taskqueue jobs in this app.
tq
ufs
ufs/mockufs
Package mockufs is a generated GoMock package.
Package mockufs is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL