Container Stack Management
Overview
A Container Stack is a Docker Compose-based application definition stored in WEDA Core. Create a Stack from a Compose file, then save changes as new revisions so you can choose which configuration to deploy to your WEDA Nodes.
Revisions let you compare changes, deploy different configurations to different devices, or select an older configuration for deployment.
| Field | What it identifies |
|---|---|
stackConfigId | The Stack across its revisions. Keep this ID when updating the same application definition. |
stackRevisionId | One saved revision. Use this ID when reading, comparing or deploying a particular revision. |
version | The revision's version number. Use the returned value for display; an API requesting a revision ID needs stackRevisionId. |
Updating a Stack creates a new revision. Devices continue using their deployed revision until you explicitly deploy another one. Saving a new revision does not update a running application.
Create a Stack
The Console example uses a single-service nginx Stack. The API example below uses a separate factory-monitor application to demonstrate environment variables and revision comparison.
In WEDA Console
Open the sample docker-compose.yml, or download docker-compose.yml. It runs nginx:1.27-alpine as service web, publishing host port 8080 to container port 80. This file needs no environment values or prepared host files. Check that port 8080 is available before deploying it.
- Select the Org containing the target devices and registry configuration.
- Open Container Stacks.
- Select Add and complete Basic information:
- Stack name:
nginx. - Type: Compose.
- Description:
nginx-examplein this example. This field is optional. - Docker compose file: Upload the downloaded
docker-compose.yml.
- Stack name:
- Leave Environment variables empty for this nginx file. For a Compose file using
${VARIABLE_NAME}, supply its required values here. - Select Submit, then Add in the confirmation dialog.
Check the result: nginx (v1) appears in the selected Org. Check the saved Compose content before deploying it. Saving the Stack is separate from running it on a device.