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 SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
31 SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin}
32 MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
33 INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim}
34 export ODL_ADMIN_PASSWORD ODL_ADMIN_USERNAME
39 echo "Waiting for mysql"
40 until mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql &> /dev/null
45 echo -e "\nmysql ready"
47 if [ ! -d ${INSTALLED_DIR} ]
49 mkdir -p ${INSTALLED_DIR}
52 if [ ! -f ${INSTALLED_DIR}/.installed ]
54 echo "Installing SDNC-A1 database"
55 ${SDNC_HOME}/bin/installSdncDb.sh
56 echo "Installing SDNC-A1 keyStore"
57 ${SDNC_HOME}/bin/addSdncKeyStore.sh
59 if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
61 echo "Installing directed graphs"
62 ${SDNC_HOME}/svclogic/bin/install.sh
66 cp /opt/opendaylight/current/certs/* /tmp
68 nohup python ${SDNC_BIN}/installCerts.py &
70 exec ${ODL_HOME}/bin/karaf server