Introduction
The Local Profile Server (LPS) is a feature for managing application instances directly from an edge node. It allows one application to control the lifecycle of other applications (deploying, stopping, and managing them) without a constant connection to ZEDEDA Cloud. This is useful for edge nodes that have intermittent connectivity or need to operate offline.
The LPS runs as an application on an edge node and can manage other applications on the same edge node. It provides a mechanism for local control that can override the configurations set in ZEDEDA Cloud, giving you more immediate and direct management of your edge resources.
Prerequisites
- You must have at least the SysManager role in your ZEDEDA Cloud enterprise.
- You must have an edge node onboarded.
- Your edge node must be running EVE-OS version 12.0.1 or greater.
- You must build your own application using the Offline Profile Server API doc.
- This article assumes that you have Linux knowledge.
Overview of LPS Capabilities
The LPS is built on the Local Profile Server API, which defines a set of API endpoints. These endpoints allow a local application to monitor and control both the edge node and the other applications running on it. Key capabilities include:
- Local Profile Management: Use the /api/v1/local_profile endpoint to locally activate a different application profile, changing the set of running applications on the node.
- Wireless Network Management: Use the /api/v1/radio endpoint to monitor and configure the state of wireless network adapters.
- Application State Management: Use the /api/v1/appinfo endpoint to receive status updates from all applications and send lifecycle commands (e.g., start, stop, purge) in response.
- Device State Management: Use the /api/v1/devinfo endpoint to receive status updates about the edge node and send device-level commands, such as COMMAND_SHUTDOWN and COMMAND_SHUTDOWN_POWEROFF.
- Device Location Information: Use the /api/v1/location endpoint to publish the device's current location from a connected GNSS receiver to the LPS.
- Network Management: Use the /api/v1/network endpoint to publish the current IP configuration of all network adapters (excluding those directly assigned to applications).
General Configuration
To enable the LPS on an edge node, you must add specific tags for your specific usage. After tags are in place, EVE-OS will periodically send status information as HTTP POST requests to the host application. The LPS can then send commands back in its HTTP response.
- Go to Edge Nodes > YOUR_NODE.
- Click the Basic Info tab and click the Pencil icon to edit.
- Configure specific Tags on the edge node:
-
Tag key: $ztag.local.profile.server.host
Tag value: YOUR_IP
This tag key and value pair defines the host where the LPS is residing. -
Tag Key: $ztag.local.profile.server.token
Tag Value: YOUR_SECRET
This tag key and value pair defines the token that the LPS is required to use when sending commands to EVE-OS. -
Tag key: $ztag.local.profile.server.default
Tag value: YOUR_PROFILE
This tag key and value pair defines the default profile that is brought up when the profile server is deployed, for example you would swap out ‘YOUR_PROFILE’ with the name of your profile. Whichever profile name you use here must also appear in /mnt/profile.This will make sure that after the application instances are deployed, any application instances that are part of 'YOUR_PROFILE' will be brought up by default, until you explicitly change the profile name.
-
Tag key: $ztag.local.profile.server.host
- From Edge Nodes > YOUR_NODE > Adapters tab, enable Allow modifications locally (LPS) to permit local management of network port configuration with Local Profile Server.
Next Steps
This is a series of articles. You will likely follow them in this order.
- Manage App Instances with the Local Profile Server - You are here!
- Local Profile Server for Graceful Shutdown with a UPS: A Use Case
- Local Profile Server for Managing Profiles: A Use Case