4 # ============LICENSE_START=======================================================
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights
9 # Modifications Copyright (C) 2020 Nordix Foundation.
10 # ================================================================================
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
15 # http://www.apache.org/licenses/LICENSE-2.0
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
22 # ============LICENSE_END=========================================================
25 # Install SDN-C platform components if not already installed and start container
27 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
28 ODL_ADMIN_USERNAME=${ODL_ADMIN_USERNAME:-admin}
29 ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
30 HTTPS_PROPS=${HTTPS_PROPS:-/opt/onap/sdnc/data/properties/https-props.properties}
31 SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
32 SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin}
33 MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
34 INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim}
35 export ODL_ADMIN_PASSWORD ODL_ADMIN_USERNAME
37 echo org.ops4j.pax.web.ssl.keystore=$(cat $HTTPS_PROPS | grep -w key-store | cut -d '=' -f2) >> /opt/opendaylight/etc/custom.properties
38 echo org.ops4j.pax.web.ssl.password=$(cat $HTTPS_PROPS | grep -w keystore-password | cut -d '=' -f2) >> /opt/opendaylight/etc/custom.properties
39 echo org.ops4j.pax.web.ssl.keypassword=$(cat $HTTPS_PROPS | grep -w key-password | cut -d '=' -f2) >> /opt/opendaylight/etc/custom.properties
44 echo "Waiting for mysql"
45 until mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql &> /dev/null
50 echo -e "\nmysql ready"
52 if [ ! -d ${INSTALLED_DIR} ]
54 mkdir -p ${INSTALLED_DIR}
57 if [ ! -f ${INSTALLED_DIR}/.installed ]
59 echo "Installing SDNC-A1 database"
60 ${SDNC_HOME}/bin/installSdncDb.sh
62 if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
64 echo "Installing directed graphs"
65 ${SDNC_HOME}/svclogic/bin/install.sh
69 nohup python ${SDNC_BIN}/healthcheck.py &
71 exec ${ODL_HOME}/bin/karaf server