diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2023-03-16 16:31:11 +0000 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2023-03-31 10:01:43 +0100 |
commit | 5980fb4d758c2ee55fad90661d039920dcc0ebe6 (patch) | |
tree | e208f346bd7b25a62c8beaa4bad3e114562f6f81 /compose/start-compose.sh | |
parent | e4ff7e58336dfb4fa6699e0a37dbbb298a129ada (diff) |
Improvements to scripts and test configuration
- reduced csit image for k8s test from 1gb to 230mb
- fixed some small hindrances with start-compose.sh
- added README for how to use and configure compose script
- cleaning of Chart.lock as it fails helm install if outdated even
after running helm dependencies update
Issue-ID: POLICY-4125
Change-Id: If1711523bb836c212f27a032a46cc18d68766478
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'compose/start-compose.sh')
-rwxr-xr-x | compose/start-compose.sh | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/compose/start-compose.sh b/compose/start-compose.sh index a77b4834..49006f11 100755 --- a/compose/start-compose.sh +++ b/compose/start-compose.sh @@ -57,9 +57,11 @@ do esac done +cd ${COMPOSE_FOLDER} + echo "Configuring docker compose..." -source "${COMPOSE_FOLDER}"/export-ports.sh > /dev/null 2>&1 -source "${COMPOSE_FOLDER}"/get-versions.sh > /dev/null 2>&1 +source export-ports.sh > /dev/null 2>&1 +source get-versions.sh > /dev/null 2>&1 # in case of csit running for PAP (groups should be for pap) but starts apex-pdp for dependencies. if [ -z "$PROJECT" ]; then @@ -67,29 +69,32 @@ if [ -z "$PROJECT" ]; then fi if [ -n "$component" ]; then - if [ "$grafana" = true ]; then + if [ "$component" == "logs" ]; then + echo "Collecting logs..." + docker-compose logs > docker-compose.log + elif [ "$grafana" = true ]; then echo "Starting ${component} application with Grafana" - docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d "${component}" grafana + docker-compose up -d "${component}" grafana echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}" echo "Grafana server: http://localhost:${GRAFANA_PORT}" elif [ "$gui" = true ]; then echo "Starting application with gui..." - docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml \ - -f "${COMPOSE_FOLDER}"/docker-compose.gui.yml up -d "${component}" policy-gui + docker-compose -f docker-compose.yml -f docker-compose.gui.yml up -d "${component}" policy-gui echo "Clamp GUI: https://localhost:2445/clamp" else echo "Starting ${component} application" - docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d "${component}" + docker-compose up -d "${component}" fi else export PROJECT=api # api has groups.json complete with all 3 pdps if [ "$gui" = true ]; then echo "Starting application with gui..." - docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml \ - -f "${COMPOSE_FOLDER}"/docker-compose.gui.yml up -d + docker-compose -f docker-compose.yml -f docker-compose.gui.yml up -d echo "Clamp GUI: https://localhost:2445/clamp" else echo "Starting all components..." - docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d + docker-compose up -d fi fi + +cd ${WORKSPACE} |