crosskylabadmin/

directory
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 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.
app
clients/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
config
Package config contains service configuration endpoints and data definition for crosskylabadmin.
Package config contains service configuration endpoints and data definition for crosskylabadmin.
cron
Package cron implements handlers for appengine cron targets in this app.
Package cron implements handlers for appengine cron targets in this app.
frontend/internal/datastore/deploy
Package deploy provides functions to store deployment status in datastore.
Package deploy provides functions to store deployment status in datastore.
frontend/internal/datastore/dronecfg
Package dronecfg implements datastore access for storing drone configs.
Package dronecfg implements datastore access for storing drone configs.
frontend/internal/datastore/freeduts
Package freeduts implements datastore access for caching free (removed) DUTs info.
Package freeduts implements datastore access for caching free (removed) DUTs info.
frontend/internal/datastore/inventory
Package inventory contains datastore operations for caching inventory data.
Package inventory contains datastore operations for caching inventory data.
frontend/internal/datastore/stableversion
Package stableversion provides functions to store stableversion info in datastore
Package stableversion provides functions to store stableversion info in datastore
frontend/internal/metrics
Package metrics contains functions to report tsmon metrics from app RPCs.
Package metrics contains functions to report tsmon metrics from app RPCs.
frontend/internal/swarming
Package swarming contains utilities for skylab swarming tasks.
Package swarming contains utilities for skylab swarming tasks.
frontend/inventory
Package inventory implements the fleet.Inventory service end-points of corsskylabadmin.
Package inventory implements the fleet.Inventory service end-points of corsskylabadmin.
queue
Package queue implements handlers for taskqueue jobs in this app.
Package queue implements handlers for taskqueue jobs in this app.

Jump to

Keyboard shortcuts

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