Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Edge Stack → Create
AI-generatedOverview
This node operation creates a new edge computing stack in Portainer. It is useful for deploying and managing edge stacks across specified edge groups in an edge computing environment. Users can define the stack's name, deployment type (Docker Compose, Docker Swarm, or Kubernetes), stack file content (such as a docker-compose.yml), and environment variables. Additional options include pre-pulling images before deployment and retrying deployment on failure. This operation is beneficial for automating edge stack deployments in distributed edge computing scenarios.
Use Case Examples
- Deploy a new edge stack named 'MyEdgeStack' to edge groups 1, 2, and 3 using Docker Compose with a specified docker-compose.yml content.
- Create an edge stack with environment variables set for configuration and enable pre-pulling of images to optimize deployment speed.
Properties
| Name | Meaning |
|---|---|
| Edge Stack Name | Name of the edge computing stack to be created. |
| Edge Group IDs | Comma-separated list of edge group IDs where the stack will be deployed. |
| Deployment Type | Type of deployment for the edge stack, options include Docker Compose, Docker Swarm, or Kubernetes. |
| 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 be set for the edge stack, provided as name-value pairs. |
Output
JSON
Name- Name of the created edge stack.StackFileContent- Content of the stack file used for deployment.EdgeGroups- Array of edge group IDs where the stack is deployed.DeploymentType- Type of deployment used for the stack.PrePullImage- Indicates if images are pre-pulled before deployment.RetryDeploy- Indicates if deployment retries are enabled.
Dependencies
- Portainer API with an API key credential for authentication
Troubleshooting
- Ensure the Edge Group IDs are valid and exist in the Portainer environment to avoid deployment errors.
- Verify that the stack file content is correctly formatted as a valid docker-compose.yml or stack file to prevent deployment failures.
- Check API key credentials and base URL configuration to ensure successful communication with the Portainer API.
Links
- Portainer Edge Stacks API Documentation - Official API documentation for managing edge stacks in Portainer.