issues
search
edgehog-device-manager
/
edgehog-device-runtime
Edgehog Device Runtime is a portable middleware written in Rust, that enables remote device management on Linux-based systems.
Apache License 2.0
11
stars
10
forks
source link
Tracking issue: interfaces for docker module
#271
Open
joshuachp
opened
11 months ago
joshuachp
commented
11 months ago
[x] #211
[x] #277
[x] #278
[x] #279
[x] #280
Interfaces
Here is the list of interfaces defined for the system:
### Images #### Create image request ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateImageRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/image/id", "type": "string" }, { "endpoint": "/image/repo", "type": "string" }, { "endpoint": "/image/name", "type": "string" }, { "endpoint": "/image/tag", "type": "string" } ] } ``` #### Available Images ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableImages", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "allow_unset": true, "endpoint": "/%{image_id}/pulled", "type": "boolean" } ] } ``` ### Volumes #### Create Volume Request ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateVolumeRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/volume/id", "type": "string" }, { "endpoint": "/volume/driver", "type": "string" }, { "endpoint": "/volume/options", "type": "string" } ] } ``` #### Available Volumes ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableVolumes", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "allow_unset": true, "endpoint": "/%{volume_id}/created", "type": "boolean" }, { "allow_unset": true, "endpoint": "/%{volume_id}/driver", "type": "boolean" }, { "allow_unset": true, "endpoint": "/%{volume_id}/options", "type": "boolean" } ] } ``` ### Networks #### Create Network request ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateNetworkRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/network/id", "type": "string" }, { "endpoint": "/network/driver", "type": "string" }, { "endpoint": "/network/checkDuplicate", "type": "boolean" }, { "endpoint": "/network/internal", "type": "boolean" }, { "endpoint": "/network/enableIPv6", "type": "boolean" } ] } ``` #### Available Networks ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableNetworks", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "endpoint": "/%{network_id}/driver", "type": "string" }, { "endpoint": "/%{network_id}/checkDuplicate", "type": "boolean" }, { "endpoint": "/%{network_id}/internal", "type": "boolean" }, { "endpoint": "/%{network_id}/enableIPv6", "type": "boolean" } ] } ``` ### Containers #### Create Container Request ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateContainerRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/container/id", "type": "string" }, { "endpoint": "/container/hostname", "type": "string" }, { "endpoint": "/container/imageId", "type": "string" }, { "endpoint": "/container/restartPolicy", "type": "string" }, { "endpoint": "/container/env", "type": "stringarray", "doc": "Array of KEY=value environment variables" }, { "endpoint": "/container/binds", "type": "stringarray", "doc": "Array of binds" }, { "endpoint": "/container/networks", "type": "stringarray" }, { "endpoint": "/container/portBindings", "type": "stringarray", "doc": "Array of ip:[host_port:]container_port[/protocol] | [hostPort:]containerPort[/protocol]. protocol is tcp by default" }, { "endpoint": "/container/privileged", "type": "boolean" } ] } ``` #### Available Containers ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableContainers", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "endpoint": "/%{container_id}/hostname", "type": "string" }, { "endpoint": "/%{container_id}/imageId", "type": "string" }, { "endpoint": "/%{container_id}/restartPolicy", "type": "string" }, { "endpoint": "/%{container_id}/env", "type": "stringarray", "doc": "Array of KEY=value environment variables" }, { "endpoint": "/%{container_id}/binds", "type": "stringarray", "doc": "Array of binds" }, { "endpoint": "/%{container_id}/networks", "type": "stringarray" }, { "endpoint": "/%{container_id}/portBindings", "type": "stringarray", "doc": "Array of ip:[host_port:]container_port[/protocol] | [hostPort:]containerPort[/protocol]. protocol is tcp by default" }, { "endpoint": "/%{container_id}/privileged", "type": "boolean" }, { "endpoint": "/%{container_id}/status", "type": "string" } ] } ``` ### Other interfaces to be defined Those need to be worked on more. #### Releases ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateReleaseRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/release/id", "type": "string" }, { "endpoint": "/release/applicationId", "type": "string" }, { "endpoint": "/release/version", "type": "string" }, { "endpoint": "/release/containers", "type": "stringarray" } ] } ``` ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableRelease", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "endpoint": "/%{release_id}/application_id", "type": "string" } ] } ``` #### Application ```json { "interface_name": "io.edgehog.devicemanager.apps.ApplicationCommand", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "mappings": [ { "endpoint": "/%{application_id}/%{version}/command", "type": "string", "doc": "TODO: command enum [start, stop]" } ] } ``` #### Scenarios ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateScenarioRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/scenario/id", "type": "string" }, { "endpoint": "/scenario/name", "type": "string" }, { "endpoint": "/scenario/applications", "type": "stringarray" } ] } ``` ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableScenarios", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "endpoint": "/%{scenario_id}/name", "type": "string" }, { "endpoint": "/%{scenario_id}/applications", "type": "stringarray" } ] } ``` ```json { "interface_name": "io.edgehog.devicemanager.apps.ActivateScenarioRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/scenario/id", "type": "string" } ] } ``` ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableScenarios", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "endpoint": "/%{scenario_id}/name", "type": "string" }, { "endpoint": "/%{scenario_id}/applications", "type": "string" } ] } ```
Interfaces
Here is the list of interfaces defined for the system: