From 495d5de19b326692c608848374656be638094d07 Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Mon, 27 Mar 2023 19:43:15 +0300 Subject: [PATCH] - Automatically get the status of the docker containers after 30 secs of their initialization. - Add an error-handling in "installAndRun.sh" - Update dependencies. --- build.gradle | 10 +++++----- installAndRun.sh | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index f4de997..5b43f17 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.springframework.boot' version '2.7.9' + id 'org.springframework.boot' version '2.7.10' id 'io.spring.dependency-management' version '1.1.0' id 'java' } @@ -49,7 +49,7 @@ dependencies { implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' // https://mvnrepository.com/artifact/org.apache.commons/commons-compress - implementation 'org.apache.commons:commons-compress:1.22' + implementation 'org.apache.commons:commons-compress:1.23.0' implementation 'io.minio:minio:8.5.2' @@ -77,7 +77,7 @@ dependencies { implementation('org.apache.parquet:parquet-avro:1.12.3') // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common - implementation('org.apache.hadoop:hadoop-common:3.3.4') { + implementation('org.apache.hadoop:hadoop-common:3.3.5') { exclude group: 'org.apache.parquet', module: 'parquet-avro' exclude group: 'org.apache.avro', module: 'avro' exclude group: 'org.slf4j', module: 'slf4j-api' @@ -89,11 +89,11 @@ dependencies { exclude group: 'org.codehaus.jackson', module: 'jackson-core-asl' exclude group: 'org.codehaus.jackson', module: 'jackson-mapper-asl' exclude group: 'com.fasterxml.woodstox', module: 'woodstox-core' - //exclude group: 'commons-collections', module: 'commons-collections' // This dependency is required in order for the program to run without errors. + //exclude group: 'commons-collections', module: 'commons-collections' // This dependency is required in order for the program to run without errors. It is discontinued. } // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-mapreduce-client-core - implementation('org.apache.hadoop:hadoop-mapreduce-client-core:3.3.4') { + implementation('org.apache.hadoop:hadoop-mapreduce-client-core:3.3.5') { exclude group: 'org.apache.parquet', module: 'parquet-avro' exclude group: 'org.apache.avro', module: 'avro' exclude group: 'org.slf4j', module: 'slf4j-api' diff --git a/installAndRun.sh b/installAndRun.sh index 8e70226..0e41ab8 100755 --- a/installAndRun.sh +++ b/installAndRun.sh @@ -52,8 +52,11 @@ if [[ justInstall -eq 0 ]]; then sudo docker --version || handle_error "Docker was not found!" 3 (sudo mkdir -p "$HOME"/tmp/config && sudo cp ./src/main/resources/application.yml "$HOME"/tmp/config) || true # This also replaces an existing "application.yml". sudo mkdir -p "$HOME"/logs || true - sudo docker compose up --build -d && echo "The Urls_Controller, Prometheus and Grafana docker-containers started running." + (sudo docker compose up --build -d && echo -e "The Urls_Controller, Prometheus and Grafana docker-containers started running.\nWaiting 30 seconds before getting their status.") || handle_error "Could not list docker containers!" 4 # Run in "detached mode" -d (in the background). + sleep 30 + sudo docker ps -a || handle_error "Could not get the status of docker-containers!" 5 + # Using -a to get the status of failed containers as well. fi else export PATH=/opt/gradle/gradle-${gradleVersion}/bin:$PATH # Make sure the gradle is still accessible (it usually isn't without the "export").