Page MenuHomePhabricator

[dbaas,toolsdb] Add support for management of toolsdb databases within toolforge
Open, MediumPublic

Description

Specific task to enable management of toolsDB based databases in toolforge through the toolforge API.

Notes on implementation

  • Everything doable, should be done through the API (as opposed to having to run anything on the cli, this enables us to offer the service in different platforms like UI)
    • Strongly recommend generating the API definition from code (ex. FastAPI in components-api) or the code from the API definition (ex. golang on envvars-api/builds-api)
  • This means that there should be a service like jobs-api/envvars-api/builds-api that handles the API calls deployed within toolforge itself
  • We probably want to start exposing it through a cli (thin cli that just uses the API, similar to jobs-cli/envvars-cli/...)

We might want to create a generic enough abstraction to allow a future implementation of DBaaS on k8s/trove, this might mean:

  • Allow space for specifying the db type (mysql/...)
  • Allow space for user management

Use cases

First iteration

Use cases/user flows:

  • See current databases - only yours for now
  • Create a new database
    • Not caring if public or not at the API level
  • Delete a database
  • Run a script on a database (ex. to create tables, to populate, ...)
  • Refresh db credentials ?
For later/to be discussed
  • See other public databases
  • Mirgate DB from private to public