Portainer icon

Portainer

Work with Portainer API data to manage Docker

Edge Stack → Update

AI-generated

Overview

This node operation updates an existing edge computing stack in Portainer. It allows users to modify the stack's configuration, including the stack file content (docker-compose.yml), the edge groups where the stack is deployed, and deployment options such as pre-pulling images and retrying deployment on failure. Environment variables can also be set for the stack. This operation is useful for managing and updating edge computing stacks in distributed environments, ensuring that the stack configuration is current and deployment settings are adjusted as needed.

Use Case Examples

  1. Updating the stack file content to deploy a new version of services on edge devices.
  2. Changing the edge groups where the stack is deployed to target different sets of devices.
  3. Enabling pre-pull of images to speed up deployment on edge nodes.

Properties

Name Meaning
Edge Stack ID The unique identifier of the edge computing stack to update.
Edge Group IDs Comma-separated list of edge group IDs where the stack will be deployed.
Pre Pull Image Boolean flag indicating whether to pre-pull images before deployment.
Retry Deploy Boolean flag indicating whether to retry deployment in case of failure.
Stack File Content Contents of the docker-compose.yml file or stack file defining the stack services and configuration.
Environment Variables Environment variables to set for the edge stack, provided as name-value pairs.

Output

JSON

  • body - The response body from the Portainer API after updating the edge stack, typically containing the updated stack details or status.

Dependencies

  • Portainer API with appropriate authentication credentials

Troubleshooting

  • Ensure the Edge Stack ID is correct and the stack exists in Portainer before attempting to update.
  • Verify that the Edge Group IDs are valid and correspond to existing edge groups.
  • Check that the stack file content is valid YAML and correctly formatted for Docker Compose.
  • If deployment fails, verify network connectivity to edge nodes and Portainer server.
  • Authentication errors may occur if API credentials are missing or invalid; ensure proper API key or token is configured.

Links

Discussion