X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=validation.git;a=blobdiff_plain;f=docker%2Fmariadb%2Fdeploy.sh;h=fec5a2c2f7aebcf2c682690b310d52b025321733;hp=12c985c4c0a14d2393ffd2c8a79e7aaf5dd7cd74;hb=dda7dca2c875008b67a5af805912ffc8966ad343;hpb=ab9486c87090e0670d44825db7fc5d4eb900fd89 diff --git a/docker/mariadb/deploy.sh b/docker/mariadb/deploy.sh index 12c985c..fec5a2c 100755 --- a/docker/mariadb/deploy.sh +++ b/docker/mariadb/deploy.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Use this script if the persistent storage does not exist + # Directory on host in where database data will be stored HOST_STORAGE_DIR="/var/lib/mariadb" # Container name @@ -68,4 +70,4 @@ fi IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER" docker run --detach --name $CONTAINER_NAME --publish $MARIADB_HOST_PORT:3306 --volume $HOST_STORAGE_DIR:/var/lib/mysql -v "/$(pwd)/mariadb.conf:/etc/mysql/conf.d/my.cnf" -e MYSQL_ROOT_PASSWORD="$MARIADB_ROOT_PASSWORD" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e UI_AKRAINO_PASSWORD="$UI_AKRAINO_PASSWORD" $IMAGE sleep 10 -docker exec $CONTAINER_NAME /bin/bash -c 'sed -i 's/admin_password/'"$UI_ADMIN_PASSWORD"'/g' /docker-entrypoint-initdb.d/EcompSdkDMLMySql_2_4_OS.sql ; sed -i 's/akraino_password/'"$UI_AKRAINO_PASSWORD"'/g' /docker-entrypoint-initdb.d/akraino-blueprint_validation_db.sql; continue=`ps aux | grep mysql` ; while [ -z "$continue" ]; do continue=`ps aux | grep mysql`; sleep 5; done ; sleep 10 ;' +docker exec $CONTAINER_NAME /bin/bash -c 'sed -i 's/admin_password/'"$UI_ADMIN_PASSWORD"'/g' /docker-entrypoint-initdb.d/EcompSdkDMLMySql_2_4_OS.sql ; sed -i 's/akraino_password/'"$UI_AKRAINO_PASSWORD"'/g' /docker-entrypoint-initdb.d/EcompSdkDMLMySql_2_4_OS.sql; continue=`ps aux | grep mysql` ; while [ -z "$continue" ]; do continue=`ps aux | grep mysql`; sleep 5; done ; sleep 10 ;'