pdp-d remove volume + install simplifications 78/79778/1
authorJorge Hernandez <jorge.hernandez-herrero@att.com>
Wed, 6 Mar 2019 12:28:34 +0000 (06:28 -0600)
committerJorge Hernandez <jorge.hernandez-herrero@att.com>
Wed, 6 Mar 2019 12:28:34 +0000 (06:28 -0600)
volume is unused and hides config dir when
inherited from pdp-d-cl.

small simplification in pdp-d install

Change-Id: I50d343b8d289f2f883bc31a6c650584343d8cd97
Issue-ID: POLICY-1560
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
packages/base/src/files/etc/monitor/monitor.cfg
packages/docker/src/main/docker/Dockerfile
packages/docker/src/main/docker/docker-install.sh

index 8b987a2..f838aa7 100644 (file)
@@ -1,8 +1,8 @@
 ###
 # ============LICENSE_START=======================================================
-# ONAP POLICY
+# ONAP
 # ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -25,3 +25,4 @@
 #      on: component is to be monitored and should started
 #      off: component is to be monitored and should stopped
 # There should be no component duplicate lines
+policy-management-controller=on
index 829bb6b..4d46ba0 100644 (file)
@@ -44,7 +44,7 @@ WORKDIR ${POLICY_INSTALL}
 
 COPY install-drools.zip docker-install.sh do-start.sh wait-for-port.sh ./
 
-VOLUME [ "${POLICY_INSTALL}/config", "${POLICY_HOME}/config" ]
+VOLUME [ "${POLICY_INSTALL}/config" ]
 
 RUN unzip -o install-drools.zip && \
     rm install-drools.zip && \
index f4c335b..a44f91a 100644 (file)
@@ -620,44 +620,6 @@ EOF
                                -Dfile=$RULES_JAR -DgeneratePom=true -DupdateReleaseInfo=true
                fi
        fi
-
-       update_monitor $CONTROLLER_NAME
-}
-
-
-function update_monitor() {
-       if [[ $DEBUG == y ]]; then
-               echo "-- ${FUNCNAME[0]} $@ --"
-               set -x
-       fi
-
-       local NAME lastline
-       
-       NAME=$1
-       
-       if [[ -f ${POLICY_HOME}/etc/monitor/monitor.cfg ]]; then
-               if grep -q "^${NAME}=" ${POLICY_HOME}/etc/monitor/monitor.cfg; then
-                       echo "OK: updating monitoring entry for ${NAME}"
-                       /bin/sed -i.bak \
-                               -e "s/^${NAME}=.*/${NAME}=off/g" \
-                               ${POLICY_HOME}/etc/monitor/monitor.cfg
-               else
-                       # make sure file ends with newline
-                       lastline=$(tail -n 1 ${POLICY_HOME}/etc/monitor/monitor.cfg; echo x)
-                       lastline=${lastline%x}
-                       if [ "${lastline: -1}" = $'\n' ]; then
-                               echo "OK: adding an entry for ${NAME} in ${POLICY_HOME}/etc/monitor/monitor.cfg"
-                       else
-                               echo "OK: adding an entry for ${NAME} in ${POLICY_HOME}/etc/monitor/monitor.cfg (with newline)"
-                               echo "" >> ${POLICY_HOME}/etc/monitor/monitor.cfg
-                       fi
-
-
-                       echo "${NAME}=off" >> ${POLICY_HOME}/etc/monitor/monitor.cfg
-               fi
-       else
-               echo "WARNING: ${POLICY_HOME}/etc/monitor/monitor.cfg does not exist. No monitoring enabled."   
-       fi
 }
 
 # Usage: getPomAttributes <pom-file> <attribute> ...