Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-9844

Project created via fuse-apicurito-generator cannot be deployed to OpenShift

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: fuse-7.2
    • Fix Version/s: fuse-7.2
    • Component/s: Apicurito
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. run minishift with apicurito + some additional setup see https://docs.engineering.redhat.com/display/fuseqe/How+to+setup+and+run+Apicurito
      2. open an OpenAPI file in Apicurito and generate a Fuse from it
      3. generate auth token on https://access.redhat.com/terms-based-registry
      4. used that token in
        1. `docker login`
        2. `oc create -f <name-of-secret>.yaml -n openshift
      5. try to execute `mvn clean fabric8:deploy` on the project
      Show
      run minishift with apicurito + some additional setup see https://docs.engineering.redhat.com/display/fuseqe/How+to+setup+and+run+Apicurito open an OpenAPI file in Apicurito and generate a Fuse from it generate auth token on https://access.redhat.com/terms-based-registry used that token in `docker login` `oc create -f <name-of-secret>.yaml -n openshift try to execute `mvn clean fabric8:deploy` on the project

      Description

      If I generate a Fuse project from Apicurito, I'm unable to deploy it to OpenShift with the following error:

      ➜  camel-project mvn clean fabric8:deploy
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] ------------------------------------------------------------------------
      [INFO] Building AddressBook API 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ addressbook-api ---
      [INFO] Deleting /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target
      [INFO] 
      [INFO] >>> fabric8-maven-plugin:7.1.0.fuse-710019-redhat-00002:deploy (default-cli) > install @ addressbook-api >>>
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ addressbook-api ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 3 resources
      [INFO] 
      [INFO] --- fabric8-maven-plugin:7.1.0.fuse-710019-redhat-00002:resource (default) @ addressbook-api ---
      [INFO] F8: Running in OpenShift mode
      [INFO] F8: Using docker image name of namespace: openshift
      [INFO] F8: Running generator spring-boot
      [INFO] F8: spring-boot: Using Docker image fuse7/fuse-java-openshift:1.1 as base / builder
      [INFO] F8: using resource templates from /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/src/main/fabric8
      [INFO] F8: spring-boot-health-check: Adding readiness probe on port 8081, path='/health', scheme='HTTP', with initial delay 10 seconds
      [INFO] F8: spring-boot-health-check: Adding liveness probe on port 8081, path='/health', scheme='HTTP', with initial delay 180 seconds
      [INFO] F8: fmp-revision-history: Adding revision history limit to 2
      [INFO] F8: f8-icon: Adding icon for deployment
      [INFO] F8: f8-icon: Adding icon for service
      [INFO] F8: validating /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes/META-INF/fabric8/openshift/addressbook-api-svc.yml resource
      [INFO] F8: validating /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes/META-INF/fabric8/openshift/addressbook-api-deploymentconfig.yml resource
      [WARNING] F8: Invalid Resource : /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes/META-INF/fabric8/openshift/addressbook-api-deploymentconfig.yml
      [message=.spec.template.spec.containers[0].resources.requests.cpu: string found, object expected, violation type=type]
      [message=.spec.template.spec.containers[0].resources.limits.cpu: string found, object expected, violation type=type]
      [INFO] F8: validating /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes/META-INF/fabric8/kubernetes/addressbook-api-svc.yml resource
      [INFO] F8: validating /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes/META-INF/fabric8/kubernetes/addressbook-api-deployment.yml resource
      [WARNING] F8: Invalid Resource : /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes/META-INF/fabric8/kubernetes/addressbook-api-deployment.yml
      [message=.spec.template.spec.containers[0].resources.limits.cpu: string found, object expected, violation type=type]
      [message=.spec.template.spec.containers[0].resources.requests.cpu: string found, object expected, violation type=type]
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ addressbook-api ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 4 source files to /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/classes
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ addressbook-api ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/src/test/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ addressbook-api ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ addressbook-api ---
      [INFO] No tests to run.
      [INFO] 
      [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ addressbook-api ---
      [INFO] Building jar: /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/addressbook-api-1.0-SNAPSHOT.jar
      [INFO] 
      [INFO] --- spring-boot-maven-plugin:7.1.0.fuse-710019-redhat-00002:repackage (default) @ addressbook-api ---
      [INFO] 
      [INFO] --- fabric8-maven-plugin:7.1.0.fuse-710019-redhat-00002:build (default) @ addressbook-api ---
      [INFO] F8: Using OpenShift build with strategy S2I
      [INFO] F8: Running generator spring-boot
      [INFO] F8: spring-boot: Using ImageStreamTag 'fuse7-java-openshift:1.1' from namespace 'openshift' as builder image
      [INFO] Copying files to /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/docker/addressbook-api/latest/build/maven
      [INFO] Building tar: /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/docker/addressbook-api/latest/tmp/docker-build.tar
      [INFO] F8: [addressbook-api:latest] "spring-boot": Created docker source tar /home/tsedmik/Downloads/camel-project-mflinnexample/camel-project/target/docker/addressbook-api/latest/tmp/docker-build.tar
      [INFO] F8: Creating BuildServiceConfig addressbook-api-s2i for Source build
      [INFO] F8: Creating ImageStream addressbook-api
      [INFO] F8: Starting Build addressbook-api-s2i
      [INFO] F8: Waiting for build addressbook-api-s2i-1 to complete...
      [INFO] F8: Receiving source from STDIN as archive ...
      [INFO] F8: pulling image error : unable to retrieve auth token: 401 unauthorized
      [INFO] F8: error: build error: unable to get registry.redhat.io/fuse7/fuse-java-openshift@sha256:ba0bb0b1b9bed00d24bd73b59b6a3f7a46714ba1c0e1b900572dc580eedde68c
      [ERROR] F8: Failed to execute the build [Unable to build the image using the OpenShift build service]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 21.770 s
      [INFO] Finished at: 2018-11-22T14:03:53+01:00
      [INFO] Final Memory: 66M/698M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.jboss.redhat-fuse:fabric8-maven-plugin:7.1.0.fuse-710019-redhat-00002:build (default) on project addressbook-api: Failed to execute the build: Unable to build the image using the OpenShift build service: OpenShift Build addressbook-api-s2i-1: Failed: PullBuilderImageFailed -> [Help 1]
      [ERROR] 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      

      Since registry.redhat.io needs authentication, I used `docker login` to store my credentials for fabric8-maven-plugin (according to https://maven.fabric8.io/#authentication). It does not help (see the log above).

      I was able to:

      • pull the image via docker
        docker pull registry.redhat.io/fuse7/fuse-java-openshift:1.1
      • import the image via oc
        oc import-image fuse7-java-openshift:1.1 -n openshift

      See steps to reproduce

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jamesnetherton James Netherton
                  Reporter:
                  tsedmik Tomáš Sedmík
                  Tester:
                  Tomáš Sedmík
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: