diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-04-11 00:08:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-11 00:08:31 +0000 |
commit | 47b9fd2fede0ba2840297fcb4dea1e5e5deaa96a (patch) | |
tree | 667eaf10989dde56017709d362968ba96145da67 /test/csit/plans/portal-sdk/testsuite/docker-compose.yml | |
parent | 5e2f9c95ba0b02aacf87235b7e967bb3691da56b (diff) | |
parent | 68e983698ea15670726d7e0b79902e3968600974 (diff) |
Merge "CSIT Portal tests"
Diffstat (limited to 'test/csit/plans/portal-sdk/testsuite/docker-compose.yml')
-rw-r--r-- | test/csit/plans/portal-sdk/testsuite/docker-compose.yml | 127 |
1 files changed, 90 insertions, 37 deletions
diff --git a/test/csit/plans/portal-sdk/testsuite/docker-compose.yml b/test/csit/plans/portal-sdk/testsuite/docker-compose.yml index 7a9fb8caa..dda74c91a 100644 --- a/test/csit/plans/portal-sdk/testsuite/docker-compose.yml +++ b/test/csit/plans/portal-sdk/testsuite/docker-compose.yml @@ -1,11 +1,12 @@ # docker-compose for ONAP portal containers: database, microservice, portal apps. -# Relies on .env file in current directory. +# Relies on .env file, which CANNOT be specified via command-line option # Works in multiple environments; does not pull from a Nexus registry. # Exposes the portal apps docker (but not DB nor WMS dockers) on the host network. # Images must be pulled from ONAP Nexus registry after logging in like this: # docker login -u USER -p PASS nexus3.onap.org:10001 +# Uses healthcheck feature added in docker-compose v2.1 -version: '2.0' +version: '2.1' services: @@ -29,11 +30,51 @@ services: volumes: # Just specify a path and let the Engine create a volume - /var/lib/mysql + # Inject the onboarding script at start time + - ./Apps_Users_OnBoarding_Script.sql:/docker-entrypoint-initdb.d/zzz_apps_users_onboarding.sql logging: driver: json-file + healthcheck: + test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ] + timeout: 10s + retries: 30 + + # Config files may use hostname "portal-cassandra" + portal-cassandra: + image: ${CDR_IMG_NAME}:${PORTAL_TAG} + environment: + - CASSUSER=root + - CASSPASS=Aa123456 + expose: + - 7000 + - 7001 + - 7199 + - 9042 + - 9160 + ports: + - 7000:7000 + - 7001:7001 + - 7199:7199 + - 9042:9042 + - 9160:9160 + volumes: + - ./portal.cql:/docker-entrypoint-initdb.d/zzz_portal.cql + - ./portalsdk.cql:/docker-entrypoint-initdb.d/zzz_portalsdk.cql + links: + - portal-db + depends_on: + portal-db: + condition: service_healthy + + # Config files may use hostname "portal-zk" + portal-zk: + image: ${ZK_IMG_NAME}:${PORTAL_TAG} + expose: + - 2181 + ports: + - 2181:2181 - # An environment variable here CAN override the database URL; - # instead the value in the config file uses hostname from above + # The app config file uses the docker name above portal-wms: image: ${WMS_IMG_NAME}:${PORTAL_TAG} expose: @@ -41,25 +82,18 @@ services: links: - portal-db depends_on: - - portal-db + portal-db: + condition: service_healthy volumes: - - ${PROPS_DIR}/ECOMPWIDGETMS/application.properties:/application.properties + - ${PROPS_DIR}/ONAPWIDGETMS/application.properties:/application.properties + - ${PROPS_DIR}/ONAPWIDGETMS/application.yml:/application.yml command: - - /wait-for.sh - - -t - - "420" - - portal-db:3306 - - -- - - /start-wms-cmd.sh + - /start-wms.sh logging: driver: json-file - # Environment variables here CANNOT override the database URL because - # two apps use identical configuration keys with different values - portal-apps: + portal-app: image: ${EP_IMG_NAME}:${PORTAL_TAG} - expose: - - 8989 ports: - 8989:8080 - 8010:8009 @@ -67,32 +101,51 @@ services: links: - portal-db - portal-wms + - portal-zk + - portal-cassandra depends_on: - - portal-db - - portal-wms + portal-db: + condition: service_healthy + portal-wms: + condition: service_started volumes: - - ${PROPS_DIR}/ECOMPPORTALAPP/system.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/conf/system.properties - - ${PROPS_DIR}/ECOMPPORTALAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties - - ${PROPS_DIR}/ECOMPPORTALAPP/portal.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/portal.properties - - ${PROPS_DIR}/ECOMPPORTALAPP/openid-connect.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties - - ${PROPS_DIR}/ECOMPPORTALAPP/logback.xml:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/logback.xml - - ${PROPS_DIR}/ECOMPSDKAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties - - ${PROPS_DIR}/ECOMPSDKAPP/system.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/conf/system.properties - - ${PROPS_DIR}/ECOMPSDKAPP/portal.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/classes/portal.properties - - ${PROPS_DIR}/ECOMPDBCAPP/system.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/conf/system.properties - - ${PROPS_DIR}/ECOMPDBCAPP/portal.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/classes/portal.properties - - ${PROPS_DIR}/ECOMPDBCAPP/dbcapp.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties - - ${PROPS_DIR}/ECOMPDBCAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties + - ${PROPS_DIR}/ONAPPORTAL/system.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/conf/system.properties + - ${PROPS_DIR}/ONAPPORTAL/fusion.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties + - ${PROPS_DIR}/ONAPPORTAL/portal.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/portal.properties + - ${PROPS_DIR}/ONAPPORTAL/music.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/music.properties + - ${PROPS_DIR}/ONAPPORTAL/openid-connect.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties + - ${PROPS_DIR}/ONAPPORTAL/logback.xml:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/logback.xml - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs command: - - /wait-for.sh - - -t - - "420" - - portal-db:3306 - - -- - - /start-apps-cmd.sh + - /start-apache-tomcat.sh # see comments in .env file + - -i - $EXTRA_HOST_IP + - -n - $EXTRA_HOST_NAME logging: driver: json-file + + portal-sdk: + image: ${SDK_IMG_NAME}:${PORTAL_TAG} + ports: + - 8990:8080 + links: + - portal-db + - portal-wms + - portal-zk + - portal-cassandra + depends_on: + portal-db: + condition: service_healthy + volumes: + - ${PROPS_DIR}/ONAPPORTALSDK/fusion.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties + - ${PROPS_DIR}/ONAPPORTALSDK/system.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/conf/system.properties + - ${PROPS_DIR}/ONAPPORTALSDK/portal.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/portal.properties + - ${PROPS_DIR}/ONAPPORTALSDK/music.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/music.properties + - ${PROPS_DIR}/ONAPPORTALSDK/logback.xml:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/logback.xml + - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs + command: + - /start-apache-tomcat.sh + logging: + driver: json-file |