Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The all-in-one script should provide the user's credentials earlier in the process. #104

Open
TheMosquito opened this issue Feb 23, 2022 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@TheMosquito
Copy link
Member

The code here:
https://github.com/open-horizon/devops/blob/master/mgmt-hub/deploy-mgmt-hub.sh#L1351
never runs if even a simple and correctable error occurs. As a result, the user's credentials for the hub are essentially discarded (they are never given access to them). The user must then always start over from scratch in this situation instead of just fixing the error and continuing. Some examples of correctable errors are something going wrong during example publication or during node registration (both of which happen after after successful Management Hub setup). Both of these examples happened to me while trying to get the all-in-one running under WSL2 on Windows.
I think ideally the Management Hub's user credentials should written into a file whose filename was announced early in the script and then again near the end. For maximum user convenience the credentials would be written in a form that could simply be sourced into a shell.

@TheMosquito TheMosquito added the good first issue Good for newcomers label Feb 23, 2022
@TheMosquito
Copy link
Member Author

TheMosquito commented Feb 28, 2022

To add to the above, today I finally got deploy-mgmt-hub.sh to successfully install a Management Hub on Windows under WSL2. After doing so it is a bit of a struggle to setup credentials to use it. So my request is for the script to emit a file containing all of the creds like it does now when successful, but write them as comments into the file, and then add the un-commented export statements needed to interact with the local Exchange using the hzn CLI. I.e.:

export HZN_EXCHANGE_URL=http://127.0.0.1:3090/v1
export HZN_FSS_CSSURL=http://127.0.0.1:3090/edge-css
export HZN_ORG_ID=myorg
export HZN_EXCHANGE_USER_AUTH=admin:<<<value of the EXCHANGE_USER_ADMIN_PW from that output>>>

The org name, and the user name were in the output, but kind of hidden in there. Also, users have to dig around to figure out the required 4 environment variable names and the 2 URLs that have to be set in order to use the CLI commands. So doing the above would be a big improvement to usability.

@naphelps naphelps added the help wanted Extra attention is needed label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants