App module
Layer 6. Services. Services It admits an app and runs the deployment.
Source: modules/app/ (ce module); the licence/runtime gates live in this repo’s modules/app/.
At a glance
Section titled “At a glance”| CLI | none |
| Subcommands | 3 |
| HTTP endpoints | see the route reference |
| Events emitted | see the event reference |
| Error codes | see the error code reference |
| Service classes | Service |
| Cross-module deps | backup, clone, cluster, dns, events, export, job, metrics, network, node, quota, repo, schedule, stack, storage |
Source layout
Section titled “Source layout”| File | Responsibility |
|---|---|
service.go | Admission and deployment rows |
install_async.go | Daemon operation runners |
install_runner.go | Render, runtime execution and teardown |
compose_driver.go | Runtime project operations |
compose_progress.go | Per-service progress observations |
deployment_status.go | Status and health derivation |
router.go | HTTP handlers |
commands/ | CLI entry points |
HTTP API
Section titled “HTTP API”Routes are listed in the generated route reference; request/response notes live in the API reference.
Events emitted
Section titled “Events emitted”Event codes, durability class, and payload shapes are listed in the generated event reference.
Errors
Section titled “Errors”Typed errors are catalogued in the error code reference with HTTP statuses and message templates.
Responsibilities
Section titled “Responsibilities”The app module turns an app into a running deployment. Service.Install
validates admission and writes the queued intent; RunInstallWithObserver
drives ExecuteCompose on the selected node. Install, update and uninstall
require shcd. An unreachable daemon returns X503738DMNREQ.
The leader renders once (modules/app/install_runner.go): it resolves
variables and integrations, then applies SHC’s compose rules. Nodes
materialise that result. They do not render. A node runs one of docker,
podman, incus or apple; the runtime must support the deployment’s keys. See
compose keys for the input contract.
Placement uses node labels and --where / --prefer, with reusable rules
through shc node selector and shc constraint. Published ports use --expose.
install_runner.go writes the deployment’s rendered files and
manifest.json. Replica-project execution uses the pod plan when enabled
for that node. See runtime support
and replica projects.
The stack module controls a running deployment. The
backup module owns backup and restore; the
job module runs declared jobs.