Production Deployment¶
Overview¶
Production images are built by CI on every version tag and stored in:
- ECR - individual module images, tagged with the version
- S3 - combined Tezi image and Docker Compose file (
s3://parametric-sds-algol-app/images/) - Torizon Cloud - Tezi combined image uploaded for OTA fleet updates
Deploying to a Device¶
Via Torizon Cloud (OTA)¶
- Push a version tag (
git tag vX.Y.Z && git push origin vX.Y.Z). - CI builds and uploads the combined Tezi image to Torizon Cloud.
- Schedule the update in Torizon Cloud for the target device or fleet.
Manual Deploy (Dev/Test)¶
# Ensure S3 is accessible
aws s3 ls s3://parametric-sds-algol-app/images/
# Build and push a tagged image
./scripts/build-image.sh
./scripts/manual-prepare-dev-image.sh
./scripts/manual-deploy-dev-image.sh --remote-host <device> --reboot
Either way, a fresh device needs its first key enrolment after the first boot - see Device Setup.
Docker Compose¶
The production Compose file is stored in S3 and tagged by version. Each service runs read-only with tmpfs for ephemeral data:
services:
configurer:
image: <ecr>/algol-app-configurer:v0.41.0
read_only: true
tmpfs:
- /run
- /tmp
volumes:
- algol-config:/run/algol/config
Filesystem Layout¶
Persistent data on the host (mounted into containers):
| Path | Content |
|---|---|
/var/algol/config/ |
Persisted component configs (one JSON file each) |
/var/algol/recordings/ |
In-progress and completed parquet files |
/var/algol/secomea/ |
SiteManager state (sme.txt, serial, license) |
/var/algol/cfg/bundles/ |
Installed configuration bundles, one JSON file each |
/var/algol/cfg/secrets/ |
Secret values, one 0600 file per declared secret |
/var/algol/nats/registry.json |
Bus identity registry: module bindings and enrolled user keys |
/var/algol/<id>/.nats/ |
Each module's own bus key (identity.nkey), generated on first start |
/var/algol/bin/ |
The algol wrapper (today a docker exec into the nats container - see Device Setup) |
See ADR-005 for the filesystem layout decisions.
Configuration Provisioning¶
Initial device configuration is provisioned by one algol manifest import on the device,
followed by one algol secret set per secret the manifest declared - see
Device Setup for the walk-through and for how the
manifest is authored. The import persists, so nothing is committed afterwards.
Startup config files under the configurer's config directory (/var/algol/config, one file
per component) remain the storage, and writing them directly is still possible; the
manifest is the surface that puts a coherent set there in one act
(RFC-014).
See Configurer for persistence details.
Secret Management¶
A secret (RFC-001)
is a secret config declaration plus a value the configurer stores under
/var/algol/cfg/secrets/ and serves on the secret's own command subject - never an
environment variable and never part of a config body. Declare, set and rotate with
algol secret set (CLI - secrets); a config references the
value by ref (for example wlan's pskRef). Setting values needs the bus
authentication from Device Setup to be in place first - the value's
confidentiality on the bus rests on it.