aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-robot/docker/cmso-service
diff options
context:
space:
mode:
Diffstat (limited to 'cmso-robot/docker/cmso-service')
-rw-r--r--cmso-robot/docker/cmso-service/docker-compose.yml51
-rwxr-xr-xcmso-robot/docker/cmso-service/ete_test.sh25
2 files changed, 76 insertions, 0 deletions
diff --git a/cmso-robot/docker/cmso-service/docker-compose.yml b/cmso-robot/docker/cmso-service/docker-compose.yml
new file mode 100644
index 0000000..44f7c27
--- /dev/null
+++ b/cmso-robot/docker/cmso-service/docker-compose.yml
@@ -0,0 +1,51 @@
+version: '3'
+
+services:
+ mariadb:
+ image: mariadb:10.1.11
+ volumes:
+ - "/var/lib/mysql"
+ - "../mariadb/conf1:/etc/mysql/conf.d:ro"
+ environment:
+ - MYSQL_ROOT_PASSWORD=beer
+ ports:
+ - "8806:3306"
+
+ db-init:
+ image: onap/optf-cmso-dbinit
+ volumes:
+ - "../etc:/share/etc:rw"
+ - "../logs:/share/logs:rw"
+ depends_on:
+ - mariadb
+ environment:
+ - DB_HOST=mariadb
+ entrypoint: "bash -x /share/etc/startDbinitService.sh"
+
+ cmso-service:
+ image: onap/optf-cmso-service
+ volumes:
+ - "../etc:/share/etc:rw"
+ - "../logs:/share/logs:rw"
+ - "../debug-logs:/share/debug-logs:rw"
+ depends_on:
+ - db-init
+ entrypoint: "bash -x /share/etc/startJacocoService.sh"
+ ports:
+ - "8080:8080"
+ environment:
+ - DB_HOST=mariadb
+
+ cmso-robot:
+ image: onap/optf-cmso-robot
+ volumes:
+ - "../logs:/share:rw"
+ depends_on:
+ - cmso-service
+ environment:
+ - GLOBAL_SCHEDULER_URL=http://cmso-service:8080
+ - TAGS=-i ete
+ - OUTPUT=-d /share
+ working_dir: /opt/cmso-robot
+ entrypoint: "bash -x /opt/cmso-robot/ete.sh"
+
diff --git a/cmso-robot/docker/cmso-service/ete_test.sh b/cmso-robot/docker/cmso-service/ete_test.sh
new file mode 100755
index 0000000..cd77ba5
--- /dev/null
+++ b/cmso-robot/docker/cmso-service/ete_test.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+docker-compose up >up.txt 2>&1 &
+
+### Wait for robot to finish
+sleep 60
+docker exec -it cmso-service_cmso-robot_1 ls
+while [ $? -ne 1 ]; do
+ sleep 60
+ docker exec -it cmso-service_cmso-robot_1 ls
+done
+
+### Shut down java with to give time to write the jacoco_exec file
+docker exec cmso-service_cmso-service_1 pkill java
+sleep 10
+
+### wait for cmso-service container to exit
+docker exec -it cmso-service_cmso-service_1 ls
+while [ $? -ne 1 ]; do
+ sleep 60
+ docker exec -it cmso-service_cmso-service_1 ls
+done
+
+docker ps -a
+docker-compose down
+docker ps -a