open-horizon / devops

Devops processes to build and deploy horizon components
Apache License 2.0
10 stars 43 forks source link

Short term fix for matching Agent and Hub versions for the "all-in-one". #105

Open TheMosquito opened 2 years ago

TheMosquito commented 2 years ago

How are users expected to get the correct version of the agent-install.sh script for an all-in-one Hub? I think this is not very well spelled out in https://github.com/open-horizon/devops/blob/master/mgmt-hub/README.md. Reading between the lines there, I think they are supposed to (at the exact same time as they get the deploy-mgmt-hub.sh for the all-in-one Management Hub installation) also get the corresponding agent-install.sh script, like this: curl -sSL https://github.com/open-horizon/anax/releases/latest/download/agent-install.sh. If they don’t pull it at exactly the same time, and save it for later, and then if “latest” moves, then things will break in subtle ways for them. I think we need to do better than this. I'd like to suggest as a short term fix for this that the deploy-mgmt-hub.sh script should pull the agent-install.sh script and save it (and also tell the user where it is). That’s not a perfect solution for matching versions (because the user might have pulled the deploy-mgmt-hub.sh script earlier but then run it after latest has changed) but I think it’s better than not doing anything. The real fix is to have a concrete mapping between Management Hub versions and corresponding Agent versions, which I believe is embodied in another issue elsewhere. So this is suggested as a short term fix.

joewxboy commented 2 years ago

@bmpotter Could I get your thoughts on this? The core issue is that we don't want the All-in-one script to drift too far from the agent-install script. This can typically happen when agents are installed in a later session from the Hub.