Deploy Your First Application
Deploy an application to the edge device you connected in Onboard Your Device. This walkthrough uses a small nginx web server, saved as Stack nginx, on ARK-2252-cc827fdd1713. The screenshots show its initial revision progressing from Deploying to Running.
Before you begin, check the following:
- Device: The device from Onboard Your Device is Activated and Connected.
- WEDA Node: WEDA Node is running on that device.
- Organization: Use the same organization for the device, stack and deployment.
Download the sample Compose file, create a Stack, deploy it and verify the result:
The device pulls application images from the container registry. WEDA Cloud coordinates deployment and receives the device's reported status.
Prepare Your Container and Compose File
Open the sample docker-compose.yml, or download docker-compose.yml for upload to WEDA Console. The complete file is:
services:
web:
image: nginx:1.27-alpine
ports:
- "8080:80"
restart: unless-stopped
This sample runs one web service and publishes the device's port 8080 to the container's port 80. It does not require Stack environment variables, a separate .env file, host configuration files or models. Confirm that port 8080 is available and that the device can reach Docker Hub to pull the image.
For a different application, choose an image that supports your device's CPU architecture, hardware and runtime requirements. A Ready-to-use application from Advantech Container Catalog (ACC) may provide a Compose file through its Advantech Container Github Repository link. Follow that application's preparation instructions, including any required environment values, host files or hardware access. You can also publish your own image to a registry reachable by the device and prepare its Compose file.
A Ready-to-develop project from ACC must be built before deployment. Complete its development and build instructions to produce the application image you intend to run.
Before continuing, have these items ready:
- Application image: The image name and tag for the application you will run.
- Compose file: The service definitions and settings required by the application.
- Registry information: For images in a private registry, the registry URL and type, plus the credentials required to pull its images.
- Application settings: Values for required environment variables and any ports, files or hardware access described by the application's instructions.
Add a Container Registry
If all images in your Compose file permit anonymous pulls, continue to Create a Container Stack. If any image requires authentication, configure its registry access using the optional steps below.
Configure access for images that require registry authentication
A registry configuration provides the registry address and credentials needed to pull private images. If a suitable configuration already exists in this organization, check its registry address and access details before reusing it. To create a configuration, follow these steps:
-
In WEDA Console, select the organization containing your target device and open Registries.
-
Select Add.
-
In Basic information, enter:
- Registry Name: Up to 32 characters, unique within the organization.
- Registry URL
- Registry Type
-
Fill in the Credentials required by that registry type:
- Docker Hub: Username and access token.
- Azure ACR: Username and password.
- AWS ECR: Provide the region, access key and secret key together for authentication, or leave all three empty for anonymous access.
- Custom registry: Username and password together, only if the registry requires authentication.
-
Select Submit, then Add in the confirmation dialog.
Check the result: The registry configuration appears in the selected organization's list.
Create a Container Stack
A container stack has two related concepts:
- Stack Configuration: A named application definition based on a Docker Compose file.
- Stack Revision: A particular version of that definition.
Creating a stack establishes its initial revision, which provides the application definition for your first deployment.
- Open Container Stacks in the left navigation and select Add.
-
Enter Stack name
nginx, or another name that is not already used by an existing Stack. A duplicate name is rejected. To publish a new version of an existing Stack, edit that Stack instead. Follow these naming rules:- Use lowercase letters, digits and hyphens only.
- Use no more than 63 characters.
- Do not start or end with a hyphen, or use consecutive hyphens.
-
Select Compose as the type. For this example, enter description
nginx-example. -
Upload the downloaded
docker-compose.yml.
- Leave Environment variables empty for this sample. For another Compose file that references
${VARIABLE_NAME}, supply the required values here. - Select Submit, then Add in the confirmation dialog.
Check the result: The stack appears as nginx (v1) in the list. Saving this definition is separate from deploying it to a device.
Deploy the Stack to Your Device
- In Container Stacks, find
nginx (v1)and select its Deploy action. - In the Device list, select your target WEDA Node. The screenshot selects
ARK-2252-cc827fdd1713, which is Activated and Connected. Confirm that the page heading identifiesnginx(v1).
- Select Submit, then Deploy in the confirmation dialog.
Check the result: Track the deployment status reported for the selected device. Keep the device connected while deployment proceeds.
Verify Deployment and Runtime Status
Check the device's deployment result and its container runtime states after submission.
-
Confirm that you are viewing the intended stack and target device in WEDA Console.
-
Inspect the reported deployment status and any error information.
-
Confirm that the application's required containers reach their intended runtime state:
- Long-running service: Check that its required containers are running.
- One-shot task: Inspect its completion result.
-
Open
http://DEVICE_IP:8080in a browser, replacingDEVICE_IPwith your WEDA Node's reachable IP address. The nginx sample should display its default welcome page. The Console screenshot confirms Running; this browser check verifies that the web service is reachable.
Check the result: Complete this walkthrough only after the expected services are running, or the intended task has completed, and you have checked the application's result.
A running container confirms that its process is up. Use the application's output or interface to check that it is working as intended.
If deployment or startup fails, begin with the reported error:
| Symptom | What to check |
|---|---|
| Images cannot be pulled | Image names and tags, registry address, credentials, and network access from the device. |
| Deployment fails during startup | Compose settings, image compatibility with the device, port conflicts, and required files or hardware. |
| Containers exit or keep restarting | The reported container error and the application's own configuration and logs. |
| The application cannot be reached | Its documented endpoint, published ports, network access and application readiness. |
Continue with Feature Guides: Container Management for ongoing updates and container operations.