2020-06-29 19:39:58 +02:00
|
|
|
NODE_WORKERS=( "worker0" "worker1" )
|
|
|
|
SMTP_GW="smtpgw"
|
2019-04-20 23:24:47 +02:00
|
|
|
DOCKER_LIMIT=( --pids-limit 256 --memory 512M )
|
2018-12-09 09:22:06 +01:00
|
|
|
|
2023-06-14 08:26:11 +02:00
|
|
|
export CONTAINERS=( "$NODE_GUI" "${NODE_WORKERS[@]}" "$SMTP_GW" "$SINGLE_SERVER" )
|
2020-06-29 19:39:58 +02:00
|
|
|
|
2018-12-09 09:22:06 +01:00
|
|
|
setup() {
|
|
|
|
destroy_containers
|
|
|
|
launch_containers
|
2023-06-14 09:07:04 +02:00
|
|
|
setup_piler "piler1"
|
2018-12-09 09:22:06 +01:00
|
|
|
}
|
|
|
|
|
2021-08-13 20:48:48 +02:00
|
|
|
cleanup_package() {
|
|
|
|
local pkg="$1"
|
|
|
|
|
|
|
|
log "Removing ${PACKAGE_DIR}/${pkg}"
|
|
|
|
rm -f "${PACKAGE_DIR}/${pkg}"
|
|
|
|
}
|
|
|
|
|
2018-12-09 09:22:06 +01:00
|
|
|
launch_containers() {
|
2023-07-14 11:46:12 +02:00
|
|
|
log "${FUNCNAME[0]}"
|
|
|
|
|
|
|
|
pushd "${WORKSPACE}/ci/test/docker-compose"
|
2023-06-14 07:17:58 +02:00
|
|
|
|
2023-06-14 08:37:40 +02:00
|
|
|
CONTAINERS+=( "piler1" "syslog.host" )
|
|
|
|
|
2023-06-14 07:10:25 +02:00
|
|
|
echo -e "PACKAGE=$PACKAGE\nPILER_HOST=cust1.acts.hu\nRT=$RT" > .env
|
|
|
|
|
2023-06-14 08:26:11 +02:00
|
|
|
log "running docker-compose down"
|
|
|
|
|
2023-06-14 08:08:33 +02:00
|
|
|
docker-compose down -v || true
|
|
|
|
|
2023-06-14 08:26:11 +02:00
|
|
|
log "running docker-compose up"
|
|
|
|
|
2023-06-14 07:10:25 +02:00
|
|
|
docker-compose up -d
|
2023-06-14 08:08:33 +02:00
|
|
|
|
2023-06-14 07:56:31 +02:00
|
|
|
wait_until_container_is_healthy "piler1"
|
2023-06-14 07:10:25 +02:00
|
|
|
|
|
|
|
docker-compose ps
|
2023-06-14 07:17:58 +02:00
|
|
|
|
|
|
|
popd
|
2023-06-14 07:10:25 +02:00
|
|
|
}
|
|
|
|
|
2023-06-14 09:02:34 +02:00
|
|
|
setup_piler() {
|
2018-12-09 09:22:06 +01:00
|
|
|
local container="$1"
|
|
|
|
|
2023-06-14 09:02:34 +02:00
|
|
|
pushd "${WORKSPACE}/${PROJECT_ID}/tests"
|
2018-12-09 09:22:06 +01:00
|
|
|
|
2023-06-14 09:02:34 +02:00
|
|
|
docker exec "$container" /usr/local/bin/setup-piler.sh
|
2019-07-28 11:56:40 +02:00
|
|
|
|
2023-06-14 09:02:34 +02:00
|
|
|
popd
|
2019-07-28 11:56:40 +02:00
|
|
|
}
|