aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-08-30 16:40:34 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-30 16:40:34 +0000
commitc3a8defbdc6192c6a8164d2cb1d2c75ae54f7cfd (patch)
treea7b4245deefd0768debf53ea22f7fdf6091b33dd /test/csit
parentf452abb5a1cdb9ceadbdd8ae3a5f63d99e40ac15 (diff)
parent5c18c8a38ccac342eb29dbafdbb75aca78009dc8 (diff)
Merge "Added docker-compose"
Diffstat (limited to 'test/csit')
-rw-r--r--test/csit/scripts/vid/start_vid_containers.sh14
-rw-r--r--test/csit/tests/vid/resources/docker-compose.yml25
2 files changed, 27 insertions, 12 deletions
diff --git a/test/csit/scripts/vid/start_vid_containers.sh b/test/csit/scripts/vid/start_vid_containers.sh
index 341fd4813..c4bdae2de 100644
--- a/test/csit/scripts/vid/start_vid_containers.sh
+++ b/test/csit/scripts/vid/start_vid_containers.sh
@@ -20,23 +20,13 @@
# ============LICENSE_END============================================
# ===================================================================
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
echo "This is ${WORKSPACE}/test/csit/scripts/vid/start_vid_containers.sh"
-
-RELEASE=vid:latest
-CONFIG_PATH=${WORKSPACE}/data/clone/vid/lf_config
-
export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
-export PREFIX='nexus3.onap.org:10001/onap'
-
-#start Maria-DB
-docker run --name vid-mariadb -e MYSQL_DATABASE=vid_openecomp_epsdk -e MYSQL_USER=vidadmin -e MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -e MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY -v ${CONFIG_PATH}/vid-my.cnf:/etc/mysql/my.cnf -v ${CONFIG_PATH}/vid-schema.sql:/docker-entrypoint-initdb.d/vid-schema.sql -v /var/lib/mysql -d mariadb:10
-
-#start VID server
-docker run -e VID_MYSQL_DBNAME=vid_openecomp_epsdk -e VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d nexus3.onap.org:10001/onap/${RELEASE}
+cd ${WORKSPACE}/test/csit/tests/vid/resources
+docker-compose up -d --build
# WAIT 5 minutes maximum and test every 5 seconds if VID up using HealthCheck API
diff --git a/test/csit/tests/vid/resources/docker-compose.yml b/test/csit/tests/vid/resources/docker-compose.yml
new file mode 100644
index 000000000..8f6d4a7ba
--- /dev/null
+++ b/test/csit/tests/vid/resources/docker-compose.yml
@@ -0,0 +1,25 @@
+version: '3'
+services:
+ vid-server:
+ image: nexus3.onap.org:10001/onap/vid:latest
+ environment:
+ - VID_MYSQL_DBNAME=vid_openecomp_epsdk
+ - VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ ports:
+ - "8080:8080"
+ container_name: vid-server
+ links:
+ - vid-mariadb:vid-mariadb-docker-instance
+
+ vid-mariadb:
+ image: mariadb:10
+ environment:
+ - MYSQL_DATABASE=vid_openecomp_epsdk
+ - MYSQL_USER=vidadmin
+ - MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY
+ container_name: vid-mariadb
+ volumes:
+ - ${WORKSPACE}/data/clone/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf
+ - ${WORKSPACE}/data/clone/vid/lf_config/vid-schema.sql:/docker-entrypoint-initdb.d/vid-schema.sql
+ - /var/lib/mysql