Developer Onboarding
Technical reference. This page is for integrations, advanced configuration, or platform operations. For portal tasks, start with the user guide.
Playground workspace: After completing setup, run
make playground-seedto provision sample data for the interactive tutorials.
Prerequisites
| Tool | Version | Check |
|---|---|---|
| Python | 3.13+ | python3 --version |
| Node.js | 26.x | node --version |
| pnpm | 11.x | pnpm --version |
| uv | latest | uv --version |
| Docker | 24+ | docker --version |
| Docker Compose | v2 | docker compose version |
Quick Start
1. Clone and install
git clone https://github.com/vdoganAnalytixPower/orqestra.git
cd Orqestra
make installExpected output: pnpm installs portal dependencies, uv syncs control-plane and runtime-gateway Python environments.
2. Generate local credentials and start infrastructure
make bootstrap
make dev-inframake bootstrap creates or reuses the private, ignored .tools/local-compose
bundle. It is the only source of local database, Redis, object-store, identity,
and service-authority credentials; do not copy .env.example or export known
defaults. The bundle is reused across restarts and a reset/recovery is required
before rotating credentials while persistent volumes exist.
A bundle generated before per-role service-credential signing keys were
introduced needs a one-time migration before make dev will start: run
scripts/bootstrap-local-compose.sh add-role-signing-keys --root "$PWD"
once. It adds the new key files and compose.env entries in place (refusing
any other drift) and is a no-op if the bundle is already migrated. A fresh
bundle created by make bootstrap already includes the seven keys and needs
no migration. A bundle with the dedicated runtime-gateway signing key and the
older two-key gateway verifier set is upgraded automatically by make bootstrap
or make dev: it reuses the existing load-gate public key and preserves the
bundle generation. Other bundle drift still fails closed; a bundle that predates
the dedicated runtime-gateway signing key requires an explicit reset.
Expected output: PostgreSQL (5432), PgBouncer (6432), four Redis services (6379-6382), MinIO (9000/9001) containers start on loopback.
3. Initialize the database
make db-upgrade
make db-seedExpected output: Alembic applies the migrations and seed data loads.
Pre-live reset/reseed recovery
Migration 255 adds the required server-owned release-origin row and refuses to
run when release_record already contains rows. It does not delete or infer
origins. On a disposable local database, reset the Docker volumes before
retrying. This is local-only and permanently deletes the local Postgres,
Vault, and MinIO volumes; never run it against shared or production data:
printf 'yes\n' | make reset
make devIf you only need infrastructure, use make dev-infra, then rerun make db-upgrade and make db-seed. If the database is not disposable, stop and use
the migration’s bounded preflight error to coordinate an explicit data
migration; do not bypass the check.
4. Run services
Option A — Docker (all services):
make devOption B — Local development (separate terminals):
Generate and load the protected local bundle before starting host-native
processes. The bundle supplies the database, Redis, object-store, session, and
service-signing values; do not copy .env.example or rely on repository
defaults.
make bootstrap
eval "$(scripts/bootstrap-local-compose.sh host-env --root "$PWD")"
# Terminal 1: control-plane with the optional Estate surface
cd services/control-plane && uv run uvicorn orqestra_composition.app:app --reload --app-dir src --port 8000
# Terminal 2: runtime-gateway
cd services/runtime-gateway && uv run uvicorn orqestra_runtime_gateway.main:app --reload --app-dir src --port 8001
# Terminal 3: portal
cd apps/portal && pnpm dev
# Terminal 4: docs
cd apps/docs && pnpm devThe control-plane composition includes the optional Estate overview. To run the core-only control plane without Estate routes, use:
cd services/control-plane && uv run uvicorn orqestra_control_plane.main:app --reload --app-dir src --port 8000Expected output: Control-plane at http://localhost:8000/docs , runtime-gateway at http://localhost:8001/healthz , portal at http://localhost:3000 , docs at http://localhost:3002
5. Verify
curl http://localhost:8000/healthz
# {"status": "ok"}
make check
# All quality gates passEnvironment Variables
Run make bootstrap in the repo root. Host-side Make targets source the
generated bundle automatically; direct service processes must source
.tools/local-compose/compose.env explicitly as shown above. Key variables:
| Variable | Default | Profile | Description |
|---|---|---|---|
ORQESTRA_POSTGRES_DSN | generated in .tools/local-compose/compose.env | default | Application-tier Postgres DSN (routes through PgBouncer transaction-mode multiplexing) |
ORQESTRA_POSTGRES_DSN_DIRECT | generated in .tools/local-compose/compose.env | default | Direct-Postgres DSN for migrations, WORM-export, seed scripts, CLI audit, and Makefile DB helpers. |
ORQESTRA_RUN_MIGRATIONS_IN_LIFESPAN | unset (resolves to service_env == "local") | default | When the resolver returns true, the control-plane lifespan runs alembic upgrade head itself; when false, the lifespan runs a schema-drift check that raises if the live DB is not at the script head. Asymmetric override: =false is honoured in any env; =true is honoured only when service_env="local". |
ORQESTRA_REDIS_QUEUE_URL | generated in .tools/local-compose/compose.env | default | Queue-role Redis (Celery broker / result backend) |
ORQESTRA_REDIS_CACHE_URL | generated in .tools/local-compose/compose.env | default | Cache-role Redis (asset / release caches) |
ORQESTRA_REDIS_COORDINATION_URL | generated in .tools/local-compose/compose.env | default | Coordination-role Redis (leases, audit, governor) |
ORQESTRA_REDIS_SIGNALS_URL | generated in .tools/local-compose/compose.env | default | Signals-role Redis (kill / pause TTL keys) |
CONTROL_PLANE_URL | http://localhost:8000 | full | Portal API proxy target |
RUNTIME_GATEWAY_URL | http://localhost:8001 | full | Portal system-health readiness target for runtime-gateway |
RETRIEVAL_SERVICE_URL | http://localhost:8002 | full | Portal system-health readiness target for retrieval-service |
NEXT_PUBLIC_GRAFANA_URL | http://localhost:3001 | monitoring | Browser-facing Grafana URL used by the portal Monitoring drilldown link |
NEXT_PUBLIC_JAEGER_URL | http://localhost:16686 | monitoring | Browser-facing Jaeger URL used by the portal Monitoring trace drilldown link |
ORQESTRA_MAX_REQUEST_BYTES | 10485760 (10 MiB) | full | Maximum body size accepted by control-plane and runtime-gateway. Oversize requests get HTTP 413 (RFC 7807 application/problem+json) before any route handler runs. Operators enabling ORQESTRA_PERSIST_FULL_AGENT_TRACE=true must raise this (50 MiB is a reasonable starting point). |
ORQESTRA_PORTAL_MAX_REQUEST_BYTES | 10485760 (10 MiB) | full | Same cap on the portal proxy (/api/v1/* route handler). Apply at the portal layer to avoid buffering oversize bodies in the Node runtime. Should match (or be tighter than) ORQESTRA_MAX_REQUEST_BYTES — setting the portal higher just wastes Node memory on a request the backend would 413 anyway. |
ORQESTRA_GOVERNANCE_PARTITION_CRON | 0 0 24 * * | default | Cron expression for the monthly partition-manager job that pre-creates next month’s governance_events_YYYY_MM partition. Default fires on the 24th of each month at 00:00 UTC, ≈7 days before month-end. The web tier exposes governance_events_next_partition_exists (Prometheus gauge, 1.0/0.0) and governance_partition_health_last_probe_timestamp (heartbeat) so operators can alert on missed rollovers. |
LITELLM_MASTER_KEY | — | llm | LiteLLM admin key (only needed with --profile llm) |
OPENAI_API_KEY | — | full / llm | Optional. Enables a LiteLLM-routed model (see Governed Providers). |
Docker Compose Profiles
Different profiles activate different services and require different env vars:
- default (no
--profileflag): PostgreSQL 17 with pgvector + PgBouncer (transaction-mode pooler), four typed Redis services (queue / cache / coordination / signals), MinIO. RequiresORQESTRA_POSTGRES_DSN(app traffic via PgBouncer),ORQESTRA_POSTGRES_DSN_DIRECT(admin/migration via direct Postgres), and the fourORQESTRA_REDIS_*_URLvariables (defaults point at the bundled compose services). - full: All default services plus control-plane, retrieval-service, LiteLLM, runtime-gateway, and portal. Additionally requires
CONTROL_PLANE_URL,RUNTIME_GATEWAY_URL, andRETRIEVAL_SERVICE_URLfor portal proxying and system-health readiness checks.NEXT_PUBLIC_GRAFANA_URLandNEXT_PUBLIC_JAEGER_URLcontrol Monitoring drilldown links when the monitoring profile is also running.OPENAI_API_KEYis optional and only needed if you want a LiteLLM-routed model (see Governed Providers) to work. - auth: Default services plus Keycloak and OpenLDAP. Auth-related env vars apply.
- llm: Default services plus LiteLLM. Requires
LITELLM_MASTER_KEY.OPENAI_API_KEYremains optional.
Project Layout
Orqestra/
apps/portal/ # Next.js operator and consumer portal (pnpm)
services/
control-plane/ # FastAPI central API service (uv)
runtime-gateway/ # FastAPI execution gateway (uv)
packages/contracts/ # Shared type contracts
infrastructure/local/ # Docker Compose and local infra config
docs/ # Architecture, ADRs, reviews
tests/ # Cross-service test suitesCommon Workflows
| Task | Command |
|---|---|
| Install all dependencies | make install |
| Start infrastructure only | make dev-infra |
| Start everything (Docker) | make dev (portal 3000, docs 3002) |
| Run all quality gates | make check |
| Run portal tests | cd apps/portal && pnpm test |
| Run control-plane tests | cd services/control-plane && uv run pytest |
| Reset database | make reset (local Docker volumes only), then make dev |
| See all Make targets | make help |
Troubleshooting
- Port conflict: Check for existing services on 5432, 6379, 3000, 8000 (
lsof -i :<port>). - uv not found: Install from https://docs.astral.sh/uv/
- pnpm not found:
npm install -g pnpm - Docker permission denied: Ensure the Docker daemon is running and your user has access.
- Database connection refused: Ensure
make dev-infrais running and PostgreSQL is healthy (docker compose ps). - Portal shows “fetch failed”: Ensure control-plane is running at the URL specified in
CONTROL_PLANE_URL.
Further Reading
- DEVELOPMENT.md — development conventions and command ownership
- Architecture docs — architecture documentation index
- Project brief — project vision and goals