open-horizon-services / service-edgelake

Deployment of EdgeLake using OpenHorizon
0 stars 2 forks source link

HelloWorld Timesout when using agent-install.sh #8

Closed oshadmon closed 4 months ago

oshadmon commented 4 months ago

OpenHorzon Version: v2.30.0-1476_amd64 Machine: Ubuntu 22.04 LTS (jammy) on amd64

Steps:

  1. Expose params

    export HZN_ORG_ID=alog
    # export HZN_DEVICE_TOKEN= # specify a string value for a token
    export HZN_DEVICE_ID=alog-edgelake-node 
    export HZN_EXCHANGE_USER_AUTH=XXXX
    export HZN_EXCHANGE_URL=http://132.177.125.232:3090/v1
    export HZN_FSS_CSSURL=http://132.177.125.232:9443/
    export HZN_AGBOT_URL=http://132.177.125.232:3111/
    export HZN_SDO_SVC_URL=http://132.177.125.232:9008/api
  2. Install OpenHorizon debian

  3. Create agent-install.cfg

    HZN_EXCHANGE_URL=http://132.177.125.232:3090/v1
    HZN_FSS_CSSURL=http://132.177.125.232:9443/
    HZN_AGBOT_URL=http://132.177.125.232:3111
    HZN_SDO_SVC_URL=http://132.177.125.232:9008/api
    HZN_FDO_SVC_URL=http://132.177.125.232:9008/api
  4. Download agent-install.sh - Note I've tried multiple version of agent-install.sh

  5. Attempt to install IBM/pattern-ibm.helloworld running

    • Option A: bash ./agent-install.sh -i . -p IBM/pattern-ibm.helloworld -w '*' -T 120
    • Option B: bash ./agent-install.sh -k ./agent-install.cfg -i . -p

Expect: Success Actual: Timeout error – it doesn’t even look like hello world downloaded to my machine Note: I then installed using pattern-based policy for web-helloworld-python and that worked like a charm

IBM/pattern-ibm.helloworld -w '*' -T 120

Status of the services you are watching:
        IBM/ibm.helloworld      Progress so far: no agreements formed yet
Timeout waiting for some services to successfully start. Analyzing possible reasons for the timeout...
The following services are not deployed to the node, continuing analysis:
        IBM/ibm.helloworld

Currently, there are no active agreements on this node.

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 are compatible.
Command output:
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_amd64": "Compatible"
  }
}

Analysis complete.
oshadmon commented 4 months ago

Issue the agent-install.sh, HelloWorld does timeout, however, I can validate the service gets install

root@alog-edgelake-node:~# curl -sSL https://github.com/open-horizon/anax/releases/latest/download/agent-install.sh | bash -s -- -i anax: -k ./agent-install.cfg -c css: -p IBM/pattern-ibm.helloworld -w '*' -T 120
2024-04-01 15:42:14 OS: linux, Distro: ubuntu, Distro Release: 22.04, Distro Code Name: jammy, Architecture: amd64
2024-04-01 15:42:14 AGENT_IN_CONTAINER: false (from default value)
2024-04-01 15:42:14 AGENT_CONTAINER_NUMBER: 1 (from default value)
2024-04-01 15:42:14 AGENT_AUTO_UPGRADE: false (from default value)
2024-04-01 15:42:14 AGENT_UPGRADE_TYPES: software,cert,config (from default value)
...
Timeout waiting for some services to successfully start. Analyzing possible reasons for the timeout...
The following services are not deployed to the node, continuing analysis:
        IBM/ibm.helloworld

Currently, there are no active agreements on this node.

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 are compatible.
Command output:
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_amd64": "Compatible"
  }
}

Analysis complete

root@alog-edgelake-node:~# hzn version 
Horizon CLI version: 2.31.0-1503
Horizon Agent version: 2.31.0-1503
oshadmon commented 4 months ago

OpenHorzon Version: 2.31.0-1503

Status: Issue has been resolved using the following install process

Notice, the code used the following URL: https://raw.githubusercontent.com/open-horizon/anax/v2.30/agent-install/agent-install.sh

root@alog-edgelake-node:~# curl -sSL https://raw.githubusercontent.com/open-horizon/anax/v2.30/agent-install/agent-install.sh | bash -s -- -i anax: -c css: -p IBM/pattern-ibm.helloworld -w '*' -T 120 
Will proceed 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 120 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 finalized
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
root@alog-edgelake-node:~# docker ps -a 
CONTAINER ID   IMAGE                              COMMAND                  CREATED          STATUS          PORTS     NAMES
df6eab8fc034   openhorizon/ibm.helloworld_amd64   "/bin/sh -c /service…"   34 seconds ago   Up 33 seconds             6f6662536cb1b7519d27e53c653a98129761bebcd54919a72483a72ffba272b5-ibm.helloworld
root@alog-edgelake-node:~# docker logs 6f6662536cb1b7519d27e53c653a98129761bebcd54919a72483a72ffba272b5-ibm.helloworld
alog-edgelake-node says: Hello World!!
alog-edgelake-node says: Hello World!!
alog-edgelake-node says: Hello World!!
alog-edgelake-node says: Hello World!!