Skip to content

mars-college/chiba-controller

Repository files navigation

chiba-controller

chiba-controller is the new monorepo root for the Chiba control plane, Ops UI, Guide UI, and node runtime.

This repo is set up for two environments:

  • laptop development (docker-compose.yml)
  • always-on production (docker-compose.prod.yml) on 10.10.13.9

Monorepo Layout

  • apps/control-api - control-plane API + Ops endpoints
  • apps/ops - operations UI
  • apps/guide - guide UI
  • apps/control-mcp - MCP server
  • packages/db - schema, migrations, import tools
  • packages/contracts - shared schemas/types
  • packages/node-runtime - node runtime process
  • config/registry.prod.toml - production node inventory/bootstrap source

Development (Laptop)

  1. Install deps:
pnpm install
  1. Start dev stack:
docker compose up --build
  1. Open:
  • Ops: http://127.0.0.1:8792/ops/
  • Control API: http://127.0.0.1:8795
  • Guide: http://127.0.0.1:5173
  • MinIO API: http://127.0.0.1:9100
  • MinIO console: http://127.0.0.1:9101

Production (10.10.13.9)

  1. Prepare env file:
cp .env.prod.example .env.prod

Defaults are already set for host 10.10.13.9.

  1. Start the production stack:
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d --build

The prod compose stack includes one-shot init jobs:

  • DB migrations (db-migrate)
  • registry import (db-import-registries)

That import includes config/registry.prod.toml with registryId=prod.

  1. Check status:
docker compose -f docker-compose.prod.yml --env-file .env.prod ps

Optional wrapper script:

bash ./scripts/prod/start-stack.sh start
bash ./scripts/prod/start-stack.sh status
bash ./scripts/prod/start-stack.sh logs

Bootstrap Nodes From Ops UI

Ops now exposes node bootstrap in the Node Workspace control panel.

  1. Open Ops: http://10.10.13.9:8792/ops/
  2. Go to Fleet -> select a node -> Control App/Web
  3. In Bootstrap Node Runtime, set:
  • Lookup Control API URL: http://10.10.13.9:8795
  • Node Control API URL: http://10.10.13.9:8795
  • Guide Base URL: http://10.10.13.9:5173
  • Namespace: prod
  • Registry ID: prod
  1. Keep Endpoints only enabled for retargeting without redeploy, then click Bootstrap Node.

The panel shows command, stdout, stderr, and exit code.

Bootstrap Nodes From CLI

bash ./scripts/pis/bootstrap-node-runtime.sh <node-id> \
  --control-api-url http://10.10.13.9:8795 \
  --node-control-api-url http://10.10.13.9:8795 \
  --guide-base-url http://10.10.13.9:5173 \
  --namespace prod \
  --registry-id prod \
  --endpoints-only

Persistent Data

Production data is persisted in Docker volumes:

  • chiba_controller_prod_postgres_data
  • chiba_controller_prod_minio_data
  • chiba_controller_prod_share_root

This keeps control state, media assets, and shared runtime storage across restarts.

About

chiba controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published