Filip Krzywka | 9318578 | 2018-08-06 09:31:40 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -euo pipefail |
| 4 | |
| 5 | pip uninstall -y docker-py |
| 6 | pip install docker |
| 7 | |
| 8 | COMPOSE_VERSION=1.22.0 |
| 9 | COMPOSE_LOCATION='/usr/local/bin/docker-compose' |
| 10 | sudo curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) -o ${COMPOSE_LOCATION} |
| 11 | sudo chmod +x ${COMPOSE_LOCATION} |
| 12 | |
| 13 | |
| 14 | echo "Removing not used docker networks" |
| 15 | docker network prune -f |
| 16 | |
| 17 | export CONTAINERS_NETWORK=ves-hv-default |
| 18 | echo "Creating network for containers: ${CONTAINERS_NETWORK}" |
| 19 | docker network create ${CONTAINERS_NETWORK} |
| 20 | |
| 21 | cd ssl |
| 22 | make FILE=client |
| 23 | make FILE=server |
| 24 | make FILE=invalid_client CA=invalid_trust |
| 25 | cd .. |
| 26 | |
| 27 | export DOCKER_REGISTRY="nexus3.onap.org:10001" |
| 28 | CURRENT_DIR=${PWD##*/} |
| 29 | VES_HV_CONTAINER_NAME=ves-hv-collector |
| 30 | |
| 31 | # little race condition between container start-up and required files copying below |
| 32 | docker-compose up -d |
| 33 | |
| 34 | COMPOSE_VES_HV_CONTAINER_NAME=${CURRENT_DIR}_${VES_HV_CONTAINER_NAME}_1 |
| 35 | echo "COPY tls authorization files to container: ${COMPOSE_VES_HV_CONTAINER_NAME}" |
| 36 | docker cp ssl/. ${COMPOSE_VES_HV_CONTAINER_NAME}:/etc/ves-hv |
| 37 | # race condition end |
| 38 | |
| 39 | |
Filip Krzywka | d95a670 | 2018-08-06 10:07:03 +0200 | [diff] [blame^] | 40 | export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries" |