Categories
developer documentation v0.0.27
mimik Developer Documentation

Command Line Tool Reference

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:

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 COMMANDS
account perform actions on account related operations: associate node, get tokens, etc.
container to delete conainer runtime from edge engine microservice container management service.
image to delete edge microservice image from edge engine microservice container management service.
COMMANDS
conf manage configuration
help display help for mimik-edge-cli

account get-me

The purpose of this command is to get basic information about the instance of the edgeEngine 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: 2814304805192601600
linkLocalIp: 192.168.86.93
name: mycomputer
nodeId: 4a03cf0769264a62eb226b9609110c62372c32ca64e117fc1119884e
supernodeTypeName: _mk-v15-4996e4c2442cc796f2c0ddb4e5e1627d._tcp
version: 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 edgeEngine.

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 edgeEngine 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 edgeEngine 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 edgeEngine 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 edgeEngine Images installed on the device hosting the edgeEngine 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 edgeEngine access token
-j, --json output in json format
-t, --token=token (required) edge access token obtained from the CLI tool

Response

images:
-
created: 1624905261
digest: sha265:12d0dff89117eec73694d53b28e63602754561646fe41857cb0b998d19cb6784
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-mdebug-v1
name: mdebug-v1
repoTags:
- mdebug-v1:1.1.0
size: 131918
-
created: 1624906817
digest: sha265:38d010bfe32639d63664d6ce12885a34e8cd26edefcd59c46c8a7df7b142fac6
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1
name: microservice-v1
repoTags:
- microservice-v1:1.0.0
size: 75959

image deploy

The purpose of the command is to deploy an edgeEngine Image on a device hosting the edgeEngine 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 edgeEngine 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: 1633473019
digest: sha265:c8144df432f2c59834bc010be5ecc9764e0eda73d4d3fa036c34c4822684c707
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1
name: microservice-v1
repoTags:
- microservice-v1:1.0.0
size: 75206
status: successfully deployed

image delete

The purpose of the command is to delete an edgeEngine Image on a device hosting the edgeEngine 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 edgeEngine access token
-i, --id=id (required) ID of microservice image from the edgeEngine 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-v1
status: successfully deleted

container list

The purpose of the command is to list the edgeEngine Containers installed on a device hostging the edgeEngine 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 edgeEngine 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-1a7a8a9a4ac0
created: 1624906836249
env:
MCM.BASE_API_PATH: /bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0/sample/v1
MCM.DB_ENCRYPTION_SUPPORT: false
MCM.LINKLOCAL_REPLAY_NONCE_SUPPORT: false
MCM.WEBSOCKET_SUPPORT: true
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1-1.0.0.tar
image: microservice-v1
imageId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1
name: microservice-v1-1.0.0.tar
state: started

container deploy

The purpose of this command is to deploy and edgeEngine Container into the edgeEngine 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-1a7a8a9a4ac0
created: 1633472518160
env:
MCM.BASE_API_PATH: /bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0/sample/v1
MCM.DB_ENCRYPTION_SUPPORT: false
MCM.LINKLOCAL_REPLAY_NONCE_SUPPORT: false
MCM.WEBSOCKET_SUPPORT: true
id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1
image: microservice-v1
imageId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-microservice-v1
name: microservice-v1
state: started

container delete

The purpose of this command is to delete an edgeEngine Container for the edgeEngine 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 edgeEngine access token
-i, --id=id (required) ID of the container from the edgeEngine 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-v1
status: successfully deleted

Was this article helpful?

© mimik technology, Inc. all rights reserved