Skip to content

Commit 6a876e4

Browse files
christoph-zededarene
authored andcommitted
doc: add documentation for local operator console
Signed-off-by: Christoph Ostarek <[email protected]>
1 parent 6acecc1 commit 6a876e4

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

OPERATOR_CONSOLE.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Local Operator Console (LOC) API
2+
3+
This document explains the Local Operator Console(LOC) from the API point of view.
4+
5+
This document is similarly structured as PROFILE.md, because the topic is very similar.
6+
7+
## What is Local Operator Console?
8+
9+
Local Operator Console is kind of a miniature controller that allows to run certain
10+
commands (see [Compound Config](###Compound-Config)) without connection to the real
11+
controller. One main usage is for air-gap environments, where devices are offline
12+
and connection to the remote controller is not available or when the connection
13+
to the controller is slow or lots of packets get lost.
14+
15+
## Differences Between Local Operator Console and Local Profile Server
16+
17+
| | LOC | LPS |
18+
|----------------------------------------|----------|--------------------|
19+
| Can Handle more than 1 device | Y | N |
20+
| Uses security token for authentication | N | Y |
21+
| Needs config from controller | Y | N |
22+
| Runs on | Edge App | Anywhere reachable |
23+
24+
## Server endpoint
25+
26+
EVE periodically sends a `CompoundEdgeDevConfigRequest` to the Local Operator Console.
27+
EVE can find the URL to the LOC in `loc_url` which is part of the
28+
`EdgeDevConfig` that EVE received from the controller.
29+
30+
## Endpoints
31+
32+
In the following `$UUID` is the uuid of the edge node contacting LOC.
33+
All endpoints return with `Content-Type` set to `application/x-proto-binary`.
34+
35+
### Certs
36+
37+
```http
38+
39+
GET /api/v2/edgedevice/certs
40+
```
41+
42+
Returns the controller certificates as defined in `ZControllerCert` in `certs/certs.proto`
43+
file. It is encapsulated in an `AuthContainer` as defined in `auth/auth.proto` file.
44+
The container is not verified.
45+
46+
### Config
47+
48+
```http
49+
POST /api/v2/edgedevice/id/$UUID/config
50+
```
51+
52+
Returns the signed config from the controller. It is an `config/EdgeDevConfig`
53+
and the definition can be found in the `devconfig.proto` file.
54+
55+
### Compound Config
56+
57+
```http
58+
POST /api/v2/edgedevice/id/$UUID/compound-config
59+
```
60+
61+
Returns the signed edge device config as part of the compound config. It also includes:
62+
63+
* current Unix timestamp in nano seconds precision
64+
* device command
65+
* app commands
66+
* radio config
67+
68+
The device command can be:
69+
70+
* shutdown of the device
71+
* shutdown and poweroff of the device
72+
* reboot of the device
73+
* run collect-info and upload the tarball to the configured datastore via POST/PUT
74+
75+
The app commands can be:
76+
77+
* restart of the app
78+
* purge of the app
79+
80+
The definition can be found as `CompoundEdgeDevConfig` in `config/compound_devconfig.proto`.
81+
82+
### Edge Metrics
83+
84+
```http
85+
POST /api/v2/edgedevice/id/$UUID/metrics
86+
```
87+
88+
This is where the metrics are sent. Similar to the controller API.
89+
It is a `ZMetricMsg` as defined in `metrics/metrics.proto`.
90+
91+
### Edge Info
92+
93+
```http
94+
POST /api/v2/edgedevice/id/$UUID/info
95+
```
96+
97+
This is where the info messages are sent. Similar to the controller API.
98+
It is a `ZInfoMsg` as defined in `logs/log.proto`.

0 commit comments

Comments
 (0)