aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/vvp/start_vvp_containers.sh
diff options
context:
space:
mode:
authorAlmog Laktivi <al942u@att.com>2017-11-23 14:09:16 +0200
committerAlmog Laktivi <al942u@att.com>2017-11-23 14:09:28 +0200
commit9480f8aa40e555e0194170a2271967a0cd467102 (patch)
tree26864ab56f4e9711fd78cac5097c87bb28885113 /test/csit/scripts/vvp/start_vvp_containers.sh
parent25bfc6b99f73bd02047dcc13e64390140777402a (diff)
Add VVP integration tests
Add VVP engagement manager container to integration tests (full flow) Change-Id: Iad7297f199b34f429005e8778d23c3c65b688e4d Issue-ID: VVP-31 Signed-off-by: Almog Laktivi <al942u@att.com>
Diffstat (limited to 'test/csit/scripts/vvp/start_vvp_containers.sh')
-rw-r--r--test/csit/scripts/vvp/start_vvp_containers.sh36
1 files changed, 32 insertions, 4 deletions
diff --git a/test/csit/scripts/vvp/start_vvp_containers.sh b/test/csit/scripts/vvp/start_vvp_containers.sh
index d6cb88ebf..5f905b6ad 100644
--- a/test/csit/scripts/vvp/start_vvp_containers.sh
+++ b/test/csit/scripts/vvp/start_vvp_containers.sh
@@ -29,8 +29,23 @@ export PREFIX='nexus3.onap.org:10001/openecomp/vvp'
export RELEASE='latest'
#start Engagement Manager pod:
-docker run --detach --name vvp-engagementmgr --env HOST_IP=${IP} --env ENVNAME="${ENVIRONMENT}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --env-file ${WORKSPACE}/data/environments/vvp_env --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 4g --memory-swap=4g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/engagementmgr/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/clone/engagementmgr/django/vvp/settings:/opt/configmaps/settings/ --publish 8443:8443 --publish 8000:8000 ${PREFIX}/engagementmgr:${RELEASE}
+docker run \
+--detach \
+--entrypoint="" \
+--name vvp-engagementmgr \
+--env-file ${WORKSPACE}/data/environments/vvp_env.list \
+--log-driver=json-file \
+--log-opt max-size=100m \
+--log-opt max-file=10 \
+--ulimit memlock=-1:-1 \
+--memory 4g \
+--memory-swap=4g \
+--ulimit nofile=4096:100000 \
+--volume /etc/localtime:/etc/localtime:ro \
+--volume /opt/configmaps/settings:/opt/configmaps/settings/ \
+--publish 9090:80 ${PREFIX}/engagementmgr:${RELEASE}
+docker cp /opt/configmaps/settings/uwsgi.ini vvp-engagementmgr:/srv/vvp/settings/
echo "please wait while Engagement Manager is starting..."
echo ""
@@ -43,11 +58,23 @@ while [ $c -gt 0 ]; do
done
echo -e ""
+#run migration again:
+docker exec -d vvp-engagementmgr sh -c "python3 /srv/manage.py migrate"
+
+#run initial populate db again:
+docker exec -d vvp-engagementmgr sh -c "python3 /srv/manage.py initial_populate_db"
+
+
+echo "Will copy the generated DB sqlite3 file into the application directory in 30 seconds..."
+sleep 30
+#copy the generated DB sqlite3 file into the application directory:
+docker exec -d vvp-engagementmgr sh -c "cp emdb.db /srv/emdb.db -f"
+
TIME_OUT=600
INTERVAL=5
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null http://localhost:8000/vvp/v1/engmgr/vendors); echo $response
+ response=$(curl --write-out '%{http_code}' --silent --output /dev/null http://localhost:9090/vvp/v1/engmgr/vendors); echo $response
if [ "$response" == "200" ]; then
echo VVP-Engagement-Manager well started in $TIME seconds
@@ -61,5 +88,6 @@ done
if [ "$TIME" -ge "$TIME_OUT" ]; then
echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for tests...
-
-
+else
+ echo "Done starting vvp containers!"
+fi