blob: 9103bd349874ca3932e093e88a3668af678bf8e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1`
MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2`
if [ $MYSQL_ROOT_USER ] && [ $MYSQL_ROOT_PASSWORD ]; then
MYSQL_ROOT_USER=$MYSQL_ROOT_USER
MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
else
MYSQL_ROOT_USER="root"
MYSQL_ROOT_PASSWORD="root"
fi
function create_database {
cd /service/vfc/gvnfm/vnflcm/lcm/resources/bin
bash initDB.sh $MYSQL_ROOT_USER $MYSQL_ROOT_PASSWORD $MYSQL_PORT $MYSQL_IP
}
function migrate_database {
cd /service/vfc/gvnfm/vnflcm/lcm
python manage.py migrate
}
create_database
migrate_database
|