- mimik Object Models, Tools and APIs Reference
- Command Line Tool Reference
Command Line Tool Reference
Objective
The purpose of the document is to provide a reference to mimik command line tool, mimik-edge-cli
.
Intended Readers
The intended readers of this document are software developers that will be programming using mimik-edge-cli
.
What You Need To Know To Use This Reference
This document assumes that you have a basic knowledge of:
- working with the mim OE Runtime
- working with edge Images and edge Containers
- working with Developer ID Tokens and Access Tokens
Commands
--help
mimik-edge-cli --help
The purpose of the command is to display the top-level help topic for mimik-edge-cli
Response
MAIN COMMANDSaccount perform actions on account related operations: associate node, get tokens, etc.container to delete container runtime from edge microservice container management service.image to delete edge microservice image from edge microservice container management service.COMMANDSconf manage configurationhelp display help for mimik-edge-cli
account get-me
The purpose of this command is to get basic information about the instance of the mim OE Runtime active on the hosting device
Usage
mimik-edge-cli account get-me
The configuration options are as follows:
-j, --json output in json format, optional
Response
accountId: 2814304805192601600linkLocalIp: 192.168.86.93name: mycomputernodeId: 4a03cf0769264a62eb226b9609110c62372c32ca64e117fc1119884esupernodeTypeName: _mk-v15-4996e4c2442cc796f2c0ddb4e5e1627d._tcpversion: v2.3.1
account get-edge-access-token
The purpose of this command is to get an ACCESS TOKEN
that a microservice uses to work with the local running instance of mim OE.
An ACCESS TOKEN
is required to use the following commands:
mimik-edge-cli account associate
mimik-edge-cli image list
mimik-edge-cli image deploy
mimik-edge-cli image delete
mimik-edge-cli container list
mimik-edge-cli container deploy
mimik-edge-cli container delete
Usage
mimik-edge-cli account get-edge-access-token -t <ID TOKEN> --use-mid-v1
The configuration options are as follows:
-a, --api-key-file=api-key-file path of the file that contains the API key for JSONRPC-f, --token-file=token-file path of file, in json format, that contains the developer ID token from developer console-j, --json output in seralized JSON-k, --api-key=api-key API key for JSONRPC-t, --token=token (required) developer ID token from developer console
Response
access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODE0MzA0ODA1MTkyNjAxNjAwIiwianRpIjoiR25oVTRqNkVPajU0eWxrZ3d-RXlES0k1dnhybHZNWnJVUkxqSmFtODhXYSIsImNsaWVudF9pZCI6ImJiNmZiYTdkLTYzMjEtNDFjNS1hYzM3LTFhN2E4YTlhNGFjMCIsImF6cCI6ImJiNmZiYTdkLTYzMjEtNDFjNS1hYzM3LTFhN2E4YTlhNGFjMCIsImlzcyI6Imh0dHBzOixxxxxxxxaHR0cHM6Ly9taW1payIsImh0dHBzOi8vbXN0Lm1pbWlrMzYwLmNvbS9tU1QvdjEvY2xpZW50cy9HZW5lcmljLWVkZ2UiXSwic2NvcGUiOiJvcGVuaWQgZWRnZTptY20gZWRnZTpjbHVzdGVycyBlZGdlOmFjY291bnQ6YXNzb2NpYXRlIGVkZ2U6YWNjb3VudDp1bmFzc29jaWF0ZSBlZGdlOnJlYWQ6YWNjb3VudGtleSIsImlhdCI6MTYyODE5ODE1MCwiZXhwIjoxNjQzNzUwMTUwfQ.zp-VEl-5B22hm2kLlOLdsvc5XJUTvWNZyKlKrdMpehc
account associate
The purpose of the command is to associate an Access Token with the instance of the mim OE Runtime running on the device
Usage
mimik-edge-cli account associate -t <ACCESS TOKEN>
The configuration options are as follows
-a, --api-key-file=api-key-file path of the file that contains the API key for JSONRPC-f, --token-file=token-file path of the file that contains the access token-j, --json output in json format-k, --api-key=api-key API key for JSONRPC-t, --token=token (required) edge access token obtained from the CLI tool
Response
access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODE0MzA0ODA1MTkyNjAxNjAwIiwianRpIjoiR25oVTRqNkVPajU0eWxrZ3d-RXlES0k1dnhybHZNWnJVUkxqSmFtODhXYSIsImNsaWVudF9pZCI6ImJiNmZiYTdkLTYzMjEtNDFjNS1hYzM3LTFhN2E4YTlhNGFjMCIsImF6cCI6ImJiNmZiYTdkLTYzMjEtNDFjNS1hYzM3LTFhN2E4YTlhNGFjMCIsImlzcyI6Imh0dHBzOixxxxxxxxaHR0cHM6Ly9taW1payIsImh0dHBzOi8vbXN0Lm1pbWlrMzYwLmNvbS9tU1QvdjEvY2xpZW50cy9HZW5lcmljLWVkZ2UiXSwic2NvcGUiOiJvcGVuaWQgZWRnZTptY20gZWRnZTpjbHVzdGVycyBlZGdlOmFjY291bnQ6YXNzb2NpYXRlIGVkZ2U6YWNjb3VudDp1bmFzc29jaWF0ZSBlZGdlOnJlYWQ6YWNjb3VudGtleSIsImlhdCI6MTYyODE5ODE1MCwiZXhwIjoxNjQzNzUwMTUwfQ.zp-VEl-5B22hm2kLlOLdsvc5XJUTvWNZyKlKrdMpehc
account get-edge-id-token
The purpose of the command is to get the Access Token associated with the instance of the mim OE Runtime active on the hosting device.
Usage
mimik-edge-cli account get-edge-id-token
The configuration options are as follows
-a, --api-key-file=api-key-file path of the file that contains the API key for JSONRPC-j, --json output in json format-k, --api-key=api-key API key for JSONRPC
Response
id_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MjgxOTkyNzcsImp0aSI6ImZ3RE5aVjU2R291bmpkSjJiYkpuIiwibm9kZV9pZCI6IjRhMDNjZjA3NjkyNjRhNjJlYjIyNmI5NjA5MTEwYzYyMzcyYzMyY2E2xxxxxxxxxxxGFwIiwic3ViIjoiMjgxNDMwNDgwNTE5MjYwMTYwMCJ9.T7iBa_qPe9_iSHeWGUAoopAjfr7jYsa7qEWWJtz1IkA
image list
The purpose of the command is to list the edge Images installed on the device hosting the mim OE Runtime.
Usage
mimik-edge-cli image list -t <ACCESS TOKEN>
The configuration options are as follows
-f, --token-file=token-file path of the file that contains the access token-j, --json output in json format-t, --token=token (required) edge access token obtained from the CLI tool
Response
images:-created: 1624905261digest: sha265:12d0dff89117eec73694d53b28e63602754561646fe41857cb0b998d19cb6784id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-mdebug-v1name: mdebug-v1repoTags:- mdebug-v1:1.1.0size: 131918-created: 1624906817digest: sha265:38d010bfe32639d63664d6ce12885a34e8cd26edefcd59c46c8a7df7b142fac6id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1name: microservice-v1repoTags:- microservice-v1:1.0.0size: 75959
image deploy
The purpose of the command is to deploy an edge Image on a device hosting the mim OE Runtime
Usage
mimik-edge-cli image deploy --image=build/microservice-v1-1.0.0.tar --token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODE0MzA0ODA1MTkyNjAxNjAwIiwianRpIjoiQX5uY3ZUZVhITU9ieGx-NEE1bmZ2eUVIdEpZNGJzcUNMWGl5RVpSYk1PUSIsImNsaWVudF9pZCI6ImJiNmZiYTdkLTYzMjEtNDFjNS1hYzM3LTFhN2E4YTlhNGFjMCIsImF6cCI6ImJiNmZiYTdkLTYzMjEtNDFjNS1hYzM3LTFhN2E4YTlhNGFjMCIsImlzcyI6Imh0dHBzOi8vbWlkLm1pbWlrMzYwLmNvbS9tSUQvdjEvb2F1dGgvdG9rZW4iLCJub2RlX2lkIjoiZTAwYWRhYzU4ODMzODFhZDVjMmYxMDE5MjEyYzRmOTU0ZjI3NWY1ZjNkOWIzMDZlNTcxMjhlYWQiLCJhdWQiOlsiaHccccccLy9taW1payIsImh0dHBzOi8vbXN0Lm1pbWlrMzYwLmNvbS9tU1QvdjEvY2xpZW50cy9HZW5lcmljLWVkZ2UiXSwic2NvcGUiOiJvcGVuaWQgZWRnZTptY20gZWRnZTpjbHVzdGVycyBlZGdlOmFjY291bnQ6YXNzb2NpYXRlIGVkZ2U6YWNjb3VudDp1bmFzc29jaWF0ZSBlZGdlOnJlYWQ6YWNjb3VudGtleSIsImlhdCI6MTYyMDg3MTczMCwiZXhwIjoxNjM2NDIzNzMwfQ.m28Z3fuIHR5UBC_vgFFpjGIHpl0t4J2RYsP0JUeq2p4
The configuration options are as follows:
-f, --token-file=token-file path of the file that contains the access token-i, --image=image (required) path of the edge microservice image-j, --json output in json format-t, --token=token (required) edge access token obtained from the CLI tool
Response
created: 1633473019digest: sha265:c8144df432f2c59834bc010be5ecc9764e0eda73d4d3fa036c34c4822684c707id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1name: microservice-v1repoTags:- microservice-v1:1.0.0size: 75206status: successfully deployed
image delete
The purpose of the command is to delete an edge Image on a device hosting the mim OE Runtime
Usage
mimik-edge-cli image delete -i <IMAGE_ID> -t <ACCESS_TOKEN>
The configuration options are as follows:
-f, --token-file=token-file path of the file that contains the access token-i, --id=id (required) ID of microservice image from the mim OE microservice container management service-j, --json output in json format-t, --token=token (required) edge access token obtained from the CLI tool
Response
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-mdebug-v1status: successfully deleted
container list
The purpose of the command is to list the edge Containers installed on a device hosting the mim OE Runtime
Usage
mimik-edge-cli container list -t <ACCESS TOKEN>
The configuration options are as follows:
-f, --token-file=token-file path of the file that contains the access token-j, --json output in json format-t, --token=token (required) edge access token obtained from the CLI tool
Response
containers:-clientId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0created: 1624906836249env:MCM.BASE_API_PATH: /bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0/sample/v1MCM.DB_ENCRYPTION_SUPPORT: falseMCM.LINKLOCAL_REPLAY_NONCE_SUPPORT: falseMCM.WEBSOCKET_SUPPORT: trueid: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1-1.0.0.tarimage: microservice-v1imageId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1name: microservice-v1-1.0.0.tarstate: started
container deploy
The purpose of this command is to deploy and edge Container into the mim OE Runtime environment
Usage
mimik-edge-cli container deploy -p <PAYLOAD_FILE> -t <ACCESS_TOKEN>
The configuration options are as follows:
-f, --token-file=token-file path of file that contains edge access token-j, --json output in seralized json-p, --payload=payload (required) path of the payload file (e.g. start.json) that describes the container runtime-t, --token=token (required) edge access token obtained from CLI
Response
clientId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0created: 1633472518160env:MCM.BASE_API_PATH: /bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0/sample/v1MCM.DB_ENCRYPTION_SUPPORT: falseMCM.LINKLOCAL_REPLAY_NONCE_SUPPORT: falseMCM.WEBSOCKET_SUPPORT: trueid: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1image: microservice-v1imageId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1name: microservice-v1state: started
container delete
The purpose of this command is to delete an edge Container for the mim OE Runtime environment
Usage
mimik-edge-cli container delete -i <CONTAINER_ID> -t <ACCESS_TOKEN>
The configuration options are as follows:
-f, --token-file=token-file path of the file that contains the access token-i, --id=id (required) ID of the container from the edge microservice container management service-j, --json output in json format-t, --token=token (required) edge access token obtained from the CLI tool
Response
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1status: successfully deleted