[UI] Embed files inside image 90/1990/1
authorIoakeim Samaras <is661a@att.com>
Fri, 15 Nov 2019 20:20:15 +0000 (12:20 -0800)
committerIoakeim Samaras <is661a@att.com>
Fri, 15 Nov 2019 20:20:15 +0000 (12:20 -0800)
The files 'server.xml' and 'index.jsp'
are embedded inside the UI docker
image during build stage

Signed-off-by: Ioakeim Samaras <is661a@att.com>
Change-Id: I056fbb28a2e58630061ea85d8846ebe08f302998

docker/ui/Dockerfile
docker/ui/deploy.sh
ui/CHANGELOG.md
ui/docker-files/index.jsp [moved from docker/ui/root_index.jsp with 100% similarity]
ui/docker-files/server.xml [moved from docker/ui/server.xml with 100% similarity]
ui/pom.xml
ui/src/main/resources/portal.properties
ui/ui-docker-assembly.xml [new file with mode: 0644]

index c7a6a5e..0ef94f6 100644 (file)
@@ -20,3 +20,5 @@ RUN cd /opt/akraino/validation/ui && mvn clean package
 
 FROM tomcat:8.5.37
 COPY  --from=build /opt/akraino/validation/ui/target/bluvalui.war /usr/local/tomcat/webapps
+COPY  --from=build /opt/akraino/validation/ui/docker-files/index.jsp /usr/local/tomcat/webapps/ROOT
+COPY  --from=build /opt/akraino/validation/ui/docker-files/server.xml /usr/local/tomcat/conf
index 6a0d58f..8c9a231 100755 (executable)
@@ -76,8 +76,8 @@ echo "Note: If there is a password already stored in database, the supplied UI_A
 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
 if [[ $USE_NETWORK_HOST = "true" ]]
   then
-    docker run --detach --name $CONTAINER_NAME --network="host" -v "$(pwd)/server.xml:/usr/local/tomcat/conf/server.xml" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -v "$(pwd)/root_index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
+    docker run --detach --name $CONTAINER_NAME --network="host" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
   else
-    docker run --detach --name $CONTAINER_NAME -v "$(pwd)/server.xml:/usr/local/tomcat/conf/server.xml" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -v "$(pwd)/root_index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
+    docker run --detach --name $CONTAINER_NAME -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
 fi
 sleep 10
index bea59b6..6983f2e 100644 (file)
@@ -234,7 +234,7 @@ All notable changes to this project will be documented in this file.
 
 ### Removed
 
-## [0.4.4-SNAPSHOT] - 4 October 2019
+## [0.4.4-SNAPSHOT] - 4 October 2019 - Tagged as 2.0.0
 ### Added
 - The user can define whether the UI can trust all SSL certificates or not.
 - The mysql user name can be configured.
@@ -243,3 +243,11 @@ All notable changes to this project will be documented in this file.
 - New approach is used for interpreting shell script input variables. Now, all symbols are recognized.
 
 ### Removed
+
+## [0.4.5-SNAPSHOT] - 15 November 2019
+### Added
+
+### Changed
+- The files 'server.xml' and index.jsp are embedded inside the UI docker image during build stage
+
+### Removed
index d69dbd2..281781e 100644 (file)
@@ -14,7 +14,7 @@
 
     <groupId>org.akraino.validation</groupId>
     <artifactId>ui</artifactId>
-    <version>0.4.4-SNAPSHOT</version>
+    <version>0.4.5-SNAPSHOT</version>
     <name>Bluval UI Maven Webapp</name>
     <packaging>war</packaging>
 
                             <build>
                                 <from>tomcat:8.5.37</from>
                                 <assembly>
-                                    <descriptorRef>artifact</descriptorRef>
+                                    <descriptor>${project.basedir}/ui-docker-assembly.xml</descriptor>
                                 </assembly>
                                 <runCmds>
                                     <!-- must be all on one line; use CDATA
                                         to turn off the Eclipse formatter -->
-                                    <run><![CDATA[mv /maven/*.war /usr/local/tomcat/webapps]]></run>
+                                    <run><![CDATA[mv /maven/target/*.war /usr/local/tomcat/webapps; mv /maven/docker-files/index.jsp /usr/local/tomcat/webapps/ROOT; mv /maven/docker-files/server.xml /usr/local/tomcat/conf; rm -fr /maven]]></run>
                                 </runCmds>
                             </build>
                         </image>
                         <image>
                             <name>akraino/validation:dev-mysql-latest</name>
                             <build>
-                                <from>mysql:5.6</from>
+                                <from>mysql:5.6</from>ll
                                 <assembly>
                                     <descriptorRef>project</descriptorRef>
                                 </assembly>
index d870e02..e10f136 100644 (file)
@@ -56,7 +56,7 @@ use_rest_for_functional_menu=true
 portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl
 
 # URL of the Portal where this app is onboarded
-ecomp_redirect_url = https://bluval.akraino.org:8443/bluvalui/
+ecomp_redirect_url = https://bluval.akraino.org:443/bluvalui/
 
 # URL of the ECOMP Portal REST API
 ecomp_rest_url = http://portal.onap.org:50580/ecompportal/auxapi
diff --git a/ui/ui-docker-assembly.xml b/ui/ui-docker-assembly.xml
new file mode 100644 (file)
index 0000000..9031f76
--- /dev/null
@@ -0,0 +1,10 @@
+<assembly>
+    <id>ui-docker</id>
+    <fileSets>
+        <fileSet>
+            <directory>.</directory>
+            <outputDirectory>.</outputDirectory>
+            <fileMode>0644</fileMode>
+        </fileSet>
+    </fileSets>
+</assembly>
\ No newline at end of file