4 # ============LICENSE_START=======================================================
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights
9 # ================================================================================
10 # Licensed under the Apache License, Version 2.0 (the "License");
11 # you may not use this file except in compliance with the License.
12 # You may obtain a copy of the License at
14 # http://www.apache.org/licenses/LICENSE-2.0
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS,
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # See the License for the specific language governing permissions and
20 # limitations under the License.
21 # ============LICENSE_END=========================================================
25 # Install SDN-C platform components if not already installed and start container
27 ODL_HOME=${ODL_HOME:-/opt/opendaylight}
28 #ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
29 ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-admin}
30 CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
31 SLEEP_TIME=${SLEEP_TIME:-120}
32 INSTALLED_DIR=${INSTALLED_FILE:-${ODL_HOME}/current/daexim}
34 MYSQL_HOST=${MYSQL_HOST:-dbhost}
35 MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-openECOMP1.0}
40 echo -e "\nWaiting for mysql:(${MYSQL_HOST})"
41 until mysql -h ${MYSQL_HOST} -u root -p${MYSQL_ROOT_PASSWORD} mysql &> /dev/null
46 echo -e "\nmysql:(${MYSQL_HOST}) is ready."
49 if [ ! -d ${INSTALLED_DIR} ]
51 mkdir -p ${INSTALLED_DIR}
54 if [ ! -f ${INSTALLED_DIR}/.installed ]
56 echo "Installing SDN-C database"
57 ${CCSDK_HOME}/bin/installSdncDb.sh
58 # echo "Installing OpenDaylight host key"
59 # ${CCSDK_HOME}/bin/installOdlHostKey.sh
60 if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ]
62 echo "Installing directed graphs"
63 ${CCSDK_HOME}/svclogic/bin/install.sh
65 echo "Installed at `date`" > ${INSTALLED_DIR}/.installed
68 exec ${ODL_HOME}/bin/karaf server