Skip to main content

Deploy Container Stack

Overview

This tutorial walks through the 4-Contaienr-Stack collection — configuring a container image registry, creating and deploying a Container Stack to a WEDA Node device, and managing the stack lifecycle including pausing, resuming, and cleanup.

Prerequisites

Auto-captured Variables

VariableSet byUsed by
registryIdCreate Registry (AWS ECR)Stack creation, registry operations
uniqueStackNameCheck Stack Name AvailabilityCreate Stack
stackConfigIdCreate StackAll stack management requests
stackRevisionIdCreate StackDeploy, query, delete revision
deploymentTaskIdDeploy Stack to DeviceDeployment tracking
deploymentIdWait for Deployment Running StatusDelete Deployment

Folder 1 — Registry Mgmt

This folder manages container image registry connections. A registry config tells WEDA where to pull container images from when deploying a stack.

1. Create Registry (AWS ECR)

Creates a registry connection. Update the URL and credentials in the request body to match your registry.

  • API: Create Registry
  • Script: registryId saved to environment automatically
  • Result: 201 Created

2. Get All Registries

Lists all registry configs in the org.

3. Get Registry by ID

Retrieves details of the registry stored in registryId.

4. Update Registry

Updates the registry connection settings.

5. Delete Registry

Deletes the registry config stored in registryId.


Folder 2 — Stack Mgmt & Deployment

This folder covers the full flow from creating a stack to deploying it on a device.

6. Check Stack Name Availability

Checks whether the stack name in the request body is already in use.

  • Script: if name collision detected, auto-generates a unique name with a suffix and saves as uniqueStackName; otherwise saves the original name
  • Result: 200 OK

7. Create Stack

Creates a new Stack configuration using the Docker Compose definition in the request body.

  • API: Create Container Stack
  • Script: uses uniqueStackName as the stack name; saves stackConfigId and stackRevisionId
  • Result: 201 Created
tip

The request body contains a sample Docker Compose definition. Replace the image and service configuration with your own before sending.

8. Get Stacks

Lists all stack configurations in the org.

9. Delete Deployments under this Device

Clears any existing deployments on the target device before deploying a new stack. This step is optional — skip it if the device has no existing deployments.

  • Result: 200 OK or 204 No Content

10. Deploy Stack to Device

Deploys the stack revision to the target device. Confirm the deviceId in the request body is set to the correct device.

  • API: Deploy Container Stack
  • Script: deploymentTaskId saved to environment automatically
  • Result: 202 Accepted

11. Query Deployment Result

Manually queries the current deployment status. Use this for a one-shot check.

  • Endpoint: GET .../stack-configs/{{stackConfigId}}/revisions/{{stackRevisionId}}/deployments (revision-scoped; not yet published in the API Hub)
  • Result: 200 OK

12. Get Specific Stack Details

Returns the full configuration of the current stack revision.

13. Wait for Deployment Running Status

Waits until the deployment reaches Running state.

Automatic polling — do not click Send repeatedly

After you send this request once, the Postman script takes over. It automatically re-sends the request at a fixed interval until the deployment state becomes Running. Just wait — clicking Send again will reset the polling counter.

  • Endpoint: GET .../stack-configs/{{stackConfigId}}/revisions/{{stackRevisionId}}/deployments (revision-scoped; not yet published in the API Hub)
  • Script: polls until Running; saves deploymentId when confirmed; clears polling variables
  • Result: deployment state = Running

14. Get All Deployments (Org Level)

Lists all deployments across the org.

15. Get Stacks Deployments under Device

Lists all stack deployments on the current device.

  • Script: deploymentId updated from the first result
  • Result: 200 OK

16. Delete Deployment

Removes the stack deployment from the device.

17. Confirm Deployment Deletion

Verifies the deployment has been removed.

  • Result: 200 OK — deployment list is empty

18. Delete Stack

Deletes the stack configuration (revision and config record).

19. Confirm Stack Deletion

Verifies the stack has been removed.

  • Result: 200 OK — stack no longer appears in the list

Folder 3 — Stack Command

This folder sends lifecycle commands to a running Container Stack on a device.

note

The device must have an active deployment before running Stack Commands.

20. Execute Stack Command (Pause)

Pauses all containers in the deployed stack on the device.

21–23. Query Command Results

Three variants for retrieving command execution logs:

RequestFilter
Query Command Execution LogsNo range filter
Query Command Results — Without Range ParameterFetches all results
Query Command Results — Latest OnlyReturns only the most recent result

24. Execute Stack Command (Resume)

Resumes a paused stack.



Last updated on Jul-16, 2026 | Version 1.1.0