Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-4415

airgap prepare script doesn't work with ROSA

Prepare for Y ReleasePrepare for Z ReleaseRemove QuarterXMLWordPrintable

    • RHDH Install 3265

      Need to update the .rhdh/scripts/prepare-restricted-environment.sh script to work with 1.3+ and ROSA clusters (so we can validate AWS airgap scenarios).

      Tried it tonight from my PR here on a rosa create 4.14 3h cluster, and it failed in a few places:

      bash -x ./prepare-restricted-environment.sh --prod_operator_index quay.io/rhdh/iib:latest-v4.14-x86_64 --prod_operator_version v1.3.0 --use_image_content_source_policy false
      ++ oc -n airgap-helper-ns create route edge --service=airgap-registry --insecure-policy=Redirect --dry-run=client -o yaml
      ++ oc -n airgap-helper-ns apply -f -
      error: resource mapping not found for name: "airgap-registry" namespace: "airgap-helper-ns" from "STDIN": no matches for kind "Route" in version "v1"
      ensure CRDs are installed first
      +++ oc get route airgap-registry -n airgap-helper-ns '--template={{ .spec.host }}'
      Error from server (NotFound): routes.route.openshift.io "airgap-registry" not found
      ++ local registry_url=
      ++ echo '... done. Mirror registry should now be reachable at:  ...'
      ... done. Mirror registry should now be reachable at:  ...
      ++ echo '[INFO] Waiting for mirror registry to be ready and reachable ...'
      [INFO] Waiting for mirror registry to be ready and reachable ...
      ++ curl --insecure -IL '' --retry 100 --retry-all-errors --retry-max-time 900 --fail
      ++ echo '[INFO] Log into mirror registry to be able to push images to it...'
      [INFO] Log into mirror registry to be able to push images to it...
      ++ podman login -u=registryuser -p=<pwd here> '' --tls-verify=false
      Error: authenticating creds for "": pinging container registry : Get "http:///v2/": http: no Host in request URL
      
      ...
      
      + podman build -t /rhdh/rhdh-index:v1.3.0 -f ./rhdh-disconnected-install.Dockerfile --no-cache .
      Error: tag /rhdh/rhdh-index:v1.3.0: invalid reference format
      

      So... we should improve this script to recover better from errors and provide more useful feedback to the user if/when steps fail, like creating the route, logging into the registry, etc.

              rh-ee-asoro Armel Soro
              nickboldt Nick Boldt
              RHIDP - Install
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated: