Deploy Container Stack
Overview
This tutorial walks through the 4-Container-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
- Completed Get Access Token —
accessTokenis set - Completed Manage Organizations —
org_idis set - A WEDA Node device registered and activated (for deployment steps)
Auto-captured Variables
| Variable | Set by | Used by |
|---|---|---|
registryId | Create Registry Config | Registry get, update, delete |
uniqueStackName | Check Stack Name Availability in Org | Create Stack |
stackConfigId | Create Stack | All stack management requests |
stackRevisionId | Create Stack | Deploy, get details, delete revision |
finalStackName | Create Stack | Check Stack Name Availability in Org |
deploymentTaskId | Deploy Stack to Device | Deployment tracking |
deploymentId | List Stacks Deployments in Device | Deployment tracking |
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 Config (Custom Registry)
Creates a registry connection. Update the URL and credentials in the request body to match your registry.
- API: Create Registry
- Script: saves
registryIdas a collection variable - Result:
201 Created
2. Get All Registry Configs
Lists all registry configs in the org.
- API: List Registries
- Result:
200 OK
3. Get Registry Config by ID
Retrieves details of the registry stored in registryId.
- API: Get Registry
- Result:
200 OK
4. Update Registry Config
Updates the registry connection settings.
- API: Update Registry
- Result:
200 OK
5. Delete Registry Config
Deletes the registry config stored in registryId.
- API: Delete Registry
- Result:
204 No Content(no response body)
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 in Org
Checks whether the stack name in the request body is already in use.
- API: List Stack Configs, filtered by
stackName - Script: if the name is already taken, generates a unique name with a suffix and saves it as
uniqueStackName - Result:
200 OK
Create Stack prefers uniqueStackName whenever that variable holds a value, and the script only
sets it on a collision. If an earlier run left a value behind, the next run reuses that old name
even when your original name is free. Clear uniqueStackName between runs to start from the
original name.
7. Create Stack
Creates a new Stack configuration using the Docker Compose definition in the request body.
- API: Create Container Stack
- Script: uses
uniqueStackNameas the stack name; savesstackConfigIdandstackRevisionId - Result:
201 Created
The request body contains a sample Docker Compose definition. Replace the image and
service configuration with your own before sending.
8. Get Stacks by Organization
Lists all stack configurations in the org.
- API: List Stack Configs
- Result:
200 OK
9. 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: saves
deploymentTaskIdas a collection variable - Result:
200 OK
200 OK means WEDA accepted the request and recorded what it will do per device, which the
response returns as deviceActions. It does not mean the containers are running yet. Use
List Stacks Deployments in Device below to watch the state.
10. Get Specific Stack Details
Returns the full configuration of the current stack revision.
- API: Get Stack Revision Config
- Result:
200 OK
11. List Stacks Deployments in Device
Lists the deployments on the current device, filtered to stackConfigId. Run this after
deploying to watch the state progress toward Running.
- API: Get Stack Deployments
- Script:
deploymentIdsaved from the first result - Result:
200 OK
12. Clear Device Containers
Removes every stack deployment from the device.
- API: Clear Device Containers
- Result:
204 No Content(no response body)
This clears all deployments on the device, not just the one created in this tutorial.
13. Delete Stack Revision
Deletes the stack revision. A revision cannot be deleted while it still has an active deployment — run Clear Device Containers first.
- API: Delete Stack Revision
- Result:
204 No Content(no response body)
14. Confirm Stack Deletion
Re-requests the revision to verify it is gone.
- API: Get Stack Revision Config
- Result:
404 Not Found— the revision no longer exists
15. Query deployment by device
Lists every deployment on the device, with no stackConfigId filter. Use it to confirm
the device has nothing left after cleanup.
- API: Get Stack Deployments
- Result:
200 OK
Folder 3 — Stack Command
This folder sends lifecycle commands to a running Container Stack on a device.
The device must have an active deployment before running Stack Commands.
16. Manage Container State (Pause)
Pauses all containers in the deployed stack on the device. The request body carries the
stackConfigId identifying which stack to act on.
- API: Manage Container State
- Result:
200 OK
17. Latest Container State Changing Results
Retrieves the outcome of the most recent command, filtered by stackConfigId with
range=latest.
- API: List State Changing Results
- Result:
200 OK
range accepts all (the default) or latest. The collection uses latest so you see the
result of the command you just sent rather than the full history.
18. Manage Container State (Resume)
Resumes a paused stack.
- API: Manage Container State
- Result:
200 OK
Related
- For API details and developer reference: Container Management
- For stack concepts and API details: Container Stack