Local Operator Console

Overview

The Local Operator Console (LOC) is an HTTP server that stands in for ZEDEDA Cloud when your edge nodes don’t have internet access. Rather than completely replacing ZEDEDA Cloud, however, LOC focuses on managing edge node and edge application configurations. It also collects runtime metrics from your fleet of nodes and applications. In doing so, it enables you to ensure continuity of service despite unreliable internet access, or to even run your edge nodes primarily on an air-gapped network.

Using LOC, your edge nodes will function as normal, periodically attempting to connect to ZEDEDA Cloud. Whenever they fail to connect to ZEDEDA Cloud, however, they will attempt to connect to your LOC server. When your nodes are connected to the internet, EVE-OS will always prioritze your cloud configs. In this way, EVE is designed to avoid split-brain ambiguities.

You can run LOC on any machine as long as your edge nodes can access it over some local network, e.g., LAN or WLAN.

Because LOC operates on a private network, it doesn’t have access to any of your existing storage infrastructure. Consequently, it uses its host machine’s file system for storing edge node configurations. All of your nodes' state information (metrics and info messages), however, is stored in RAM.

Restrictions

LOC does not support the following actions:

  • Onboarding edge nodes: Your edge nodes must be onboarded to ZEDEDA Cloud before they can be used with LOC.

Prerequisites

You must have Docker installed on the machine that will run LOC.

Procedures

The following procedures will help you get set up with a LOC server. To use LOC, refer to the following section on the LOC API.

Download LOC

The LOC image is hosted on Docker Hub. You either need to pull it onto your server directly, or you need to copy it onto your server.

Follow these steps to download LOC.

  1. Open your terminal.
  2. Pull the LOC image from Docker Hub.
    docker pull zededa/local-operator-console
  3. Verify that your machine has the LOC image.
    docker images
  4. Ensure that you see something similar to the following in the output of the previous command.
    zededa/local-operator-console   latest     6f561670ba72   2 months ago   16.3MB

Start LOC

To start LOC on your server, run the following Docker command in your server’s terminal.

docker run -p 1180:1180 -p 8100:8100 zededa/local-operator-console

Enable LOC on an edge node

Edge nodes will only fall back to LOC if you have enabled the feature for the edge node. To do so, complete the following procedure for each edge node that should use LOC.

  1. Log in to ZEDEDA Cloud.
  2. Click on Edge Nodes on the left side nav.
  3. Click on the edge node that you want to enable.
  4. Go to the node’s Basic Info tab.
  5. Click the Edit icon.
  6. Check the box labeled “Local Operator Console”. 
  7. Enter the URL of your LOC server, e.g., http://IP_ADDRESS:1180
    1. Replace IP_ADDRESS in the previous URL with the the IP address of your LOC server.
  8. Click Save.

Download a configuration from ZEDEDA Cloud

Before you can send configurations to your LOC server, you'll need to download them from ZEDEDA Cloud. The following procedure explains how to do so manually using the ZEDEDA GUI.

  1. Log in to ZEDEDA Cloud.
  2. Click on Edge Nodes on the left side nav.
  3. Click on the edge node for which you want to download a configuration.
  4. Click on the More Actions icon.
  5. Click on Download LOC Config.
  6. Find the config file in your Downloads directory.

The LOC API

You can manage your fleet of edge nodes by interfacing with your LOC server through the following endpoints. Note that the LOC API's path is api/v1/user.

In the following curl requests, ensure that you replace $LOCURL with the url or ip address of your LOC server.

Upload configurations

POST /config: Uploads a device config bundle. Each file in the bundle is a protobuf config response.

See the following example request, which uses curl.

curl -F file=@config-bundle.json http://$LOCURL/api/v1/user/config

The following example shows a config bundle that contains a single configuration.

{ "localOperatorConsoleBlobList": [ { "devId": "d8bf6b3a-917f-44dc-bdae-7542e7f7de88", "config": "0adf4b0adc4b0a ….. “ } ] }

Get a list of online edge nodes

GET /devs: Returns list of UUIDs of all online devices in JSON format. Devices are considered online if there is a recent ‘metrics’ update from an edge node.

See the following example request, which uses curl.

curl http://$LOCURL/api/v1/user/devs

Get information for an edge node

GET /id/$UUID/info: Returns a ZInfoMsg for the specified device in JSON format. If the device is not online, LOC returns404 Not Found.

See the following example request, which uses curl. Ensure that you replace $UUID with the appropriate value.

curl http://$LOCURL/api/v1/user/id/$UUID/info

Get metrics for an edge node

GET /id/$UUID/metrics: Returns a ZInfoMsg for the specified device in JSON format. If the device is not online, LOC returns404 Not Found.

See the following example request, which uses curl. Ensure that you replace $UUID with the appropriate value.

curl http://$LOCURL/api/v1/user/id/$UUID/metrics

Send a command to an edge node

POST /id/$UUID/command/{shutdown|shutdown-poweroff}

Supported commands:

  • shutdown: shuts all application down
  • shutdown-poweroff: shuts all application down and powers the device off

See the following example request, which uses curl. Ensure that you replace $UUID with the appropriate value. Additionally, include only a single command in {shutdown|shutdown-poweroff}

curl -X POST http://$LOCURL/api/v1/user/id/$UUID/command/{shutdown|shutdown-poweroff}

Send a command to an edge application

POST /id/$UUID/app/$APPUUID/command/{purge|restart}

Supported commands:

  • purge: purges application
  • restart: restarts application

See the following example request, which uses curl. Ensure that you replace $UUID and $APPUUID with the appropriate values. Additionally, include only a single command in {purge|restart}

curl -X POST http://$LOCURL/api/v1/user/id/$UUID/app/$APPUUID/command/{purge|restart}
Was this article helpful?
2 out of 2 found this helpful