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