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.
What You'll Be Doing
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.
Getting and Associating an Access Token
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.
|Figure 1: The Developer ID Token is defined in the mimik Developer Console|
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:
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>
<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>
<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:
"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:
- How to confirm that the edgeEngine Runtime is installed on the local machine
- How to use the
mimik-edge-cli Tool to get an Access Token using the Developer ID Token defined in the mimik Developer Portal
- How to use the
mimik-edge-cli Tool to
associate the Access Token with a mimik Account