Portainer News and Blog

Pre-staging Edge environments with Portainer

Written by James Carppe | May 8, 2022

Computing at the edge is a rapidly growing field, and something we've supported with Portainer for some time now via the Portainer Edge Agent. Using our Edge Agent, your edge devices can be managed from a centralized Portainer server installation, even when the connectivity from an edge device to the server is intermittent and changing, or limited by security requirements. But as your stable of edge devices grows, the logistics of deploying the agent to the devices becomes more difficult, especially in the world of IIoT devices and the distribution of these devices in multiple physical locations.

To help make this easier, we're introducing a couple of new features to our Edge device support in Portainer version 2.13: device pre-staging and the Edge environment waiting room. By combining these two features, you're now able to pre-load edge devices with a startup script to deploy the Portainer Edge Agent on first boot, and have those newly deployed agents connect to a Portainer management environment to be approved by an administrator - all without any user intervention at the edge device.

To prepare a device, within the Portainer server you can create a generic script that will install the Portainer Edge Agent with the necessary settings in order for it to communicate back to the Portainer server. You can customize this script with environment variables as well as create scripts for the platforms we support, such as Kubernetes, Docker Swarm, Docker Standalone and Nomad. This script can be run without changes on any number of devices, meaning you can roll this out to as many devices as you need to run as part of their initial boot sequence.