stratumiops/scripts/nu/start-dev-stack.nu
Jesús Pérez 9095ea6d8e
Some checks failed
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
feat: add stratum-orchestrator with graph, state, NATS, and Nickel action nodes
New crates: stratum-orchestrator (Cedar authz, Vault secrets, Nu/agent executors,
  saga runner), stratum-graph (petgraph DAG + SurrealDB repo), stratum-state
  (SurrealDB tracker), platform-nats (NKey auth client), ncl-import-resolver.

  Updates: stratum-embeddings (SurrealDB store + persistent cache), stratum-llm
  circuit breaker. Adds Nickel action-nodes, schemas, config, Nushell scripts,
  docker-compose dev stack, and ADR-003.
2026-02-22 21:33:26 +00:00

40 lines
1.1 KiB
Plaintext

#!/usr/bin/env nu
# start-dev-stack.nu — Bring up the stratum docker-compose dev stack and wait for health.
def wait-for-http [url: string, label: string, max_secs: int]: nothing -> nothing {
let start = (date now)
loop {
let elapsed = ((date now) - $start | into int) / 1_000_000_000
if ($elapsed > $max_secs) {
error make { msg: $"[$label] not ready after [$max_secs]s" }
}
let r = (do { ^curl -sf $url } | complete)
if ($r.exit_code == 0) {
print $"[$label] ready"
break
}
sleep 2sec
}
}
def main []: nothing -> nothing {
print "Starting stratum dev stack..."
let up = (do {
^docker compose -f docker-compose.dev.yml up -d
} | complete)
if ($up.exit_code != 0) {
error make { msg: $"docker compose up failed:\n($up.stderr)" }
}
print "Containers started, waiting for services..."
wait-for-http "http://localhost:8100/health" "SurrealDB" 30
wait-for-http "http://localhost:5000/v2/" "Zot OCI" 30
print "Dev stack ready"
print " SurrealDB: ws://localhost:8100"
print " Zot OCI: http://localhost:5000"
}