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.
In this How-To we are going to learn how to enable the edge compute feature of Portainer that I have split into two parts:
- The first part will show how simple it is to add edge devices via the Edge Agent and the importance of using tags for endpoints;
- in the second part I show how to enable the Edge Compute features of Portainer and how to manage edge devices with this feature.
- Start by logging in your Portainer instance and selecting the Endpoint -> Tags menu option:
Tags help you organize your endpoints based on criteria. So for instance let's say we have 4 different categories that you may want to group your endpoints in: architecture, geography, image and function
- You can add your tags freely as these are simple text inputs:
- Considering the criteria I mentioned item #1 I added:
- Architecture: x86 and arm64
- Geography: north and south
- Image: mysql, redis and prometheus
- Function: metrics and db
You can use whatever criteria you prefer. As you can see Tags are very easy to add.
Adding Endpoints with the Edge Agent on Portainer
- Start by clicking on Endpoint -> Add endpoint:
- Select Edge Agent:
- You can name your endpoint accordingly. One very important detail is to make sure that the IP address of the Portainer server URL matches the one of the machine where the endpoint is going to be added:
- Add the tag or tags that you want for this endpoint using the criteria you believe is appropriate for the device:
- On the Endpoint details page make sure to select Docker Swarm for the agent. For now the Edge Compute feature of Portainer only supports docker swarm nodes:
Make sure to click on the Copy command button in order to deploy the portainer agent on the edge device.
- Add the IP address of the edge device and click on Update endpoint:
- On a terminal application, login to the device that you will add as an endpoint on you Portainer instance as root user:
- If you haven't already make sure to convert the standalone docker node to a swarm node by typing
docker swarm init:
- Paste the command copied earlier on step #5:
- In a matter of seconds the Edge Agent will be installed. You can check if the edge agent has started successfully by typing
docker pson the terminal:
- You can now go back to Portainer, click on Home and you should see your endpoint associated to your instance and with the tags you selected when you added the endpoint:
- You can click on the endpoint to manage it with Portainer:
Hope that worked well for you, and you're up and running 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.