Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3212

Some devfiles require s2i images to deploy to OpenShift, which are not available OOTB in disconnected environment

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Release Notes
    • Hide
      = Vert.x Health Check Example failing in restricted environments

      Currently, deploying the link:https://github.com/devspaces-samples/vertx-health-checks-example-redhat/blob/devspaces-3.1-rhel-8/devfile.yaml[Vert.x Health Check Example] application by running the `6-deploy-to-openshift` command fails in disconnected environments. There is currently no workaround for this issue.
      Show
      = Vert.x Health Check Example failing in restricted environments Currently, deploying the link: https://github.com/devspaces-samples/vertx-health-checks-example-redhat/blob/devspaces-3.1-rhel-8/devfile.yaml [Vert.x Health Check Example] application by running the `6-deploy-to-openshift` command fails in disconnected environments. There is currently no workaround for this issue.
    • Known Issue
    • Done

    Description

      Some sample projects in Dev Spaces refer to devfiles which include commands to deploy the application to OpenShift.

      However, the deploy commands (for example mvn fabric8:deploy or mvn oc:deploy) attempt to build a container image based on a base image that is not available out of the box in an airgapped Dev Spaces deployment. These base images could be:

      So, the easiest solution here would be to ensure the missing images are copied (skopeo copy --all ...) inside the cluster's internal container registry, so that they can be pulled by a user.


      vertx-health-checks-example-redhat relies on docker://registry.access.redhat.com/ubi8/openjdk-11:latest

      We are currently unable to run the deploy command in disconnected environment

         - exec:
            commandLine: 'mvn fabric8:deploy -Popenshift -DskipTests -Dvertx.disableDnsResolver=true'
            component: tools
            group:
              kind: run
            workingDir: '${PROJECTS_ROOT}/vertx-health-checks-example-redhat'
          id: 6-deploy-to-openshift
       [INFO] F8: Using Container image name of namespace: default
      [INFO] F8: Running generator vertx
      [INFO] F8: vertx: Using Container image registry.access.redhat.com/ubi8/openjdk-11 as base / builder
      [INFO] F8: using resource templates from /projects/vertx-health-checks-example-redhat/src/main/fabric8
      [INFO] F8: fmp-service: Adding a default service 'health-check-vertx' with ports [8080]
      [INFO] F8: fmp-ingress: Not generating Ingress for service health-check-vertx type is not LoadBalancer: null
      [INFO] F8: fmp-revision-history: Adding revision history limit to 2
      [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/kubernetes/health-check-vertx-deployment.yml resource
      [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/kubernetes/health-check-vertx-service.yml resource
      [INFO] F8: using resource templates from /projects/vertx-health-checks-example-redhat/src/main/fabric8
      [INFO] F8: fmp-service: Adding a default service 'health-check-vertx' with ports [8080]
      [INFO] F8: fmp-revision-history: Adding revision history limit to 2
      [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/openshift/health-check-vertx-deploymentconfig.yml resource
      [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/openshift/health-check-vertx-route.yml resource
      [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/openshift/health-check-vertx-service.yml resource
      [INFO] 
      [INFO] --- fabric8-maven-plugin:4.4.1:build (fmp) @ health-check-vertx ---
      [INFO] F8: Running in OpenShift mode
      [INFO] F8: Using OpenShift build with strategy S2I
      [INFO] F8: Running generator vertx
      [INFO] F8: vertx: Using Container image registry.access.redhat.com/ubi8/openjdk-11 as base / builder
      [INFO] Copying files to /projects/vertx-health-checks-example-redhat/target/docker/health-check-vertx/latest/build/maven
      [INFO] Building tar: /projects/vertx-health-checks-example-redhat/target/docker/health-check-vertx/latest/tmp/docker-build.tar
      [INFO] F8: [health-check-vertx:latest] "vertx": Created docker source tar /projects/vertx-health-checks-example-redhat/target/docker/health-check-vertx/latest/tmp/docker-build.tar
      [INFO] F8: Creating BuildServiceConfig health-check-vertx-s2i for Source build
      [INFO] F8: Creating ImageStream health-check-vertx
      [INFO] F8: Starting Build health-check-vertx-s2i
      [INFO] F8: Waiting for build health-check-vertx-s2i-1 to complete...
      [INFO] F8: Adding cluster TLS certificate authority to trust store
      [INFO] F8: time="2022-08-02T10:15:06Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled"
      [INFO] F8: I0802 10:15:06.318091       1 defaults.go:102] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on].
      [INFO] F8: Caching blobs under "/var/cache/blobs".
      [INFO] F8: Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest...
      [INFO] F8: Warning: Pull failed, retrying in 5s ...
      [INFO] F8: Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest...
      [INFO] F8: Warning: Pull failed, retrying in 5s ...
      [INFO] F8: Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest...
      [INFO] F8: Warning: Pull failed, retrying in 5s ...
      [INFO] F8: error: build error: After retrying 2 times, Pull image still failed due to error: initializing source docker://registry.access.redhat.com/ubi8/openjdk-11:latest: pinging container registry registry.access.redhat.com: Get "https://registry.access.redhat.com/v2/": Forbidden
      [ERROR] F8: Failed to execute the build: org.apache.maven.plugin.MojoExecutionException: OpenShift Build health-check-vertx-s2i-1 failed: Failed: GenericBuildFailed

      Solution

      Remove devfiles that do not fully work from the registry. All Getting-Started devfiles should be fully functional https://github.com/redhat-developer/devspaces-images/tree/devspaces-3-rhel-8/devspaces-devfileregistry/devfiles-extra :

      • 00_java11-maven-microprofile-bootable
      • 02_java11-maven-fuse
      • 03_java11-maven-vertx-http-booster
      • 03_java11-maven-vertx
      • 03_java8-maven-spring-boot-http-booster
      • 04_nodejs-configmap

      Attachments

        Issue Links

          Activity

            People

              nickboldt Nick Boldt
              tdancs Tibor Dancs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: