Self-hosted deployment¶
This is the whole day-0 path as an executable spine: the commands in order, the state each phase must reach, and the gate that decides whether you can continue. The detailed pages linked from each phase carry the full manifests, provider variants, diagnostics and recovery paths.
This is the self-hosted path, where you deploy and operate the control plane yourself. If Xratu operates your control plane, follow Hosted deployment instead: phases 2, 3 and 4 are identical, and only the first phase differs.
flowchart TB
A["PHASE 1<br/>Images and control plane<br/><br/>Install the CLI<br/>Pull the platform images<br/>Deploy the control plane<br/>Expose its API"]
B["PHASE 2<br/>Identity and tenancy<br/><br/>Exchange an external identity<br/>Verify the resolved actor<br/>Create organisation and workspace<br/>Bind additional access"]
C["PHASE 3<br/>Enrollment authority<br/><br/>Reconcile bootstrap authority<br/>Create a data plane pool"]
D["PHASE 4<br/>Nodes<br/><br/>Prepare an installation<br/>Apply it<br/>Verify enrollment"]
A --> B --> C --> D
Before you start¶
You need cluster access, kubectl, jq, and an external identity you are
already authenticated with. See
Deployment prerequisites and
Check prerequisites and choose a topology.
Set the values the whole sequence uses. XRATU_IMAGE_REGISTRY and
XRATU_VERSION identify the published platform images.
export CP_NS=xratu-cp
export CP_SERVICE=xratu-control-plane
export CP_PORT=8080
export XRATU_IMAGE_REGISTRY=<xratu-published-registry>
export XRATU_VERSION=<release-tag>
export ORG=org-a
export WS=ws-a
export POOL=pool-default
export DP_INSTALL=xratu-dataplane
Phase 1: images and control plane¶
Install the CLI.
Confirm the published images are reachable from where you will deploy. A cluster with egress pulls them directly; a restricted network mirrors them into a registry it can reach first.
docker pull ${XRATU_IMAGE_REGISTRY}/xratu-control-plane:${XRATU_VERSION}
docker pull ${XRATU_IMAGE_REGISTRY}/xratu-data-plane:${XRATU_VERSION}
docker pull ${XRATU_IMAGE_REGISTRY}/xratu/kernels/execd:${XRATU_VERSION}
Create the namespace and apply the control-plane manifests with your image reference substituted in.
kubectl create namespace ${CP_NS} --dry-run=client -o yaml | kubectl apply -f -
sed \
-e "s|namespace: xratu-cp|namespace: ${CP_NS}|g" \
-e "s|REPLACE_CONTROL_PLANE_IMAGE|${XRATU_IMAGE_REGISTRY}/xratu-control-plane:${XRATU_VERSION}|g" \
control_plane/templates/deployment/k8s-control-plane.yaml | kubectl apply -f -
kubectl -n ${CP_NS} rollout status deployment/xratu-control-plane --timeout=600s
Expose the API and point the CLI at it.
kubectl -n ${CP_NS} port-forward svc/${CP_SERVICE} 18080:${CP_PORT} &
export CP_CLI_ENDPOINT="http://127.0.0.1:18080"
xratu config profile set default --endpoint "${CP_CLI_ENDPOINT}" --use
Expected state. The deployment reports its rollout complete. Its pod runs
three containers, api, controller and scheduler, and the api container
serves port 8080.
Exit gate. The three health endpoints answer through the forwarded port.
curl -fsS "${CP_CLI_ENDPOINT}/v1/system/health/startup" >/dev/null && echo "startup ok"
curl -fsS "${CP_CLI_ENDPOINT}/v1/system/health/readiness" >/dev/null && echo "readiness ok"
curl -fsS "${CP_CLI_ENDPOINT}/v1/system/health/liveness" >/dev/null && echo "liveness ok"
If readiness never passes, the control plane is fail-closed on a finalization invariant rather than slow. See Finalization invariants and fail-closed startup.
Storage backend, profile and control-plane identity are latched on this first start and cannot be changed afterwards. See The identity latch.
Phase 2: identity and tenancy¶
Clear any stale token, then exchange your external identity. Run the block for your provider.
Create tenancy and bind any additional access.
xratu auth whoami
xratu create organization ${ORG} --set-active
xratu create workspace ${WS} --organization ${ORG} --set-active
xratu bind role admin --to group:xratu-platform-admins --organization ${ORG}
Expected state. xratu auth whoami resolves a real actor: actor_id is no
longer system, auth_context.mode is token, and
auth_context.token_provider names the provider you exchanged against. The
organisation and workspace exist, and the acting identity is bound as owner of
each.
Exit gate. The resolved actor is not the system actor.
A 403 cloud token exchange is disabled means the control plane's auth posture
forbids it; inspect it with xratu auth config-get. A 403 unable to resolve
actor from external token means the token is not one the control plane accepts
for that provider. See
External identity exchange.
Phase 3: enrollment authority¶
Expected state. Tenant-scoped enrollment authority exists for the organisation, and the pool is recorded and available for an installation or a manually minted invitation to scope to.
Exit gate. The pool is listed for the organisation.
Both commands are control-plane-only and need no node. See Bootstrap reconcile and Pool lifecycle.
Phase 4: nodes¶
Prepare the installation. The flags carry everything the installation needs, and what this renders is ready to apply. It reaches your cloud and cluster not at all, so it is also where you can read the generated Terraform before it runs.
The command is the same on every cloud; only the provider fields differ. Pick your cloud, and replace every value in angle brackets:
xratu dataplane install prepare ${ORG} ${POOL} ${DP_INSTALL} \
--provider gcp \
--dp-count 2 \
--artifact-registry <region>-docker.pkg.dev/<gcp-project-id>/<repository> \
--artifact-bucket gcs://<bucket>/<prefix> \
--project-id <gcp-project-id> \
--region <region>
The shortest required set of the three. Full detail, including the IAM roles and workload identity binding, is in Deploying on GCP.
xratu dataplane install prepare ${ORG} ${POOL} ${DP_INSTALL} \
--provider aws \
--dp-count 2 \
--artifact-registry <aws-account-id>.dkr.ecr.<region>.amazonaws.com/<repository> \
--artifact-bucket s3://<bucket>/<prefix> \
--account-id <aws-account-id> \
--region <region> \
--cluster-oidc-issuer https://oidc.eks.<region>.amazonaws.com/id/<cluster-oidc-id> \
--cluster-oidc-provider-arn arn:aws:iam::<aws-account-id>:oidc-provider/oidc.eks.<region>.amazonaws.com/id/<cluster-oidc-id>
The cluster's IAM OIDC provider must already exist, and a wrong OIDC value fails after apply rather than during it. Collect both values first: see Deploying on AWS.
xratu dataplane install prepare ${ORG} ${POOL} ${DP_INSTALL} \
--provider azure \
--dp-count 2 \
--artifact-registry <acr-name>.azurecr.io/<repository> \
--artifact-bucket azblob://<storage-account>/<container>/<prefix> \
--subscription-id <subscription-id> \
--tenant-id <tenant-id> \
--location <location> \
--resource-group <resource-group> \
--aks-oidc-issuer https://<location>.oic.prod-aks.azure.com/<aks-oidc-path>/ \
--artifact-registry-scope /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ContainerRegistry/registries/<acr-name>
The longest required set, because role assignments are scoped by resource ID. Full detail is in Deploying on Azure.
The registry and the bucket must already exist on every cloud. Terraform creates roles and policies; it creates neither.
This writes the install bundle under install/${DP_INSTALL}/: the Terraform
under terraform/, the five Kubernetes manifests under k8s/, the data plane
bootstrap document under xratu/, and two specs beside them.
install.spec.json is the bundle document apply consumes;
install.input.yaml is the normalised spec you edit and re-prepare from.
Apply it. This reads each generated file from disk as it uses it, so any edit you made is what reaches your cloud and cluster.
Or run both in one step. up prepares and applies in a single call, and is
the normal way to run an installation. It takes the same provider flags
prepare does:
xratu dataplane install up ${ORG} ${POOL} ${DP_INSTALL} \
--provider aws \
--dp-count 2 \
--artifact-registry <aws-account-id>.dkr.ecr.<region>.amazonaws.com/<repository> \
--artifact-bucket s3://<bucket>/<prefix> \
--account-id <aws-account-id> \
--region <region> \
--cluster-oidc-issuer https://oidc.eks.<region>.amazonaws.com/id/<cluster-oidc-id> \
--cluster-oidc-provider-arn arn:aws:iam::<aws-account-id>:oidc-provider/oidc.eks.<region>.amazonaws.com/id/<cluster-oidc-id>
xratu dataplane install up ${ORG} ${POOL} ${DP_INSTALL} \
--provider azure \
--dp-count 2 \
--artifact-registry <acr-name>.azurecr.io/<repository> \
--artifact-bucket azblob://<storage-account>/<container>/<prefix> \
--subscription-id <subscription-id> \
--tenant-id <tenant-id> \
--location <location> \
--resource-group <resource-group> \
--aks-oidc-issuer https://<location>.oic.prod-aks.azure.com/<aks-oidc-path>/ \
--artifact-registry-scope /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ContainerRegistry/registries/<acr-name>
up still writes the bundle to disk, so the record of what was applied is the
same. Split it into two commands when you want to read terraform plan before
the cloud layer runs. See The install contract.
Verify enrollment.
Expected state. Apply materialises the StatefulSet and its retained volume
baseline, project runtime authority, workload identity registration, the managed
private fabric and the enrollment token set, then scales the installation to
dp_count. Each node's init container performs the bootstrap join, presenting
its invitation code with the installation and instance identifiers and its node
label; the control plane validates the invitation's scope and returns a seed,
which is persisted with the node's identity state under
/var/lib/xratu/identity.
Exit gate. Every node in the installation is registered.
If a node never appears, the failure is in the join: endpoint reachability, the invitation and its scope, or token injection. See Diagnosing a node that will not enroll.
Phase gates at a glance¶
| Phase | Exit gate | If it fails |
|---|---|---|
| 1 | All three health endpoints answer | Finalization invariants |
| 2 | actor_id is not system |
External identity exchange |
| 3 | The pool is listed for the organisation | Bootstrap reconcile |
| 4 | Every node is registered | Diagnosing a node that will not enroll |
What the sequence assumes¶
Root tenancy creation is skipped when bootstrap activation already created your organisation and workspace; verify them instead.
Where day 0 ends¶
Day 0 ends at a verified enrollment. Your nodes can now build and deploy projects, and a deployed project runtime's kernel executes that project's agents and workflows itself.
Everything after this is day 2: rollouts, upgrades, scaling, drain, rotation and incident response, in Operate. For symptoms during day 0, see Verifying and troubleshooting day-0.