cloud-native-toolkit/itzcli

Initialization not behaving properly... maybe

Closed this issue · 3 comments

rikgig commented

Hi.

I've been initialization itz cli on my Mac, as well as on a VM running in Vagrant + VirtualBox (CentOS) and now an a RHEL VM running on VMWare.

Each time, I've run into different issues bootstrapping it. Here is my latest on the RHEL machine:

[egiguere@bastion-rik-storage-mlt-can-ibm-com itz-cli]$ ./itz doctor init
/home/egiguere/.itz does not exist; creating...
WARN[0000] docker not found

Permissions error while trying to read from your list of solutions. The most
common cause is an expired or bad API token. You can resolve this issue by going
to https://builder.cloudnativetoolkit.dev/ to get your API token, save it in a
file (e.g., /path/to/token.txt) and use the command:

$ itz auth login --from-file /path/to/token.txt --service builder

Please enter your ibm.com email address (for getting your solutions): eric.giguere@ibm.com
There is no token defined for the Reservations API. Please provide one: <here_was_my_token>

ERRO[0031] One or more requirements unmet; consider using doctor --auto-fix or doctor init to try to resolve them
Error: found 2 errors
Usage:
itz doctor init [flags]

Flags:
-h, --help help for init

Global Flags:
--config string config file (default is $HOME/.itz/cli-config.yaml)
-X, --debug Prints trace messaging for debugging
-v, --verbose Prints verbose messages

[egiguere@bastion-rik-storage-mlt-can-ibm-com itz-cli]$ ./itz doctor --auto-fix
INFO[0000] Performing 16 checks...
INFO[0000] podman... OK
WARN[0000] docker not found
INFO[0000] build_home... OK
INFO[0000] save... OK
INFO[0000] cli-config.yaml... OK
INFO[0000] build_home/casc.yaml... OK
INFO[0000] builder.api.refresh_token... OK
INFO[0000] builder.api.url... OK
INFO[0000] builder.api.username... OK
INFO[0000] reservations.api.token... OK
INFO[0000] reservations.api.url... OK
INFO[0000] itz.workspace.ocpinstaller... OK
INFO[0000] solution.deploy.getcode... OK
INFO[0000] solution.deploy.listparams... OK
INFO[0000] solution.deploy.setparams... OK
INFO[0000] solution.deploy.applyall... OK
INFO[0000] Done.
ERRO[0000] One or more requirements unmet; consider using doctor --auto-fix or doctor init to try to resolve them
Error: found 1 errors

Is the error reported before running itz doctor --auto-fix is the same, both due to the fact the docker is not found (but podman is)?
Not to mention that it is only a warning (the docker message)

This situation was occurring because the itz command is a wrapper script that calls the itzcli binary. Upon first run, if the ~/.itz directory does not exist, it attempts to call itz doctor -f for the user automatically. The original intention was to improve the user experience, but there was an issue with the call syntax that was creating a false error. That has been resolved and will be included in the next release. I will update this issue with a link to that release.

Closed with release v0.1.27..

rikgig commented

Nice thanks Nathan. I will test it as soon as I can