diff options
author | platania <platania@research.att.com> | 2017-02-16 11:20:22 -0500 |
---|---|---|
committer | platania <platania@research.att.com> | 2017-02-16 11:20:47 -0500 |
commit | 3426556541256f93d2cba65df3b9c8d1d1772861 (patch) | |
tree | 56e5b26481400d35e3e2e36be20df953793e348d /boot/portal_vm_init.sh | |
parent | f525cb9014ae27ddd795f933dee54a78b214a589 (diff) |
Initial OpenECOMP Demo commit
Change-Id: Ibf8696196a7ac2c84ac8aa7cde1982c9c89fb64d
Signed-off-by: platania <platania@research.att.com>
Diffstat (limited to 'boot/portal_vm_init.sh')
-rw-r--r-- | boot/portal_vm_init.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/boot/portal_vm_init.sh b/boot/portal_vm_init.sh new file mode 100644 index 00000000..744c4fc9 --- /dev/null +++ b/boot/portal_vm_init.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +docker pull $NEXUS_DOCKER_REPO/ecomp/portaldb:1610.3 +docker pull $NEXUS_DOCKER_REPO/ecomp/portalapps:1610.3 + +docker create --name data_vol_portal -v /var/lib/mysql mariadb + +docker tag 6ce6ea8c6e52 ecompdb:portal +docker tag 925a8a953d4c ep:1610-1 + +docker rm -f ecompdb_portal +docker rm -f 1610-1 + +./dbstart.sh +./new_start.sh + +sleep 60 + +if [ ! -e /opt/config/boot.txt ] +then + IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2) + mysql -u root -p'Aa123456' -h $IP_ADDRESS < users.sql + echo "yes" > /opt/config/boot.txt +fi
\ No newline at end of file |