tree: bac7cf87465cbec8ee9738288bab3c10a0e24ea2 [path history] [tgz]
  1. cmd/
  2. internal/
  3. protos/
  4. OWNERS
  5. README.md
go/src/infra/cros/botsregulator/README.md

BotsRegulator

BotsRegulator(BR) is a Cloud Run service with two cron jobs flow. BR does not accept incoming requests except from these cron jobs.

Context

go/botsregulator
go/cloudbots-gce
go/cloudbots

regulate-bots cron

BR periodically look for UFS DUTs with a specific hive value and send this set of DUTs to a Bots Provider API (e.g. GCE Provider).

migrate-bots cron

Used for CloudBots migration. BR migrates/rolls back DUTs based on a migration file stored in luci-config (services/bots-regulator-dev/migration.cfg). Migrating a DUT means updating the DUT's hive to cloudbots.

flags

To pass a service account use -service-account-json flag.

Local testing

to read a local config file: cfgmodule.NewModule(&cfgmodule.ModuleOptions{LocalDir: "<path-to-file>"}) to read the dev config file pass this flag: -cloud-project bots-regulator-dev

Dev

gcp project: bots-regulator-dev

Production

gcp project: bots-regulator-prod

Deployment

Deployment process can be found at data/cloud-run/projects/bots-regulator.