create-db-docker
Provisions one lab database Docker instance for PostgreSQL, MySQL, SQL Server, or Oracle, with HA replicas, remote host setup, and dry-run planning.
Instructions
dbabrain common.cli create-db-docker: One lab database Docker instance to build.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
name (required): The instance's name: folder, compose project and container.
engine (required): postgres | mysql | mssql | oracle | oracle-xe.
version (required): The image tag, checked against the registry first.
mode: single (default) | ha-lab.
replicas: ha-lab only: standbys. Omitted = the engine's default.
host_port: The host port of the primary. Omitted = the engine's own.
password_ref: The secret REF the connection record names.
password: Its RESOLVED value. A dry run may omit it.
backup_mount: Host folder bind-mounted at the same path; empty = none. Omitted means nothing stated: no mount for an engine that needs none, and refused by name for one that mounts its backup folder (SQL Server) - the node's own is...
network_subnet: The compose network's /24. Omitted = derived from the name.
data_host_dir: PostgreSQL single only (0.37.0): keep the data in this host folder, bound at /var/lib/postgresql, instead of a Docker named volume - e.g. on a share. Absent: the named volume.
run_as: The uid:gid the container runs as (0.37.0) - for a host folder whose files only one uid can own, such as an NFS share that maps every user to one uid. Absent: the image's own user.
timezone: A single instance (0.40.0): the container's TZ - the clock its database reads its own time in. Absent: the image's own, UTC.
containers_dir (required): Where the instance folder is written on its host. Stated by the caller - the node's own is sre.docker_db.containers_dir - because the command reads no configuration and assumes no folder; a request without it is refus...
worker_host: The address recorded for an instance built on this machine.
remote: Build on this Ubuntu host over SSH. An ssh_login object: host, port (22), username, and a RESOLVED password or an absolute key_file path - never a ref;
labelnames it in messages.install_docker: With remote: install Docker and prepare the folders first. Never on a dry run.
sudo_password: With install_docker: sudo's password. Omitted = the SSH one.
health_timeout: How long to wait for health. Omitted = the engine's own ceiling.
force: Rebuild an existing instance - destroys its containers and volumes.
dry_run: Render the plan; connect to nothing, change nothing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create-db-docker"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |