Nucleus
Postgres, Redis, and the rest of the data plane
Nucleus records the database you want (Postgres, Redis, NATS, Fluvio, ClickHouse, MongoDB, RustFS) and Gluon applies it. Add shards, place stacks on cells in different regions, then reconcile.Where it lands
Hosts boot Nucleus after Gluon. Provision writes intent; reconcile creates the Gluon apps; Spectra can watch health on the same stacks.Call nucleus::provision with an EngineStrategy and a Gluon cell (region). add_shard grows a live stack. reconcile_all_stacks applies Gluon until status is Active. Endpoint APIs then hand Valence a URL. Same flow for Redis, NATS, and the other Tier A engines.
In the workspace
Hosts boot Nucleus after Gluon. Provision writes intent; reconcile creates the Gluon apps; Spectra can watch health on the same stacks.Code sample
From the upstream getting-started docs — see also all code recipes on Resources.
Nucleus stacksNucleus
Postgres and Redis in two regions, then shard
use nucleus::provision::{provision, EngineStrategy, ProvisionPolicy};
use nucleus::reconcile::reconcile_all_stacks;
use nucleus::shards::add_shard;
// us_east_cell / eu_west_cell: GluonCellCloudPlacement rows for those regions
let postgres = provision(
valence,
EngineStrategy::Postgres,
ProvisionPolicy {
logical_name: "orders-pg".into(),
replica_count: 2,
},
Some(&us_east_cell),
)
.await?;
let _redis = provision(
valence,
EngineStrategy::Redis,
ProvisionPolicy {
logical_name: "orders-cache".into(),
replica_count: 3,
},
Some(&eu_west_cell),
)
.await?;
add_shard(valence, &postgres).await?;
reconcile_all_stacks(valence).await?;