Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-2259

JWS xPaaS image s2i script not copying .war files from ARTIFACT_DIR to deployments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • JWS31 1.1.0.GA
    • JWS3
    • None
    • Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration, User Experience
    • Workaround Exists
    • Hide

      Need to use maven on a local machine to compile the tomcat app, create deployments folder, move the tomcat app to deployments folder, then new build; as described in: https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_jboss_web_server_for_openshift/get_started#binary_builds

      Show
      Need to use maven on a local machine to compile the tomcat app, create deployments folder, move the tomcat app to deployments folder, then new build; as described in: https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_jboss_web_server_for_openshift/get_started#binary_builds
    • Hide

      Login to openshift cluster using oc.

      oc new-app \
       https://github.com/jboss-openshift/openshift-quickstarts.git#master \
       --image-stream=jboss-webserver31-tomcat8-openshift \
       --context-dir='tomcat-websocket-chat' \
       --build-env="MAVEN_ARGS= clean package -e -Dcom.redhat.xpaas.repo.redhatga" \
       --build-env="ARTIFACT_DIR=tomcat-websocket-chat/target/" \
       --name=jws-wsch-app
      

      Note: using custom MAVEN_ARGS as workaround for openshift profile not included in the quickstart pom.xml (https://github.com/jboss-openshift/openshift-quickstarts/issues/37)

      Build Log attached. Lines of relevance to the bug are:

      Copying all war artifacts from /tmp/src/tomcat-websocket-chat/target/ directory into /opt/webserver/webapps for later deployment...
      Copying all war artifacts from /tmp/src/deployments directory into /opt/webserver/webapps for later deployment...
      

      Although war artifacts are copied from the deployments directory, they are not copied from the target directory.
      To confirm:

      • `oc debug <pod>`
      • `oc attach <debug_pod>`
      • /tmp/src/tomcat-websocket-chat/target/websocket-chat.war exists
      • /opt/webserver/webapps/websocket-chat.war does not exist.
      Show
      Login to openshift cluster using oc. oc new -app \ https: //github.com/jboss-openshift/openshift-quickstarts.git#master \ --image-stream=jboss-webserver31-tomcat8-openshift \ --context-dir= 'tomcat-websocket-chat' \ --build-env= "MAVEN_ARGS= clean package -e -Dcom.redhat.xpaas.repo.redhatga" \ --build-env= "ARTIFACT_DIR=tomcat-websocket-chat/target/" \ --name=jws-wsch-app Note: using custom MAVEN_ARGS as workaround for openshift profile not included in the quickstart pom.xml ( https://github.com/jboss-openshift/openshift-quickstarts/issues/37 ) Build Log attached. Lines of relevance to the bug are: Copying all war artifacts from /tmp/src/tomcat-websocket-chat/target/ directory into /opt/webserver/webapps for later deployment... Copying all war artifacts from /tmp/src/deployments directory into /opt/webserver/webapps for later deployment... Although war artifacts are copied from the deployments directory, they are not copied from the target directory. To confirm: `oc debug <pod>` `oc attach <debug_pod>` /tmp/src/tomcat-websocket-chat/target/websocket-chat.war exists /opt/webserver/webapps/websocket-chat.war does not exist.

      JWS xPaaS image s2i script not copying .war files from ARTIFACT_DIR to deployments when building new-app from source. Maven build completes successfully and war file is created and openshift console indicates it is moving war files from the ARTIFACT_DIR, however app fails to deploy, and upon checking a debug pod of the application, the war file is present at ARTIFACT_DIR, but not copied or moved to the webapps/ directory for deployment.

      Note: this occurs when using the xPaaS JWS quickstart/example from the documentation and was found testing images for documentation on: https://open.paas.redhat.com/

              Unassigned Unassigned
              tkelly@redhat.com Tyler Kelly (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: