Merge "[Tree-wide] Remove pnda charts from OOM"
[oom.git] / kubernetes / sdnc / resources / config / bin / startODL.sh
index 5f5f811..1f00439 100755 (executable)
@@ -1,9 +1,11 @@
 #!/bin/bash
+{{/*
 
 ###
 # ============LICENSE_START=======================================================
 # SDNC
 # ================================================================================
+# Copyright © 2020 Samsung Electronics
 # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,6 +25,7 @@
 # Append features to karaf boot feature configuration
 # $1 additional feature to be added
 # $2 repositories to be added (optional)
+*/}}
 function addToFeatureBoot() {
   CFG=$ODL_HOME/etc/org.apache.karaf.features.cfg
   ORIG=$CFG.orig
@@ -65,7 +68,7 @@ function enable_odl_cluster(){
   addToFeatureBoot odl-jolokia
   #${ODL_HOME}/bin/client feature:install odl-mdsal-clustering
   #${ODL_HOME}/bin/client feature:install odl-jolokia
-  
+
 
   echo "Update cluster information statically"
   hm=$(hostname)
@@ -113,8 +116,8 @@ function enable_odl_cluster(){
 # Install SDN-C platform components if not already installed and start container
 
 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
-ODL_ADMIN_USERNAME=${ODL_ADMIN_USERNAME:-admin}
-ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+ODL_ADMIN_USERNAME=${ODL_ADMIN_USERNAME}
+ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD}
 SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
 SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin}
 CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
@@ -133,17 +136,17 @@ echo "  AAF_ENABLED=$SDNC_AAF_ENABLED"
 
 
 if $SDNC_AAF_ENABLED; then
-       export SDNC_STORE_DIR=/opt/app/osaaf/local
-       export SDNC_CONFIG_DIR=/opt/app/osaaf/local
+       export SDNC_AAF_STORE_DIR=/opt/app/osaaf/local
+       export SDNC_AAF_CONFIG_DIR=/opt/app/osaaf/local
        export SDNC_KEYPASS=`cat /opt/app/osaaf/local/.pass`
        export SDNC_KEYSTORE=org.onap.sdnc.p12
        sed -i '/cadi_prop_files/d' $ODL_HOME/etc/system.properties
-       echo "cadi_prop_files=$SDNC_CONFIG_DIR/org.onap.sdnc.props" >> $ODL_HOME/etc/system.properties
+       echo "cadi_prop_files=$SDNC_AAF_CONFIG_DIR/org.onap.sdnc.props" >> $ODL_HOME/etc/system.properties
 
        sed -i '/org.ops4j.pax.web.ssl.keystore/d' $ODL_HOME/etc/custom.properties
        sed -i '/org.ops4j.pax.web.ssl.password/d' $ODL_HOME/etc/custom.properties
        sed -i '/org.ops4j.pax.web.ssl.keypassword/d' $ODL_HOME/etc/custom.properties
-       echo org.ops4j.pax.web.ssl.keystore=$SDNC_STORE_DIR/$SDNC_KEYSTORE >> $ODL_HOME/etc/custom.properties
+       echo org.ops4j.pax.web.ssl.keystore=$SDNC_AAF_STORE_DIR/$SDNC_KEYSTORE >> $ODL_HOME/etc/custom.properties
        echo org.ops4j.pax.web.ssl.password=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties
        echo org.ops4j.pax.web.ssl.keypassword=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties
 fi
@@ -161,9 +164,9 @@ then
 fi
 
 cp /opt/opendaylight/current/certs/* /tmp
+cp /var/custom-certs/* /tmp
 
 nohup python ${SDNC_BIN}/installCerts.py &
 
 
 exec ${ODL_HOME}/bin/karaf server
-