Management Service
The Management Service is responsible for orchestration and management of the Edge Compute Platform. It connects to the Altair IoT Studio cloud using MQTT and is installed by running the kubectl commands displayed when creating a new Asset in Studio (see Asset Management).
Interaction with the Management Service is done by requesting Actions. Results of these Actions get set up in Events.
Default Actions
The default Actions are already defined on the Asset's schema upon Asset creation.
The section Asset Thing Details in AnythingDB describes how these
can be used.
- Send kubectl
- Action as defined on the
schema:
"send-kubectl": { "description": "Send a kubectl command to the cluster. Command must be an array of words", "input": { "properties": { "arguments": { "title": "The arguments of the command", "type": "array" }, "command": { "const": "kubectl", "title": "The command", "type": "string" }, "correlationId": { "title": "The correlationId", "type": "string" } }, "type": "object" }, "title": "Send kubectl" },
- Send Kubernetes API
- Action as defined on the
schema:
"send-kubernetes-api": { "description": "Send a Kubernetes API request to the cluster.", "input": { "properties": { "correlationId": { "title": "The correlationId", "type": "string" }, "href": { "type": "string" }, "requestBody": { "type": "string" }, "requestMethod": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE" ] } }, "type": "object" }, "title": "Send Kubernetes API" },
- Run statistics/metrics gathering
- Action as defined on the
schema:
"run-stats": { "description": "Start sending statistics/metrics as events on an interval", "input": { "properties": { "interval": { "title": "Frequency in seconds", "type": "integer" } }, "type": "object" }, "title": "Run statistics/metrics gathering" },
- Stop statistics/metrics gathering
- Action as defined on the
schema:
"stop-stats": { "description": "Stop sending statistics/metrics as events", "title": "Stop statistics/metrics gathering" },
Additional Actions
The following Actions are not part of the asset schema by default. They can be manually added to enhance functionality. If indicated Studio will add the Action to the schema when installing the associated Edge Application.
- Send API
- This Action is needed for the API Client (see Using the Cluster API Inspector) and will be added to the Asset schema by Studio when installing the "App - Edge Compute Platform" application from the Marketplace.
- Configure logger
- This Action can be used to set the output level for the log of the Management Service.
- Retrieve kubeconfig
- This Action can only be used when the "App - ECP Tunnel" has been deployed. It will return a kubeconfig file to be used by a local client. The kubeconfig file is regenerated every week and would need to be retrieved again once expired.
- Manage a Kubernetes Deployment
- This Action can be used to restart or scale a Deployment. Note: Not all Deployments have been coded to be able to run with multiple instances at the same time.
- Backup/restore database
- This Action can be used to backup or restore a database file to/from a
remote SFTP server. Note: Only applications/services that use an sqlite database have this functionality available.
- Copy Kubernetes Resource
- This Action can be used to copy a kubernetes resource from one namespace to
another. This can be useful for copying configmaps or secrets.Note: This should only be attempted if you are sure there are no adverse consequences.
- Get Node IP
- This Action can be used to retrieve the IP addresses of the nodes of the edge asset.
- Get Authorization ID
- This Action can be used to retrieve the Authorization ID required for use in
actions such as "Restart K3s".Note:
- The Authorization ID expires after two minutes.
- The Authorization ID is for one-time use only.
- Restart K3s
- This Action can be used to restart the K3s service running on the host.Note:
- This should only be used when there are problems reaching the kubernetes API server or the metrics server.
- This operation takes several minutes to complete and should not be triggered again while running.
- An Authorization ID is required.