The objective of this tutorial is to demonstrate how to use the mimik-edge-cli Tool to create and associate an Access Token in a running instance of a node running the edgeEngine Runtime.
The intended readers of the document are developers that will be using the mimik-edge-cli Tool to perform tasks such as deploying an edgeEngine Image and subsequently an edgeEngine Container.
In this tutorial, you will be using a Developer ID token which was created previously in the Mimik Developer Console, to execute a command using the mimik-edge-cli to get an Access Token. Then, you will associate that Access Token with the running instance of the edgeEngine Runtime running on the Linux computer.
A Linux computer with a running instance of edgeEngine Runtime installed and running. For the details about how to install the edgeEngine Runtime on a host computer, read the tutorial, Installing edgeEngine and the mimik-edge-cli Tool on a Linux System or MacOS here.
Step 1: Copy the Developer ID Token that was created previously in a mimik project in the mimik Developer Console, as shown in the illustration below. Set the Developer ID Token aside for use in the steps to follow.
Step 2: Verify that the edgeEngine Runtime is running on the machine where you intended to get and associate the Access Token. Execute the following command in a terminal window to do the verification:
mimik-edge-cli account get-me
You will get a response similar to the following:
accountId: linkLocalIp: 192.168.86.31 name: mylab nodeId: e3424338aaf05bdf25e57385bbf62e12d9f7168b3b3cb9c7ab76795f supernodeTypeName: _mk-v15-4996e4c2442cc796f2c0ddb4e5e1627d._tcp version: v2.3.1
If you get an error result, this most probably means that the edgeEngine Runtime is not up and running. In that case, follow the instructions in the tutorial, Installing edgeEngine and the mimik-edge-cli Tool on a Linux System or MacOS to get the edgeEngine Runtime installed and running.
Step 3 : Using the mimik-edge-cli Tool, execute the following command in a terminal window to get a valid Access Token.
mimik-edge-cli account get-edge-access-token -t <DEVELOPER_ID_TOKEN>
WHERE <DEVELOPER_ID_TOKEN> is the token that was defined in the mimik Developer Portal as shown above in Figure 1.
You get a response similar to the following:
Step 4 : Using the mimik-edge-cli Tool, execute the following command to associate the Access Token on the local machine
mimik-edge-cli account associate -t <ACCESS_TOKEN>
WHERE <ACCESS_TOKEN> is the Access Token that was created above in Step 3.
Upon successful association of the Access Token, you'll get a response similar to the following:
result: accountId: 2814304805192601600 status: successfully associated
Congratulations! You've just created an Access Token and associated it with an account on the local machine
In this tutorial, you learned: