-
Notifications
You must be signed in to change notification settings - Fork 14
doc: add documentation for local operator console #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
christoph-zededa
wants to merge
1
commit into
lf-edge:main
Choose a base branch
from
christoph-zededa:doc_loc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # Local Operator Console (LOC) API | ||
|
|
||
| This document explains the Local Operator Console(LOC) from the API point of view. | ||
|
|
||
| This document is similarly structured as PROFILE.md, because the topic is very similar. | ||
|
|
||
| ## What is Local Operator Console? | ||
|
|
||
| Local Operator Console is kind of a miniature controller that allows to run certain | ||
| commands (see [Compound Config](###Compound-Config)) without connection to the real | ||
| controller. One main usage is for air-gap environments, where devices are offline | ||
| and connection to the remote controller is not available or when the connection | ||
| to the controller is slow or lots of packets get lost. | ||
|
|
||
| ## Differences Between Local Operator Console and Local Profile Server | ||
|
|
||
| | | LOC | LPS | | ||
| |----------------------------------------|----------|--------------------| | ||
| | Can Handle more than 1 device | Y | N | | ||
| | Uses security token for authentication | N | Y | | ||
| | Needs config from controller | Y | N | | ||
| | Runs on | Edge App | Anywhere reachable | | ||
|
|
||
| ## Server endpoint | ||
|
|
||
| EVE periodically sends a `CompoundEdgeDevConfigRequest` to the Local Operator Console. | ||
| EVE can find the URL to the LOC in `loc_url` which is part of the | ||
| `EdgeDevConfig` that EVE received from the controller. | ||
|
|
||
| ## Endpoints | ||
|
|
||
| In the following `$UUID` is the uuid of the edge node contacting LOC. | ||
| All endpoints return with `Content-Type` set to `application/x-proto-binary`. | ||
|
|
||
| ### Certs | ||
|
|
||
| ```http | ||
|
|
||
| GET /api/v2/edgedevice/certs | ||
| ``` | ||
|
|
||
| Returns the controller certificates as defined in `ZControllerCert` in `certs/certs.proto` | ||
| file. It is encapsulated in an `AuthContainer` as defined in `auth/auth.proto` file. | ||
| The container is not verified. | ||
|
|
||
| ### Config | ||
|
|
||
| ```http | ||
| POST /api/v2/edgedevice/id/$UUID/config | ||
| ``` | ||
christoph-zededa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Returns the signed config from the controller. It is an `config/EdgeDevConfig` | ||
| and the definition can be found in the `devconfig.proto` file. | ||
|
|
||
| ### Compound Config | ||
|
|
||
| ```http | ||
| POST /api/v2/edgedevice/id/$UUID/compound-config | ||
| ``` | ||
|
|
||
| Returns the signed edge device config as part of the compound config. It also includes: | ||
|
|
||
| * current Unix timestamp in nano seconds precision | ||
| * device command | ||
| * app commands | ||
| * radio config | ||
|
|
||
| The device command can be: | ||
|
|
||
| * shutdown of the device | ||
| * shutdown and poweroff of the device | ||
| * reboot of the device | ||
| * run collect-info and upload the tarball to the configured datastore via POST/PUT | ||
|
|
||
| The app commands can be: | ||
|
|
||
| * restart of the app | ||
| * purge of the app | ||
|
|
||
| The definition can be found as `CompoundEdgeDevConfig` in `config/compound_devconfig.proto`. | ||
|
|
||
| ### Edge Metrics | ||
|
|
||
| ```http | ||
| POST /api/v2/edgedevice/id/$UUID/metrics | ||
| ``` | ||
|
|
||
| This is where the metrics are sent. Similar to the controller API. | ||
| It is a `ZMetricMsg` as defined in `metrics/metrics.proto`. | ||
|
|
||
| ### Edge Info | ||
|
|
||
| ```http | ||
| POST /api/v2/edgedevice/id/$UUID/info | ||
| ``` | ||
|
|
||
| This is where the info messages are sent. Similar to the controller API. | ||
| It is a `ZInfoMsg` as defined in `logs/log.proto`. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also introduce LOC here? What it is, when it is needed, difference between LOC and LPS, etc. Or will there be a separate md file in the EVE repo that would be linked here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a short explanation and a table with the differences. If you know more differences, please let me know.