Update tomcat to 8.5 49/95249/1
authorstatta <statta@research.att.com>
Mon, 9 Sep 2019 15:58:00 +0000 (11:58 -0400)
committerstatta <statta@research.att.com>
Mon, 9 Sep 2019 15:58:00 +0000 (11:58 -0400)
Issue-ID: PORTAL-723

Change-Id: I4b57267c1e979c5f1bfd162cd1392cb6a0f316b9
Signed-off-by: statta <statta@research.att.com>
deliveries/Dockerfile.portal
ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js

index b4c759f..f12a3e3 100644 (file)
@@ -1,28 +1,8 @@
 # Dockerfile for image with ONAP Portal
+ARG BE_BASE_IMAGE=tomcat:8.5.35-jre8-alpine
+FROM ${BE_BASE_IMAGE}
 
-# Multistage to be able to have SDK war content and not war itself
-FROM busybox:latest AS war-decompress
-
-# Arguments are supplied by build.sh script
-# the defaults below only support testing
-ARG PORTAL_WAR=build/ecompportal-be-os.war
-ARG FE_DIR=build/public
-
-# Just variables, never passed in
-ARG PORTALCONTEXT=ONAPPORTAL
-
-RUN mkdir ${PORTALCONTEXT}
-
-# Portal has many parts
-COPY $PORTAL_WAR ${PORTALCONTEXT}
-RUN cd ${PORTALCONTEXT} && unzip -q *.war && rm *.war
-COPY ${FE_DIR} ${PORTALCONTEXT}/public
-
-# Yields an image 823 MB
-FROM openjdk:8-alpine
-# Yields an image 1.4 GB
-# FROM openjdk:8-jdk
-
+RUN apk add sudo && echo "portal ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
 # Arguments are supplied by build.sh script
 # the defaults below only support testing
 ARG PORTAL_WAR=build/ecompportal-be-os.war
@@ -32,27 +12,32 @@ ARG HTTPS_PROXY
 # ARG PORTAL_CERT=truststoreONAPall.jks
 
 # Just variables, never passed in
-ARG TOMCAT_VERSION=8.0.37
-ARG TOMCAT=apache-tomcat-${TOMCAT_VERSION}
-ARG TOMCATTAR=${TOMCAT}.tar.gz
-ARG TOMCATHOME=/opt/${TOMCAT}
 ARG PORTALCONTEXT=ONAPPORTAL
 
+ARG TOMCAT=/usr/local/tomcat
+ARG TOMCATHOME=${TOMCAT}
+ARG SERVERXML=${SERVERXML}
+
 ENV http_proxy $HTTP_PROXY
 ENV https_proxy $HTTPS_PROXY
-RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy  \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
-    if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
 
-# Install Tomcat.  This image already has curl.
-WORKDIR /tmp
-RUN wget -q http://archive.apache.org/dist/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/${TOMCATTAR} && \
-    tar -xzf ${TOMCATTAR} && \
-    rm ${TOMCATTAR} &&\
-    rm -fr ${TOMCAT}/webapps/* &&\
-    mkdir -p /opt &&\
-    mv ${TOMCAT} /opt
+RUN if [ -d /etc/apt ] && [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy  \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
+    if [ -d /etc/apt ] && [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
+
+# Remove manager and sample apps
+RUN rm -rf ${TOMCAT}/webapps/[a-z]*
+RUN mkdir -p /opt
+COPY ${SERVERXML} ${TOMCAT}/conf
+# TODO: ????
+#RUN mv ${TOMCAT} /opt
 
-COPY --from=war-decompress /${PORTALCONTEXT} ${TOMCATHOME}/webapps/${PORTALCONTEXT}/
+WORKDIR ${TOMCATHOME}/webapps
+RUN mkdir ${PORTALCONTEXT}
+
+# Portal has many parts
+COPY $PORTAL_WAR ${PORTALCONTEXT}
+RUN cd ${PORTALCONTEXT} && unzip -q *.war && rm *.war
+COPY ${FE_DIR} ${PORTALCONTEXT}/public
 
 VOLUME ${TOMCATHOME}/logs
 
@@ -65,4 +50,5 @@ ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
 COPY start-apache-tomcat.sh /
 
 # Define default command
-CMD /start-apache-tomcat.sh
+ENV TOMCATHOME=$TOMCATHOME
+CMD /start-apache-tomcat.sh -b $TOMCATHOME
index d89af17..bf48097 100644 (file)
                            }
                                }
                        if(this.app.isEnabled){
-                               if(((angular.isUndefined(this.app.myLoginsAppName) || !this.app.myLoginsAppName)||(angular.isUndefined(this.app.myLoginsAppOwner) || !this.app.myLoginsAppOwner)||(angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url)
+                               if(((angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url)
                                         ||(angular.isUndefined(this.app.username) || !this.app.username)||(angular.isUndefined(this.app.nameSpace) || !this.app.nameSpace))) {
                                 confirmBoxService.showInformation('Please fill in all required fields for centralized active application').then(isConfirmed => {});
                             return;
                                  return; 
                                         }
                                        }else if(this.app.isEnabled && !this.app.restrictedApp){
-                                   if(((angular.isUndefined(this.app.myLoginsAppName) || !this.app.myLoginsAppName)||(angular.isUndefined(this.app.myLoginsAppOwner) || !this.app.myLoginsAppOwner)||(angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url)
+                                   if(((angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url)
                                         ||(angular.isUndefined(this.app.username) || !this.app.username)||(angular.isUndefined(this.app.appPassword) || !this.app.appPassword))) {
                                    confirmBoxService.showInformation('Please fill in all required fields along with password as the app is not centralized').then(isConfirmed => {});
                                  return;