Portainer has an amazing feature that lets you manage remote edge compute devices from a single centralized instance. You can manage for up to 25,000 x86 or ARM based edge devices running on unreliable or highly latent networks with support for Windows and Linux Operating Systems.
This is Part 2 of the Using the Portainer Edge Agent, Edge Groups, and Edge Stacks How-to. In part 1, we explain endpoint tags and adding endpoints using the edge agent (part one available here).
In this tutorial we will learn how to enable the Edge Compute features of Portaner and how to manage Edge with Edge Groups and Edge Stacks.
- Let's start by enabling the Edge Compute feature. Click on Settings:
and scroll down to the the Enable edge compute features option:
- You will notice that now there is a new submenu on the left hand side of Portainer called Edge Compute:
- Let's start with Edge Groups. Please click on the option Edge Groups followed by Add Edge group:
- There are two ways of creating Edge Groups that you can name freely; Static and Dynamic:
- With Static you add endpoints manually by clicking on them:
- With Dynamic, endpoints are added to the Edge Group according to the Tags defined when these were added (please check my previous video of this How-to here).
- Dynamic groups has two ways of matching endpoints:
- Full match where the endpoints tags must match all Tags:
- Partial match where endpoints may have any of the Tags:
- Once you have your Edge Groups defined we can start deploying Stacks:
- To start deploying Stacks click on Edge Stacks and then on Add stack:
- There are four ways of adding Edge Stacks:
- via the Web editor where you can paste or type a
docker-compose
file;
- via the Upload option where you can upload a
docker-compose.yml
file;
- via the git Repository where you can download the
docker-compose.yml
online from github or compatible git repository, and;
- via the Template option where you can simply select a pre-defined Stack template.
- In our example I am going to deploy a mysql DB engine Edge Stack using the Web editor. Make sure to select a Name for your stack and select the Edge groups where you want to deploy the Edge Stack. One or Multiple Edge Groups can be selected. Once you finish adding your Edge Stack click on Deploy the stack:
- You will now see a Edge Stacks list page that will show the status of your deployment:
- Blue shows how many endpoints acknowledged the stack;
- Green shows how many endpoints successfully deployed the stack, and;
- Red shows how many endpoints failed to deploy the stack.
This is a simple and efficient way for you to manage your edge devices with Portainer. If you have any questions or comments, please drop them into the comments section below, or join us on our Slack channel.
Video walk through available here:
See for yourself, with a demo or free trial
Let us introduce you to a world of fast and easy app deployment, governance, and management in Docker/Swarm and Kubernetes. Join a group demo to see how Portainer Business helps to make Engineering and DevOps teams more accurate and efficient in container management.