Versions Compared

Key

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

...

Verify that docker containers are running under 0.0.0.0.

Code Block
ubuntu@ubun2:~$ docker container ps

CONTAINER ID   IMAGE COMMAND CREATED STATUS PORTS NAMES  89d149cab8af openhorizon/ibm.helloworld_amd64 "/bin/sh -c /service…" 3 days ago Up About an hour faf1ba0cfc9ec7344d985b23856427c54841d773f75a9ffa8a90db5a1db9ceca-ibm.helloworld  38852a8c7957 openhorizon/amd64_agbot:latest "/bin/sh -c /usr/hor…" 3 days ago Up 59 minutes (healthy) 127.0.0.1:3110->8080/tcp, 0.0.0.0:3111->8083/tcp agbot  71cc38d60c24 openhorizon/sdo-owner-services:latest "/bin/sh -c $WORKDIR…"COMMAND 3 days ago Up About an hour (healthy) 0.0.0.0:8040->8040/tcp, 0.0.0.0:8042->8042/tcp, 0.0.0.0:9008->9008/tcp sdo-owner-services  324a6a4009af openhorizon/amd64_cloud-sync-service:latest "/usr/edge-sync-serv…" 3 daysCREATED ago Up About an hour (healthy) 0.0.0.0:9443->8080/tcp css-api

587afb807273 openhorizon/amd64_exchange-api:latest "/bin/sh -c '/usr/bi…" 3 days ago Up About an hour (healthy) 8083/tcp, 0.0.0.0:3090->8080/tcp exchange-api

15e71961ae9b mongo:latest "docker-entrypoint.s…" 3 days ago Up About an hour (healthy) 27017/tcp mongo

98b48ab9ccaf postgres:latest "docker-entrypoint.s…" 3 days ago Up About an hour (healthy) 5432/tcp postgres

Agent installation

Agent deb packages are available for different architectures under Agent releases.

Configuration after installation Open Horizon Management Hub and Agent

Next steps requires setting proper environmental variables on both HUB and Agent sites according to SDO-OH-EXF-dev-simple.

Code Block
titleEnvironemtal variables
export HZN_ORG_ID=myorg
export HZN_EXCHANGE_USER_AUTH=admin:<insert value from installation credentials>
export HZN_DEVICE_TOKEN=<insert value from installation credentials or use random string>
export HZN_DEVICE_ID=node1
export HZN_EXCHANGE_URL=http://<HUB-IP-address-here>:3090/v1/
export HZN_FSS_CSSURL=http://<HUB-IP-address-here>:9443/

HUB requires to set HZN_ORG_ID and HZN_EXCHANGE_USER_AUTH. For Agent all those variables has to be set.

Check configuration

Code Block
titleLocal HUB variables
ubuntu@ubun2:~$ env | grep HZN
HZN_ORG_ID=myorg
HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO
Code Block
titleAgent environmental variables
ubuntu@ubun2:~$ env | grep HZN
HZN_ORG_ID=myorg
HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO

NOTE: Environmental variables can be added to ~/.bashrc file to it will be set automatically at startup.

Run commands from How to use Open Horizon on both HUB and Agent to check configuration. Sample output is as follows.

Code Block
titleHUB hzn version
ubuntu@ubun2:~$ hzn version
Horizon CLI version: 2.29.0-515
Horizon Agent version: 2.29.0-515
ubuntu@ubun2:~$
Code Block
titleHUB hzn node list
ubuntu@ubun2:~$ hzn node list
{
  "id": "node1",
  "organization": "myorg",
  "pattern": "",
  "name": "node1",
  "nodeType": "device",
  "token_last_valid_time": "2021-07-29 23:00:54 +0000 UTC",
  "token_valid": true,
  "ha": false,
  "configstate": {
    "state": "configured",
    "last_update_time": "2021-07-29 23:00:54 +0000 UTC"
  },
  "configuration": {
    "exchange_api": "http://127.0.0.1:3090/v1/",
    "exchange_version": "2.78.0",
    "required_minimum_exchange_version": "2.44.0",
    "preferred_exchange_version": "2.76.0",
    "mms_api": "http://127.0.0.1:9443",
    "architecture": "amd64",
    "horizon_version": "2.29.0-515"
  }
}
ubuntu@ubun2:~$
Code Block
titleHUB hzn agreement list
ubuntu@ubun2:~$ hzn agreement list
[
  {
    "name": "Policy for myorg/node1 merged with myorg/policy-ibm.helloworld_1.0.0",
    "current_agreement_id": "faf1ba0cfc9ec7344d985b23856427c54841d773f75a9ffa8a90db5a1db9ceca",
    "consumer_id": "IBM/agbot",
    "agreement_creation_time": "2021-07-29 23:01:06 +0000 UTC",
    "agreement_accepted_time": "2021-07-29 23:01:09 +0000 UTC",
    "agreement_finalized_time": "2021-07-29 23:01:22 +0000 UTC",
    "agreement_execution_start_time": "2021-07-29 23:01:12 +0000 UTC",
    "agreement_data_received_time": "",
    "agreement_protocol": "Basic",
    "workload_to_run": {
      "url": "ibm.helloworld",
      "org": "IBM",
      "version": "1.0.0",
      "arch": "amd64"
    }
  }
]
ubuntu@ubun2:~$

Check whether exchange container is accessible outside on HUB and agent site

Code Block
curl -s http://<HUB-machine-ip-addres>:3090/v1/admin/version

Sample output

Code Block
2.78.0

Trying to configure agent

Issues:

...

STATUS                       PORTS                                                                    NAMES
89d149cab8af   openhorizon/ibm.helloworld_amd64              "/bin/sh -c /service…"   6 days ago   Up About an hour                                                                                      faf1ba0cfc9ec7344d985b23856427c54841d773f75a9ffa8a90db5a1db9ceca-ibm.helloworld
38852a8c7957   openhorizon/amd64_agbot:latest                "/bin/sh -c /usr/hor…"   6 days ago   Up About an hour (healthy)   127.0.0.1:3110->8080/tcp, 0.0.0.0:3111->8083/tcp                         agbot
71cc38d60c24   openhorizon/sdo-owner-services:latest         "/bin/sh -c $WORKDIR…"   6 days ago   Up About an hour (healthy)   0.0.0.0:8040->8040/tcp, 0.0.0.0:8042->8042/tcp, 0.0.0.0:9008->9008/tcp   sdo-owner-services
324a6a4009af   openhorizon/amd64_cloud-sync-service:latest   "/usr/edge-sync-serv…"   6 days ago   Up About an hour (healthy)   0.0.0.0:9443->8080/tcp                                                   css-api
587afb807273   openhorizon/amd64_exchange-api:latest         "/bin/sh -c '/usr/bi…"   6 days ago   Up About an hour (healthy)   8083/tcp, 0.0.0.0:3090->8080/tcp                                         exchange-api
15e71961ae9b   mongo:latest                                  "docker-entrypoint.s…"   6 days ago   Up About an hour (healthy)   27017/tcp                                                                mongo
98b48ab9ccaf   postgres:latest                               "docker-entrypoint.s…"   6 days ago   Up About an hour (healthy)   5432/tcp                                                                 postgres
ubuntu@ubun2:~$

Agent installation

Agent deb packages are available for different architectures under Agent releases.

Configuration after installation Open Horizon Management Hub and Agent

Next steps requires setting proper environmental variables on both HUB and Agent sites according to SDO-OH-EXF-dev-simple.

Code Block
titleEnvironemtal variables
export HZN_ORG_ID=myorg
export HZN_EXCHANGE_USER_AUTH=admin:<insert value from installation credentials>
export HZN_DEVICE_TOKEN=<insert value from installation credentials or use random string>
export HZN_DEVICE_ID=node1
export HZN_EXCHANGE_URL=http://<HUB-IP-address-here>:3090/v1/
export HZN_FSS_CSSURL=http://<HUB-IP-address-here>:9443/

HUB requires to set HZN_ORG_ID and HZN_EXCHANGE_USER_AUTH. For Agent all those variables has to be set.

Check configuration

Code Block
titleLocal HUB variables
ubuntu@ubun2:~$ env | grep HZN
HZN_ORG_ID=myorg
HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO


Code Block
titleAgent environmental variables
ubuntu@ubun2:~$ env | grep HZN
HZN_ORG_ID=myorg
HZN_EXCHANGE_USER_AUTH=admin:1eAVOw1dWRKve5b5KIkRk2PcBjXLnO


NOTE: Environmental variables can be added to ~/.bashrc file to it will be set automatically at startup.


Run commands from How to use Open Horizon on both HUB and Agent to check configuration. Sample output is as follows.

Code Block
titleHUB hzn version
ubuntu@ubun2:~$ hzn version
Horizon CLI version: 2.29.0-515
Horizon Agent version: 2.29.0-515
ubuntu@ubun2:~$


Code Block
titleHUB hzn node list
ubuntu@ubun2:~$ hzn node list
{
  "id": "node1",
  "organization": "myorg",
  "pattern": "",
  "name": "node1",
  "nodeType": "device",
  "token_last_valid_time": "2021-07-29 23:00:54 +0000 UTC",
  "token_valid": true,
  "ha": false,
  "configstate": {
    "state": "configured",
    "last_update_time": "2021-07-29 23:00:54 +0000 UTC"
  },
  "configuration": {
    "exchange_api": "http://127.0.0.1:3090/v1/",
    "exchange_version": "2.78.0",
    "required_minimum_exchange_version": "2.44.0",
    "preferred_exchange_version": "2.76.0",
    "mms_api": "http://127.0.0.1:9443",
    "architecture": "amd64",
    "horizon_version": "2.29.0-515"
  }
}
ubuntu@ubun2:~$


Code Block
titleHUB hzn agreement list
ubuntu@ubun2:~$ hzn agreement list
[
  {
    "name": "Policy for myorg/node1 merged with myorg/policy-ibm.helloworld_1.0.0",
    "current_agreement_id": "faf1ba0cfc9ec7344d985b23856427c54841d773f75a9ffa8a90db5a1db9ceca",
    "consumer_id": "IBM/agbot",
    "agreement_creation_time": "2021-07-29 23:01:06 +0000 UTC",
    "agreement_accepted_time": "2021-07-29 23:01:09 +0000 UTC",
    "agreement_finalized_time": "2021-07-29 23:01:22 +0000 UTC",
    "agreement_execution_start_time": "2021-07-29 23:01:12 +0000 UTC",
    "agreement_data_received_time": "",
    "agreement_protocol": "Basic",
    "workload_to_run": {
      "url": "ibm.helloworld",
      "org": "IBM",
      "version": "1.0.0",
      "arch": "amd64"
    }
  }
]
ubuntu@ubun2:~$


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


Code Block
titleAgent hzn node list
ubuntu@ubuntu:~$ hzn node list
{
  "id": "node1",
  "organization": null,
  "pattern": null,
  "name": null,
  "nodeType": null,
  "token_last_valid_time": "",
  "token_valid": null,
  "ha": null,
  "configstate": {
    "state": "unconfigured",
    "last_update_time": ""
  },
  "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.76.0",
    "mms_api": "http://192.168.100.32:9443",
    "architecture": "arm",
    "horizon_version": "2.29.0-498"
  }
}
ubuntu@ubuntu:~$ 


Code Block
titleAgent hzn agreement list
ubuntu@ubuntu:~$ hzn agreement list
[]
ubuntu@ubuntu:~$


Check whether exchange container is accessible outside on HUB and agent site

Code Block
curl -s http://<HUB-machine-ip-addres>:3090/v1/admin/version

Sample output

Code Block
2.78.0


Trying to configure agent


Firstly the problem seems to be that agent is not configured.

Code Block
titleAgent hzn node list
ubuntu@ubuntu:~$ hzn node list
{
  "id": "node1",
  "organization": null,
  "pattern": null,
  "name": null,
  "nodeType": null,
  "token_last_valid_time": "",
  "token_valid": null,
  "ha": null,
  "configstate": {
    "state": "unconfigured",
    "last_update_time": ""
  },
  "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.76.0",
    "mms_api": "http://192.168.100.32:9443",
    "architecture": "arm",
    "horizon_version": "2.29.0-498"
  }
}
ubuntu@ubuntu:~$ 




Agent configuration - it has to be investigated.

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

...