Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
ubuntu@ubuntu:/usr/horizon/bin$ ls
agent-install.cfg  agent-uninstall.sh  edgeNodeFiles.sh                      horizon-container
agent-install.sh   anax                horizon-agent-linux-deb-armhf.tar.gz  hzn
ubuntu@ubuntu:/usr/horizon/bin$ cat agent-install.cfg 
HZN_EXCHANGE_URL=http://127.0.0.1:3090/v1
HZN_FSS_CSSURL=http://127.0.0.1:9443/
HZN_AGBOT_URL=http://127.0.0.1:3111
HZN_SDO_SVC_URL=http://127.0.0.1:9008/api
ubuntu@ubuntu:/usr/horizon/bin$ env | grep HZN
HZN_DEVICE_TOKEN=Zm4Y1wFgrUD2D1MTrtn1UmyBaOnn8u
HZN_DEVICE_ID=node1
HZN_ORG_ID=myorg
HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO
HZN_EXCHANGE_URL=http://192.168.100.32:3090/v1/
HZN_FSS_CSSURL=http://192.168.100.32:9443/
ubuntu@ubuntu:/usr/horizon/bin$ vim agent-install.cfg 
ubuntu@ubuntu:/usr/horizon/bin$ cp agent-install.cfg agent-install.cfg_bak
ubuntu@ubuntu:/usr/horizon/bin$ ls
agent-install.cfg      agent-uninstall.sh  horizon-agent-linux-deb-armhf.tar.gz
agent-install.cfg_bak  anax                horizon-container
agent-install.sh       edgeNodeFiles.sh    hzn
ubuntu@ubuntu:/usr/horizon/bin$ vim agent-install.cfg

[No write since last change]
/bin/bash: wq: command not found

shell returned 127

Press ENTER or type command to continue
ubuntu@ubuntu:/usr/horizon/bin$ ls -al
total 90712
drwxr-xr-x 2 ubuntu ubuntu     4096 Aug  5 22:51 .
drwxr-xr-x 5 ubuntu ubuntu     4096 Jul 19 16:34 ..
-rw-r--r-- 1 root   root        158 Aug  3 19:47 agent-install.cfg
-rw-r--r-- 1 ubuntu ubuntu      158 Aug  5 22:50 agent-install.cfg_bak
-rwxr-xr-x 1 ubuntu ubuntu   125388 Jul  9 17:39 agent-install.sh
-rwxr-xr-x 1 ubuntu ubuntu    13038 Jul  9 17:39 agent-uninstall.sh
-rwxr-xr-x 1 ubuntu ubuntu 49993557 Jul  9 17:39 anax
-rwxr-xr-x 1 ubuntu ubuntu    24010 Jul  9 17:39 edgeNodeFiles.sh
-rw-r--r-- 1 root   root         53 Aug  3 20:00 horizon-agent-linux-deb-armhf.tar.gz
-rwxr-xr-x 1 ubuntu ubuntu    13699 Jul  9 17:39 horizon-container
-rwxr-xr-x 1 ubuntu ubuntu 42686814 Jul  9 17:39 hzn
ubuntu@ubuntu:/usr/horizon/bin$ sudo vim agent-install.cfg
ubuntu@ubuntu:/usr/horizon/bin$ eval export $(cat agent-install.cfg)
ubuntu@ubuntu:/usr/horizon/bin$ env | grep HZN
HZN_SDO_SVC_URL=http://192.168.100.32:9008/api
HZN_DEVICE_TOKEN=Zm4Y1wFgrUD2D1MTrtn1UmyBaOnn8u
HZN_DEVICE_ID=node1
HZN_ORG_ID=myorg
HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO
HZN_AGBOT_URL=http://127.0.0.1:3111
HZN_EXCHANGE_URL=http://192.168.100.32:3090/v1
HZN_FSS_CSSURL=http://192.168.100.32:9443/
ubuntu@ubuntu:/usr/horizon/bin$ hzn exchange user list
{
  "myorg/admin": {
    "password": "********",
    "email": "not@used",
    "admin": true,
    "hubAdmin": false,
    "lastUpdated": "2021-07-29T22:58:16.508975Z[UTC]",
    "updatedBy": "root/root"
  }
}
ubuntu@ubuntu:/usr/horizon/bin$ hzn unregister -f
Unregistering this node, cancelling all agreements, stopping all workloads, and restarting Horizon...
Waiting for Horizon node unregister to complete: No Timeout specified ...
Waiting for agent service to restart and checking the node configuration state...
Horizon node unregistered. You may now run 'hzn register ...' again, if desired.
ubuntu@ubuntu:/usr/horizon/bin$ hzn register -p IBM/pattern-ibm.helloworld -s ibm.helloworld --serviceorg IBM
Horizon Exchange base URL: http://192.168.100.32:3090/v1
Using node ID 'node1' from the Horizon agent
Generated random node token
Updating node token...
Will proceeed with the given pattern IBM/pattern-ibm.helloworld.
Initializing the Horizon node with node type 'device'...
Note: no input file was specified. This is only valid if none of the services need variables set.
However, if there is 'userInput' specified in the node already in the Exchange, the userInput will be used.
Changing Horizon state to configured to register this node with Horizon...
Horizon node is registered. Workload services should begin executing shortly.
Waiting for up to 60 seconds for following services to start:
	IBM/ibm.helloworld
Status of the services you are watching:
	IBM/ibm.helloworld 	Progress so far: no agreements formed yet
Status of the services you are watching:
	IBM/ibm.helloworld 	Progress so far: agreement proposal has been received
Status of the services you are watching:
	IBM/ibm.helloworld 	Progress so far: agreement is accepted
Status of the services you are watching:
	IBM/ibm.helloworld 	Progress so far: service is created
Status of the services you are watching:
	IBM/ibm.helloworld 	Progress so far: service is created
Status of the services you are watching:
	IBM/ibm.helloworld 	Progress so far: service is created
Timeout waiting for some services to successfully start. Analyzing possible reasons for the timeout...

Currently, there are no errors recorded in the node's event log.
Using the 'hzn deploycheck all -p' command to verify that node, service configuration and pattern is compatible.
Neither node id nor node policy is specified. Getting node policy from the local node.
Neither node id nor node user input file is specified. Getting node user input from the local node.
{
  "compatible": true,
  "reason": {
    "IBM/ibm.helloworld_1.0.0_arm": "Compatible"
  }
}

Analysis complete.
ubuntu@ubuntu:/usr/horizon/bin$ hzn service log -f ibm.helloworld
Found service ibm.helloworld with service id 434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3.
Displaying log messages of container ibm.helloworld for service ibm.helloworld with service id 434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3.
Use ctrl-C to terminate this command.
Aug  5 22:57:39 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:57:42 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:57:45 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:57:48 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:57:51 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:57:54 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:57:57 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:00 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:03 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:06 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:09 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:12 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:15 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:18 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:21 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:24 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:27 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:30 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:33 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:39 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:39 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:42 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:45 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:48 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:51 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:54 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:58:57 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:00 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:03 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:06 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:10 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:12 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:15 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:18 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:21 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:24 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:27 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:30 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:33 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:36 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:39 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:42 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:45 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:48 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:51 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:54 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 22:59:57 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:00 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:03 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:06 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:09 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:13 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:16 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:19 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:22 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:25 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:28 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:31 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:34 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:37 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:40 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:43 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:46 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:49 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:52 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:55 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:00:58 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:01 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:04 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:07 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:10 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:13 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:16 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:19 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:22 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:25 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:28 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:31 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:34 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:37 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:40 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:43 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:46 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:49 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:52 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:55 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:01:58 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:01 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:04 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:07 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:10 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:13 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:16 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:19 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:22 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:25 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:28 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:31 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:34 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:37 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:40 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:43 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:46 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:49 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:52 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:55 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:02:58 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:01 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:04 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:07 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:10 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:13 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:16 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:19 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:22 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:25 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:28 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:31 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:34 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:37 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:40 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:43 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:46 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:49 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:52 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:55 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:03:58 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:04:01 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:04:04 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:04:07 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:04:10 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:04:13 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
Aug  5 23:04:16 ubuntu workload-434df597a891b9219bc1624dd5e4831072f0856df7b7d8f608b920452bb2b6c3_ibm.helloworld[3166]: node1 says: Hello World!!
^C
ubuntu@ubuntu:/usr/horizon/bin$ ls
agent-install.cfg      agent-uninstall.sh  horizon-agent-linux-deb-armhf.tar.gz
agent-install.cfg_bak  anax                horizon-container
agent-install.sh       edgeNodeFiles.sh    hzn
ubuntu@ubuntu:/usr/horizon/bin$ cat agent-install.cfg
HZN_EXCHANGE_URL=http://192.168.100.32:3090/v1
HZN_FSS_CSSURL=http://192.168.100.32:9443/
HZN_AGBOT_URL=http://127.0.0.1:3111
HZN_SDO_SVC_URL=http://192.168.100.32:9008/api
ubuntu@ubuntu:/usr/horizon/bin$ cat agent-install.cfg_bak 
HZN_EXCHANGE_URL=http://127.0.0.1:3090/v1
HZN_FSS_CSSURL=http://127.0.0.1:9443/
HZN_AGBOT_URL=http://127.0.0.1:3111
HZN_SDO_SVC_URL=http://127.0.0.1:9008/api
ubuntu@ubuntu:/usr/horizon/bin$ ls ~/
horizon-agent-linux-deb-armhf.tar.gz  horizon_2.29.0-498_armhf.deb  open_horizon_exports.sh
horizon-cli_2.29.0-498_armhf.deb      hzn_node_list_agent
ubuntu@ubuntu:/usr/horizon/bin$ ls -al ~/
total 65100
drwxr-xr-x 5 ubuntu ubuntu     4096 Aug  5 22:51 .
drwxr-xr-x 3 root   root       4096 Feb  1  2021 ..
-rw------- 1 ubuntu ubuntu     4912 Aug  5 00:09 .bash_history
-rw-r--r-- 1 ubuntu ubuntu      220 Feb 25  2020 .bash_logout
-rw-r--r-- 1 ubuntu ubuntu     3799 Aug  2 16:19 .bashrc
drwx------ 2 ubuntu ubuntu     4096 Feb  1  2021 .cache
drwx------ 3 ubuntu ubuntu     4096 Feb  1  2021 .config
-rw-r--r-- 1 ubuntu ubuntu      807 Feb 25  2020 .profile
drwx------ 2 ubuntu ubuntu     4096 Jul 20 17:59 .ssh
-rw-r--r-- 1 ubuntu ubuntu        0 Feb  1  2021 .sudo_as_admin_successful
-rw------- 1 ubuntu ubuntu     3820 Aug  5 22:51 .viminfo
-rw-rw-r-- 1 ubuntu ubuntu      227 Jul 19 16:10 .wget-hsts
-rw-rw-r-- 1 ubuntu ubuntu 33293155 Jul 10 01:03 horizon-agent-linux-deb-armhf.tar.gz
-rw-r--r-- 1 ubuntu ubuntu 15233916 Jul 10 01:02 horizon-cli_2.29.0-498_armhf.deb
-rw-r--r-- 1 ubuntu ubuntu 18067840 Jul 10 01:02 horizon_2.29.0-498_armhf.deb
-rw-rw-r-- 1 ubuntu ubuntu      469 Jul 19 18:14 hzn_node_list_agent
-rw-rw-r-- 1 ubuntu ubuntu      280 Aug  2 16:19 open_horizon_exports.sh
ubuntu@ubuntu:/usr/horizon/bin$ cat ~/open_horizon_exports.sh 
export HZN_ORG_ID=myorg
export HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO
export HZN_DEVICE_TOKEN=Zm4Y1wFgrUD2D1MTrtn1UmyBaOnn8u
export HZN_DEVICE_ID=node1

export HZN_EXCHANGE_URL=http://192.168.100.32:3090/v1/
export HZN_FSS_CSSURL=http://192.168.100.32:9443/

ubuntu@ubuntu:/usr/horizon/bin$ 


Probably works

install docker

follow

https://docs.docker.com/engine/install/ubuntu/

then install packages from

https://github.com/open-horizon/anax/releases


Follow

https://open-horizon.github.io/docs/installing/advanced_man_install.html


to change


/etc/default/horizon

like


Code Block
ubuntu@ubuntu:~$ cat /etc/default/horizon
HZN_EXCHANGE_URL=http://192.168.100.32:3090/v1
HZN_FSS_CSSURL=http://192.168.100.32:9443/
HZN_AGBOT_URL=http://127.0.0.1:3111
HZN_MGMT_HUB_CERT_PATH=
HZN_DEVICE_ID=node1
HZN_AGENT_PORT=8510
ubuntu@ubuntu:~$



systemctl restart horizon.service

Code Block
ubuntu@ubuntu:~$ hzn version
Horizon CLI version: 2.29.0-537
Horizon Agent version: 2.29.0-537
ubuntu@ubuntu:~$


Code Block
ubuntu@ubuntu:~$ hzn exchange version
2.78.0
ubuntu@ubuntu:~$


Code Block
ubuntu@ubuntu:~$ hzn node list
{
  "id": "node1",
  "organization": "myorg",
  "pattern": "IBM/pattern-ibm.helloworld",
  "name": "node1",
  "nodeType": "device",
  "token_last_valid_time": "2021-08-10 00:15:28 +0000 UTC",
  "token_valid": true,
  "ha": false,
  "configstate": {
    "state": "configured",
    "last_update_time": "2021-08-10 00:15:29 +0000 UTC"
  },
  "configuration": {
    "exchange_api": "http://192.168.100.32:3090/v1/",
    "exchange_version": "2.78.0",
    "required_minimum_exchange_version": "2.44.0",
    "preferred_exchange_version": "2.81.0",
    "mms_api": "http://192.168.100.32:9443",
    "architecture": "arm64",
    "horizon_version": "2.29.0-537"
  }
}
ubuntu@ubuntu:~$ 





Next

Code Block
ubuntu@ubuntu:~$ hzn exchange pattern list IBM/
[
  "IBM/pattern-ibm.cpu2evtstreams",
  "IBM/pattern-ibm.hello-mms-arm",
  "IBM/pattern-ibm.hello-mms",
  "IBM/pattern-nginx-operator-amd64",
  "IBM/pattern-ibm.helloworld",
  "IBM/pattern-ibm.hello-mms-amd64",
  "IBM/pattern-ibm.hello-mms-arm64"
]
ubuntu@ubuntu:~$ 


instead of
  hzn register -p IBM/pattern-ibm.helloworld
run
hzn register -p IBM/pattern-ibm.helloworld -s ibm.helloworld --serviceorg IBM
from
https://github.com/open-horizon/examples/blob/master/edge/services/helloworld/README.md#preconditions


ubuntu@ubuntu:~$ hzn register -p IBM/pattern-ibm.helloworld -s ibm.helloworld --serviceorg IBM
Horizon Exchange base URL: http://192.168.100.32:3090/v1
Using node ID 'node1' from the Horizon agent
Generated random node token
Updating node token...
Will proceeed with the given pattern IBM/pattern-ibm.helloworld.
Initializing the Horizon node with node type 'device'...
Note: no input file was specified. This is only valid if none of the services need variables set.
However, if there is 'userInput' specified in the node already in the Exchange, the userInput will be used.
Changing Horizon state to configured to register this node with Horizon...
Horizon node is registered. Workload services should begin executing shortly.
Waiting for up to 60 seconds for following services to start:
IBM/ibm.helloworld
Status of the services you are watching:
IBM/ibm.helloworld Progress so far: agreement proposal has been received
Status of the services you are watching:
IBM/ibm.helloworld Progress so far: agreement is accepted
Status of the services you are watching:
IBM/ibm.helloworld Progress so far: service is created
Status of the services you are watching:
IBM/ibm.helloworld Progress so far: execution is started
Status of the services you are watching:
IBM/ibm.helloworld Success



  hzn agreement list

ubuntu@ubuntu:~$ hzn agreement list


[


{


"name": "pattern-ibm.helloworld_ibm.helloworld_IBM_arm64 merged with pattern-ibm.helloworld_ibm.helloworld_IBM_arm64",


"current_agreement_id": "8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6",


"consumer_id": "IBM/agbot",


"agreement_creation_time": "2021-08-10 00:15:37 +0000 UTC",


"agreement_accepted_time": "2021-08-10 00:15:40 +0000 UTC",


"agreement_finalized_time": "2021-08-10 00:15:48 +0000 UTC",


"agreement_execution_start_time": "2021-08-10 00:15:48 +0000 UTC",


"agreement_data_received_time": "",


"agreement_protocol": "Basic",


"workload_to_run": {


"url": "ibm.helloworld",


"org": "IBM",


"version": "1.0.0",


"arch": "arm64"


}


}


]



Code Block
ubuntu@ubuntu:~$   sudo docker ps
CONTAINER ID   IMAGE                              COMMAND                  CREATED         STATUS         PORTS     NAMES
6a8c986c5955   openhorizon/ibm.helloworld_arm64   "/bin/sh -c /service…"   4 minutes ago   Up 4 minutes             8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6-ibm.helloworld


Code Block
ubuntu@ubuntu:~$   sudo hzn service log -f ibm.helloworld
Found service ibm.helloworld with service id 8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6.
Displaying log messages of container ibm.helloworld for service ibm.helloworld with service id 8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6.
Use ctrl-C to terminate this command.
Aug 10 00:15:48 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!
Aug 10 00:15:51 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!
Aug 10 00:15:54 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!
Aug 10 00:15:57 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!
Aug 10 00:16:00 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!
Aug 10 00:16:03 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!
Aug 10 00:16:06 ubuntu workload-8c61ebcabbafcf380758739116cb5603bed33d64984862a910c20c56a6b003b6_ibm.helloworld[1934]: node1 says: Hello World!!