diff options
author | subhash kumar singh <subhash.kumar.singh@huawei.com> | 2018-10-26 14:25:28 +0530 |
---|---|---|
committer | subhash kumar singh <subhash.kumar.singh@huawei.com> | 2018-10-26 14:31:11 +0530 |
commit | 5e2fe2c76cf09b68165eeec1fe055afa245736e4 (patch) | |
tree | 5f312d40db529d35257db7829b838882b54d42a7 | |
parent | 96028b74964d833bfb82322b8f5cc10d29b3da9b (diff) |
Fix CSIT for SO
Fix SO's csit to execute test cases with new dockers.
Change-Id: I00d750e10a0db7db1784b27ae6f36e69e42a4b05
Issue-ID: SO-1167
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
-rw-r--r-- | plans/so/integration-testing/docker-compose.yml | 296 | ||||
-rw-r--r-- | plans/so/integration-testing/setup.sh | 18 | ||||
-rw-r--r-- | plans/so/integration-testing/teardown.sh | 4 |
3 files changed, 304 insertions, 14 deletions
diff --git a/plans/so/integration-testing/docker-compose.yml b/plans/so/integration-testing/docker-compose.yml new file mode 100644 index 00000000..7273c4e4 --- /dev/null +++ b/plans/so/integration-testing/docker-compose.yml @@ -0,0 +1,296 @@ +version: '3' +services: +################################################################################ + mariadb: + image: ${NEXUS_DOCKER_REPO_MSO}/mariadb:10.1.11 + ports: + - "3306:3306" + volumes: + - ./test_lab/volumes/mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d + - ./test_lab/volumes/mariadb/conf.d:/etc/mysql/conf.d + environment: + - MYSQL_ROOT_PASSWORD=password + hostname: + mariadb.so.testlab.onap.org + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" +################################################################################ + catalog-db-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/catalog-db-adapter:${TAG} + ports: + - "8082:8082" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/catalog-db-adapter/onapheat:/app/config + environment: + - APP=catalog-db-adapter + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + catalog-db-adapter.so.testlab.onap.org + depends_on: + - mariadb + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - mariadb:3306 + - -- + - "/app/start-app.sh" +################################################################################ + request-db-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/request-db-adapter:${TAG} + ports: + - "8083:8083" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/request-db-adapter/onapheat:/app/config + environment: + - APP=request-db-adapter + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + request-db-adapter.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - catalog-db-adapter:8082 + - -- + - "/app/start-app.sh" +################################################################################ + sdnc-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdnc-adapter:${TAG} + ports: + - "8086:8086" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/sdnc-adapter/onapheat:/app/config + environment: + - APP=sdnc-adapter + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + sdnc-adapter.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - request-db-adapter:8083 + - -- + - "/app/start-app.sh" +################################################################################ + openstack-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/openstack-adapter:${TAG} + ports: + - "8087:8087" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/openstack-adapter/onapheat:/app/config + environment: + - APP=openstack-adapter + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + openstack-adapter.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - request-db-adapter:8083 + - -- + - "/app/start-app.sh" +################################################################################ + vfc-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/vfc-adapter:${TAG} + ports: + - "8084:8084" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/vfc-adapter/onapheat:/app/config + environment: + - APP=vfc-adapter + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + vfc-adapter.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - request-db-adapter:8083 + - -- + - "/app/start-app.sh" +################################################################################ + sdc-controller: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdc-controller:${TAG} + ports: + - "8085:8085" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/sdc-controller/onapheat:/app/config + environment: + - APP=sdc-controller + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + sdc-controller.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - request-db-adapter:8083 + - -- + - "/app/start-app.sh" +################################################################################ + bpmn-infra: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/bpmn-infra:${TAG} + ports: + - "8081:8081" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/bpmn-infra/onapheat:/app/config + environment: + - APP=bpmn-infra + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + bpmn-infra.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - request-db-adapter:8083 + - -- + - "/app/start-app.sh" +################################################################################ + api-handler-infra: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/api-handler-infra:${TAG} + ports: + - "8080:8080" + volumes: + - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ./test_lab/volumes/so/config/api-handler-infra/onapheat:/app/config + environment: + - APP=api-handler-infra + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb +# - KEYSTORE=msoClientKeyStore-onapheat.jks +# - KEYSTORE_PASSWORD=password +# - TRUSTSTORE=msoTrustStore.jks +# - TRUSTSTORE_PASSWORD=password + hostname: + api-handler-infra.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + command: + - /app/wait-for.sh + - -q + - -t + - "300" + - request-db-adapter:8083 + - -- + - "/app/start-app.sh" diff --git a/plans/so/integration-testing/setup.sh b/plans/so/integration-testing/setup.sh index 02c21f6e..4a35d0b2 100644 --- a/plans/so/integration-testing/setup.sh +++ b/plans/so/integration-testing/setup.sh @@ -17,20 +17,16 @@ # Place the scripts in run order: # Start all process required for executing test case -#start mariadb -docker run -d --name mariadb -h db.mso.testlab.openecomp.org -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -v ${WORKSPACE}/scripts/mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d -v ${WORKSPACE}/scripts/mariadb/conf.d:/etc/mysql/conf.d nexus3.onap.org:10001/mariadb +git clone http://gerrit.onap.org/r/so/docker-config.git test_lab -#start so -docker run -d --name so -h mso.mso.testlab.openecomp.org -e MYSQL_ROOT_PASSWORD=password --link=mariadb:db.mso.testlab.openecomp.org -p 8080:8080 -v ${WORKSPACE}/scripts/so/chef-config:/shared nexus3.onap.org:10001/openecomp/mso:1.1-STAGING-latest +export NEXUS_DOCKER_REPO_MSO=nexus3.onap.org:10001 +export TAG=1.3.1 +# bring the so dockers +docker-compose pull +docker-compose up -d -SO_IP=`get-instance-ip.sh so` -# Wait for initialization -for i in {1..10}; do - curl -sS ${SO_IP}:1080 && break - echo sleep $i - sleep $i -done +sleep 4m #REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' so` REPO_IP='127.0.0.1' diff --git a/plans/so/integration-testing/teardown.sh b/plans/so/integration-testing/teardown.sh index 1696c745..449cb399 100644 --- a/plans/so/integration-testing/teardown.sh +++ b/plans/so/integration-testing/teardown.sh @@ -14,6 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -kill-instance.sh mariadb -kill-instance.sh so +docker-compose down |