Register edge node and deploy sample Hello World edge service
Prerequisites
- IEAM agent and
hznCLI are installed on the edge node. - Hello World edge service has already been published into IEAM.
Steps
-
Log in to your edge node using
bashwith the user idibm-workshop. Get the required helloworld node policy file.wget https://raw.githubusercontent.com/open-horizon/examples/master/edge/services/helloworld/horizon/node.policy.json -
Export all the necessary environment variables.
export HZN_EXCHANGE_USER_AUTH=iamapikey:<api-key-generated-in-ieam-installation> export HZN_EXCHANGE_URL=<ieam-management-hub-ingress>/edge-exchange/v1 # <ieam-management-hub-ingress> is same as CLUSTER_URL, exported in IEAM Installment export HZN_FSS_CSSURL=<ieam-management-hub-ingress>/edge-css/ # <ieam-management-hub-ingress> is same as CLUSTER_URL, exported in IEAM installation export HZN_ORG_ID=sandbox-edge-workshop-ieam-cluster # This should be same organization id you created while Installing IEAM hub -
Register your edge node with IEAM using helloworld policy.
hzn register --policy node.policy.json -
When the registration completes, use the following command to review the Node policy.
hzn policy list -
Validate the helloworld service container is running in
dockeron the edge node.docker ps -
Unregister your edge node which will also stop the helloworld service.
hzn unregister -Df