Skip to main content

Migrating to Multi-service Workloads

Every configuration now uses spec version 2: a set of named services. Existing single-image configurations are converted for you, and devices on older agents keep running what they run today. This page covers what changes, what stays the same, and how older devices are handled.

What happens to existing configurations​

A version 1 configuration becomes a set with one service named app. The conversion is lossless in both directions: for every stored configuration, converting to version 2 and back gives the original byte for byte, and devices on older agents receive exactly the workload they received before.

Version 1Version 2
image, command, environment, ports, mounts, registry_credential_idservices.app.*
options.tty, options.read_only_root, options.ephemeral_rootservices.app.tty, readOnlyRoot, ephemeralRoot
volumes (name, source, destination, options, backup)A set-level volumes.<name> (source, options, backup) and an attachment services.app.volumes (name, destination, readOnly when options contain ro)
options.host_namespaces: ["network"]network.mode: host. Without it, network.mode: bridge.
options.all_devices_allowedoptions.isolateDevices, inverted
options.host_resolvconf, options.host_hosts_fileoptions.hostResolv, options.hostHosts
Other options.* (exposeDBus, disableHostBluetooth, image_cleaning, and the legacy settings)Set-level options.*, with image_cleaning as imageCleaning
edgewire.services[]The same, with service: app
signaturePolicy, desiredStateSame keys
Secret files (attached to the configuration or device, not part of the spec)services.app.secrets: ["*"], so the service sees every file in scope, as before

Things to know:

  • Secrets. ["*"] keeps today's behaviour for migrated configurations. New services you add see no secret files until you list them, so narrow app to the files it needs when you add services next to it.
  • Host namespaces. Only the network namespace can be shared. A version 1 configuration that lists another host namespace is not accepted as input to the API, and the stored copy stays in version 1 so its devices do not change.
  • Storage. Existing rows without a spec.version are read as version 1 and converted in memory. New versions are written in version 2, and a one-off job rewrites older rows when the conversion is exact. Old versions stay readable, so history, diff, duplicate and rollback keep working across the change.
  • The default configuration. A fleet with no configuration still receives its default workload, now expressed as a one-service set on host networking.
  • Device overrides. Overrides written for a single workload are converted the same way and apply to app: env.NAME becomes services.app.environment.NAME, image becomes services.app.image, and options move to the service or the set. In version 2 you address a service explicitly, for example admrl override device edge-1 --set services.app.environment.LOG_LEVEL=debug.
  • Container names. A service's container is named <instance>-<service> instead of carrying the configuration name. Filter logs by service rather than by container name. Anything outside Admiral that matched the old container name needs updating.
  • Rollouts in flight. A rollout judges devices by configuration version and set state, not by comparing image strings, because several services can carry different images. Rollouts that were running when the change shipped finish on that basis.

Splitting a single workload into services​

  1. Duplicate the configuration so the original stays as a fallback.
  2. Edit the copy: keep app and add the new services next to it, or rename app to something meaningful.
  3. Give each service the secrets, volumes and ports it needs. Published host ports must not repeat across services.
  4. Assign the copy to a test fleet first, then roll it out.

Volumes are keyed by name in version 2. Existing volume data is kept: on the first version 2 apply the device re-keys each volume by its name, leaves a compatibility link at the old path, and deletes nothing.

API compatibility window​

  • Responses are always version 2.
  • POST /v1/configurations and PUT /v1/configurations/{id}/spec still accept the version 1 shape (no version, top-level image) for one release. The request is converted to a single service named app on write.
  • Such a response carries a Deprecation header (RFC 9745), for example Deprecation: @1793750400, and the write is recorded in the audit log as a version 1 submission. Use that to find clients still sending version 1.
  • After the window, version: 2 is required.

Move scripts, CI and integrations to version 2 during the window. The MCP server builds version 2 specs. Configuration documents you edit with admrl edit and admrl apply are sent as written, so write them in version 2.

Older devices​

Multi-service sets need an agent that reports desired-state protocol 2. Devices on older agents are handled in two ways.

The set has a single-service form. The device receives the same workload as before, and nothing changes. A set has one when it has one service, the service uses restart: always, and it uses none of the features that need the new agent: resources limits, dependsOn, healthcheck, secrets other than ["*"], a hostPort different from port, volume backup settings, volumes that the service does not attach, an EdgeWire service naming another service, configs, or any of the per-service fields listed under Agent features.

The set has no single-service form. An older agent cannot run it, so:

  • The device keeps the last workload it could run. It is not stopped.
  • Its device document shows the WorkloadUnsupported condition (reason AgentProtocol), and Admiral raises a notification for the device.
  • Admiral refuses to assign or roll out the set to such devices. These requests are refused with 409 and the error code unsupported_by_agent:
    • assigning the configuration to a fleet,
    • creating a rollout,
    • moving a device into a fleet that follows the configuration,
    • changing a device's override so the result needs the new agent.

The response lists the devices that cannot run the set:

{
"error": "unsupported_by_agent",
"message": "2 device(s) run an agent without multi-service support; upgrade them or move them to another fleet first",
"required_protocol": 2,
"count": 2,
"devices": [
{ "id": "00000000-0000-0000-0000-000000000001", "name": "dock-07", "agent_version": "v2026.10.1", "protocol": 1 }
],
"blockers": [
"spec.services: 2 services; version 1 runs exactly one"
]
}

count is the exact number of devices; devices lists up to 200 of them, sorted by name. blockers says why the set has no single-service form. The dashboard shows the list in the rollout and assignment dialogs, and the MCP server returns it as is.

To resolve a refusal, update the listed devices with a system update to an Admiral OS release that includes multi-service support, or move them to a fleet that keeps the single-service configuration, then try again.

Agent features​

Protocol 2 gets you multi-service sets. Individual settings need more: a device's agent reports the optional features it implements every time it asks for its desired state, and Admiral checks each configuration against them. A feature is named for the fields it covers:

FeatureFields that need it
process.argsargs
process.useruser, groupAdd, workingDir, processDefaults: image
net.nameshostname, aliases, extraHosts
net.dnsdns
labelslabels
restart.maxrestartMaxAttempts
security.privilegedprivileged
security.capscapAdd, capDrop
devicesdevices
limits.ulimitsulimits
limits.sysctlssysctls
limits.shmshmSize
limits.cpuresources.cpus
limits.pidsresources.pids
limits.memlowresources.memoryReservation
stopstopSignal, stopGracePeriod
initinit
healthhealthcheck, with any content
deps.healthydependsOn with service_healthy
deps.completeddependsOn with service_completed_successfully
configsconfigs

Admiral works out the features from the fields a service sets, so you never list them. The compose import shows them as a warning on the service, for example needs agent features health, deps.healthy; devices whose agent lacks them refuse it.

A device can refuse a configuration, in three places:

  1. Admiral refuses to send it. Assigning the configuration to a fleet, creating or advancing a rollout, moving a device into a fleet that follows the configuration, changing a device override, and saving a new version of a configuration that a fleet follows are all refused with 409 unsupported_by_agent when a target device lacks a feature. The response lists each device and the features it lacks:

    {
    "error": "unsupported_by_agent",
    "message": "1 device(s) run an agent without the features this set needs (health); upgrade them or move them to another fleet first",
    "required_protocol": 2,
    "count": 1,
    "devices": [
    { "id": "00000000-0000-0000-0000-000000000001", "name": "dock-07", "agent_version": "v2026.10.1", "protocol": 2, "missingFeatures": ["health"] }
    ],
    "blockers": ["spec.services.db: needs agent features health"],
    "missingFeatures": ["health"]
    }
  2. Admiral holds back the new version. Admiral checks again every time it builds what a device should run. If a device follows a configuration it cannot run, for example because the device was updated to an older agent, Admiral sends the newest earlier version of the configuration that the device can run. If there is none, it sends no workload at all and the device keeps what it is running. Either way the WorkloadUnsupported condition on the device document reads configuration "shop" version 8 needs agent features the device does not report: db: health.

  3. The agent checks again. Each service in the set Admiral sends carries the features it needs. An agent that lacks one refuses the whole set and the previous set keeps running. This protects against a stale record or a downgraded agent.

An agent that reports protocol 2 but no feature list is treated as having none. Health checks need the health feature, so a service with a healthcheck is refused on such an agent. Before the feature list existed, those agents accepted health checks and silently ignored them.

To resolve a refusal, update the listed devices to an Admiral OS release whose agent supports the features, or move them to a fleet that follows a different configuration. The check runs again on the next assignment, rollout or save.

Webhook consumers​

workload.* payloads gain an optional service field, and two events are new. Parsers that read the payload by key are unaffected; see Webhooks. Event data is a positional list as before. For events about one service the device can add the service name as a trailing element, so do not rely on the list length.