Skip to content

Commit d9f7569

Browse files
doc: add documentation for local operator console
Signed-off-by: Christoph Ostarek <[email protected]>
1 parent 8033ce8 commit d9f7569

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

OPERATOR_CONSOLE.md

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

0 commit comments

Comments
 (0)