跳至主要内容

Container Deployment & Commands

Overview

Container Deployment pushes a specific Container Stack revision to one or more WEDA Nodes. WEDA Node handles image pulling, signature verification, and container lifecycle on the edge device. Deployment status is synchronized back to WEDA Core — updates are visible within approximately one minute.

Container Commands let you control the runtime state of already-deployed stacks without redeploying — useful for pausing a workload during maintenance or restarting after a configuration change.

Deployment Flow

Deployment States

The deployment API reports the following aggregate states for each Stack on a device:

StateDescription
unknownThe deployment status could not be determined
pendingThe desired Stack revision is queued but deployment has not started
deployingWEDA Node is validating the Compose configuration, pulling images, or starting containers
awaitingDeployedStatusCompose has started the services and WEDA Node is waiting to confirm their runtime status
runningAt least one container in the Stack is running
deployedAll services declared by the Stack have started successfully
completedA one-shot Stack finished successfully
exitedAll containers in the Stack have exited. Inspect containers[].error and reason for details
pausedAll containers in the Stack are paused
stoppedAll containers in the Stack are stopped but still exist on the device
removingWEDA Node is running Compose down to remove the Stack
awaitingRemovedStatusCompose down has completed and WEDA Node is confirming removal
awaitingCleanupThe Stack was removed and WEDA Node is cleaning up local files and bookkeeping
retryA deployment phase failed temporarily and has been scheduled for retry
errorDeployment or a runtime operation failed. Inspect reason and container errors for details
Internal deployment phases

WEDA Node internally downloads and verifies the signed Stack package, validates the Compose configuration, pulls images, and starts containers. These internal phases are represented by the public deploying status rather than separate API status values.

Each entry in containers[] reports its own state and, when it failed, an error object with code, message, a timestamp (ISO 8601), and details:

{
"status": "exited",
"containers": [
{
"id": "66edbb7e-24b1-4622-bbe2-9f63cfef5565",
"name": "edge_neuvector-headless-nv-1",
"state": "exited",
"error": {
"code": "OOMKilled",
"message": "Exited (137) 4 seconds ago",
"timestamp": "2026-04-30T09:05:46Z"
}
}
]
}

Operations

Deployment

OperationAPIDescription
Deploy StackPOST /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}/revisions/{stackRevisionId}:deployDeploy a specific revision to one or more WEDA Nodes
List Deployments (Org)GET /api/v1/orgs/{orgId}/stack-configs/deploymentsList all stack deployments across devices in an Org
List Stacks on DeviceGET /api/v1/devices/{deviceId}/docker/stacksList Docker stacks currently deployed on a specific device
Undeploy a StackDELETE /api/v1/devices/{deviceId}/docker/stacks?stackConfigId={stackConfigId}Remove one specified Stack while preserving other Stacks on the device
Undeploy All StacksDELETE /api/v1/devices/{deviceId}/docker/stacksRemove all active Stack deployments from a device
Clear All DeploymentsDELETE /api/v1/devices/{deviceId}/stacks/deploymentsReset the device to an empty Stack configuration and delete all deployment records
Clear All Deployments is irreversible

DELETE /api/v1/devices/{deviceId}/stacks/deployments stops and removes every container stack on the device and permanently deletes all deployment records. Use only when intentionally resetting a device to a clean state.

Stack removal is asynchronous. A successful API response acknowledges the removal request but does not guarantee that WEDA Node has already removed every container. Check the device's deployment and container status to confirm completion.

Container Commands

OperationAPIDescription
Execute CommandPOST /api/v1/devices/{deviceId}/docker/stacks/commands:{action}Execute a runtime command on a deployed stack
Get Command ResultsGET /api/v1/devices/{deviceId}/docker/stacks/commands/resultsRetrieve results of previously executed commands

Available {action} values: start, stop, pause, resume, restart

Constraints

Deployment

  • Target devices must be activated. An activated device may be online or offline when the deploy request is issued
  • If an activated device is offline, the desired Stack configuration remains queued and is applied after the device reconnects
  • A single deploy call supports up to 128 device IDs
  • Target devices and the Stack Config must belong to the same Org
  • WEDA Core returns a per-device action for each target: add (new), update (revision upgrade), or skip (same revision already deployed)

Container Commands

  • Commands are volatile — unlike Stack deployment (which is queued and applied once the device reconnects), a command is not retried or queued if the device is offline
  • If the device is offline when a command is issued, the API still returns 200 OK (request accepted), but the command is discarded before reaching the device — it will not be delivered or executed once the device reconnects
  • Confirm the device is online before issuing a command that must take effect, or check the device's status via List Stacks on Device beforehand
  • Use command results to verify whether WEDA Node executed the requested action successfully
  • Command results are cached for 1 hour; results older than 1 hour cannot be retrieved

Scenario

A system integrator deploys a monitoring stack to all devices on a factory line, then restarts it after updating a configuration file:


Last updated on Jul-17, 2026 | Version 1.1.0