open-horizon / examples

Code examples you can use with Horizon.
Apache License 2.0
40 stars 65 forks source link

edgeNodeFiles.sh gets error logging into mgmt hub docker registry #328

Closed bmpotter closed 4 years ago

bmpotter commented 4 years ago

First, a couple easier fixes to edgeNodeFiles.sh that are also important:

Now for the docker login issues:

Linux:

Had these env vars set and ran this cmd:

$ echo -e "CLUSTER_URL=$CLUSTER_URL\nUSER=$USER\nPW=$PW\nEDGE_CLUSTER_REGISTRY_USER=$EDGE_CLUSTER_REGISTRY_USER\nEDGE_CLUSTER_REGISTRY_PW=$EDGE_CLUSTER_REGISTRY_PW\nIMAGE_ON_EDGE_CLUSTER_REGISTRY=$IMAGE_ON_EDGE_CLUSTER_REGISTRY"
CLUSTER_URL=https://icp-console.apps.rested-squid.purple-chesterfield.com
USER=admin
PW=temporary-admin-access-password
EDGE_CLUSTER_REGISTRY_USER=reguser
EDGE_CLUSTER_REGISTRY_PW=betheedge
IMAGE_ON_EDGE_CLUSTER_REGISTRY=localhost:32000/openhorizon/amd64_anax_k8s
$
$ ./edgeNodeFiles.sh x86_64-Cluster -t -o $HZN_ORG_ID -n bp-edge-cluster -i 2.26.8

The input checking and cloutctl login was successful, then:

default-route-openshift-image-registry.apps.rested-squid.purple-chesterfield.comOCP_DOCKER_HOST=default-route-openshift-image-registry.apps.rested-squid.purple-chesterfield.com
OCP_USER=admin
OCP_TOKEN=PW-FL9hjR02R68qsP4sJlxt58L3PrrjEC7z-qebifboB

Getting penShift certificate...
depth=1 CN = ingress-operator@1586925810
verify error:num=19:self signed certificate in certificate chain
DONE
Get ocp.crt

Detected OS is Linux, adding ocp.crt to docker...
Docker restarted
Logging in to OpenShift image registry...
Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`
ERROR: Failed to login to OpenShift image registry

MacOS

Same inputs and cmd, but slightly different error:

default-route-openshift-image-registry.apps.rested-squid.purple-chesterfield.comOCP_DOCKER_HOST=default-route-openshift-image-registry.apps.rested-squid.purple-chesterfield.com
OCP_USER=admin
OCP_TOKEN=FPLZgbibLVPVDzZZTXn6mgeqcciqFbxL2v0m026UZ9Vx

Getting penShift certificate...
depth=1 CN = ingress-operator@1586925810
verify error:num=19:self signed certificate in certificate chain
verify return:0
DONE
Get ocp.crt

Detected OS is Mac OS, adding ocp.crt to docker...
Docker restarted
Logging in to OpenShift image registry...
INFO[0007] Error logging in to v2 endpoint, trying next endpoint: Get https://default-route-openshift-image-registry.apps.rested-squid.purple-chesterfield.com/v2/: x509: certificate signed by unknown authority 
Get https://default-route-openshift-image-registry.apps.rested-squid.purple-chesterfield.com/v2/: x509: certificate signed by unknown authority
ERROR: Failed to login to OpenShift image registry
bmpotter commented 4 years ago

i've verified this