Deploy a data plane from an install spec¶
What you will end up with¶
An installation described by a file you keep, prepared and applied from that file, with values no flag exposes.
Prerequisites¶
- An organization with reconciled enrollment governance, and a pool.
kubectlandterraformavailable, and cloud credentials.
1. Get a starting spec¶
The quickest route is one flag-driven prepare, which writes the spec for you:
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>
2. Edit it¶
Open install/${DP_INSTALL}/install.input.yaml. The fields most worth setting
here are the ones no flag reaches:
contract_version: dataplane.install.spec.v1
organization_name: acme
dataplane_pool: edge-eu
dp_install: dp-eu-west1
dp_count: 2
provider: gcp
namespace: dp-eu-west1
workload:
kind: statefulset
artifact_registry:
path: <region>-docker.pkg.dev/<gcp-project-id>/<repository>
artifact_bucket:
path: gcs://<bucket>/<prefix>
scheduler_authority:
project_runtime_namespaces:
- dp-eu-west1-projects
model_runtime_namespaces:
- dp-eu-west1-models
build_namespaces:
- dp-eu-west1-builds
provider_config:
project_id: <gcp-project-id>
region: <region>
scheduler_authority is the reason to use a spec at all. Those three lists
decide what the node reports it can host, and a node with an empty
project_runtime_namespaces is rejected as a placement candidate however
healthy it is. See
Pools, tenant scope, and placement.
Leave a value empty to have the contract derive it.
3. Prepare from the spec¶
The positional arguments come from the file, so they are omitted here.
Expected output¶
{
"status": "prepared",
"operation": "prepare",
"dp_install": "dp-eu-west1",
"dp_count": 2,
"provider": "gcp",
"output_dir": "install/dp-eu-west1",
"written_file_count": 9
}
Confirm your edits reached the rendered output:
4. Apply¶
Or with positional arguments, which must match the spec:
5. Or do both from the spec¶
A spec and up fit together: the spec carries the installation, and up renders
and applies it in one call, on every cloud. See
Provider configuration.
6. Verify¶
Keeping the spec¶
Commit install.input.yaml alongside your other infrastructure. It is the
reproducible description of the installation, and re-preparing from it gives you
the same bundle.
Several installations means one spec each:
xratu dataplane install prepare --install-spec specs/dp-eu-west1.yaml
xratu dataplane install prepare --install-spec specs/dp-us-east1.yaml
If it fails¶
| Symptom | Cause | Fix |
|---|---|---|
contract_version rejected |
The file is not dataplane.install.spec.v1 |
Re-prepare with flags and edit the written file |
provider_config.<field> is required for <provider> |
A required field is empty in the spec | See Provider configuration |
artifact_registry.path must be a full registry root path |
The registry path names a host with no repository root | See Registry and bucket schemes |
... does not match prepared install bundle spec |
Positional arguments disagree with the spec | Omit them, or pass the spec's values |
| Node enrolled but never selected for placement | project_runtime_namespaces is empty |
Add it to the spec, re-prepare, re-apply |
What changed¶
| Object | State |
|---|---|
| The spec | A file you keep and re-prepare from |
| The bundle | Rendered from the spec, all nine files |
| Cloud and cluster | As in Deploy a data plane with provider flags |