From 5e5877b910d3cdaf0f8d9c18b841fc5dc7ee6a27 Mon Sep 17 00:00:00 2001 From: jitendar Date: Wed, 27 Jul 2022 09:46:21 +0100 Subject: [PATCH 1/2] script for local docker logs --- cantabular-import/ldl.sh | 77 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100755 cantabular-import/ldl.sh diff --git a/cantabular-import/ldl.sh b/cantabular-import/ldl.sh new file mode 100755 index 00000000..b2cf3721 --- /dev/null +++ b/cantabular-import/ldl.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +GREEN="\e[32m" +RED="\e[31m" +YELLOW="\033[1;33m" +RESET="\e[0m" + +CONTAINERS="cantabular-import-journey_florence_1 +cantabular-import-journey_dp-import-cantabular-dimension-options_1 +cantabular-import-journey_dp-recipe-api_1 +cantabular-import-journey_dp-dataset-api_1 +cantabular-import-journey_dp-cantabular-filter-flex-api_1 +cantabular-import-journey_dp-cantabular-csv-exporter_1 +cantabular-import-journey_dp-filter-api_1 +cantabular-import-journey_dp-cantabular-xlsx-exporter_1 +cantabular-import-journey_dp-download-service_1 +cantabular-import-journey_dp-import-cantabular-dataset_1 +cantabular-import-journey_dp-cantabular-metadata-exporter_1 +cantabular-import-journey_dp-api-router_1 +cantabular-import-journey_dp-cantabular-dimension-api_1 +cantabular-import-journey_dp-frontend-filter-flex-dataset_1 +cantabular-import-journey_dp-publishing-dataset-controller_1 +cantabular-import-journey_dp-population-types-api_1 +cantabular-import-journey_dp-cantabular-api-ext_1 +cantabular-import-journey_dp-import-api_1 +" +# cantabular-import-journey_dp-frontend-dataset-controller_1 +# cantabular-import-journey_dp-cantabular-server_1 +# cantabular-import-journey_babbage_1 +# cantabular-import-journey_dp-import-api_1 +# cantabular-import-journey_mongodb_1 +# cantabular-import-journey_zookeeper-1_1 +# cantabular-import-journey_the-train_1 +# cantabular-import-journey_vault_1 +# cantabular-import-journey_kowl_1 +# cantabular-import-journey_postgres_1 +# cantabular-import-journey_dp-frontend-router_1 +# cantabular-import-journey_dp-cantabular-metadata-service_1 +# cantabular-import-journey_kafka-2_1 +# cantabular-import-journey_kafka-1_1 +# cantabular-import-journey_kafka-3_1 +# cantabular-import-journey_zebedee_1 +# cantabular-import-journey_minio_1 + +TIME=$1 +PASSED_CONTAINERS=$2 + +if [ "$1" = "--help" ] | [ -z "$TIME" ] +then + echo "" + echo "This will pull lines matching 'error' or 'DATA RACE' from docker logs for all the containers in the script" + echo "" + echo "param 1: number of min since logs to be displayed" + echo "" + echo "param 2: pass the containers is you dont want to use + default containers in the script" + exit +fi + +if [ ! -z "$PASSED_CONTAINERS" ] +then + CONTAINERS="$PASSED_CONTAINERS" +fi + + +for container in $CONTAINERS; do + + echo "===========================================================================" + echo " " + echo -e "$YELLOW logs for container : $container $RESET" + echo "" + # echo "time is:" $TIME'm' + docker logs --since=$TIME'm' $container | grep -E -B 10 -A 30 'error|DATA RACE' + +done + + From aac4210dda56b1035e8d4c5154453f99caedefbb Mon Sep 17 00:00:00 2001 From: jitendar Date: Thu, 23 Mar 2023 14:42:51 +0000 Subject: [PATCH 2/2] added feature flag as true for local runs --- cantabular-import/dp-population-types-api.yml | 2 + cantabular-import/ldl.sh | 77 ------------------- 2 files changed, 2 insertions(+), 77 deletions(-) delete mode 100755 cantabular-import/ldl.sh diff --git a/cantabular-import/dp-population-types-api.yml b/cantabular-import/dp-population-types-api.yml index b2edcb73..a2888ff8 100644 --- a/cantabular-import/dp-population-types-api.yml +++ b/cantabular-import/dp-population-types-api.yml @@ -23,3 +23,5 @@ services: ZEBEDEE_URL: "http://zebedee:8082" SERVICE_AUTH_TOKEN: $SERVICE_AUTH_TOKEN ENABLE_PRIVATE_ENDPOINTS: "true" + MONGODB_BIND_ADDR: "mongodb:27017" + CENSUS_OBSERVATIONS_FF: "true" diff --git a/cantabular-import/ldl.sh b/cantabular-import/ldl.sh deleted file mode 100755 index b2cf3721..00000000 --- a/cantabular-import/ldl.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash - -GREEN="\e[32m" -RED="\e[31m" -YELLOW="\033[1;33m" -RESET="\e[0m" - -CONTAINERS="cantabular-import-journey_florence_1 -cantabular-import-journey_dp-import-cantabular-dimension-options_1 -cantabular-import-journey_dp-recipe-api_1 -cantabular-import-journey_dp-dataset-api_1 -cantabular-import-journey_dp-cantabular-filter-flex-api_1 -cantabular-import-journey_dp-cantabular-csv-exporter_1 -cantabular-import-journey_dp-filter-api_1 -cantabular-import-journey_dp-cantabular-xlsx-exporter_1 -cantabular-import-journey_dp-download-service_1 -cantabular-import-journey_dp-import-cantabular-dataset_1 -cantabular-import-journey_dp-cantabular-metadata-exporter_1 -cantabular-import-journey_dp-api-router_1 -cantabular-import-journey_dp-cantabular-dimension-api_1 -cantabular-import-journey_dp-frontend-filter-flex-dataset_1 -cantabular-import-journey_dp-publishing-dataset-controller_1 -cantabular-import-journey_dp-population-types-api_1 -cantabular-import-journey_dp-cantabular-api-ext_1 -cantabular-import-journey_dp-import-api_1 -" -# cantabular-import-journey_dp-frontend-dataset-controller_1 -# cantabular-import-journey_dp-cantabular-server_1 -# cantabular-import-journey_babbage_1 -# cantabular-import-journey_dp-import-api_1 -# cantabular-import-journey_mongodb_1 -# cantabular-import-journey_zookeeper-1_1 -# cantabular-import-journey_the-train_1 -# cantabular-import-journey_vault_1 -# cantabular-import-journey_kowl_1 -# cantabular-import-journey_postgres_1 -# cantabular-import-journey_dp-frontend-router_1 -# cantabular-import-journey_dp-cantabular-metadata-service_1 -# cantabular-import-journey_kafka-2_1 -# cantabular-import-journey_kafka-1_1 -# cantabular-import-journey_kafka-3_1 -# cantabular-import-journey_zebedee_1 -# cantabular-import-journey_minio_1 - -TIME=$1 -PASSED_CONTAINERS=$2 - -if [ "$1" = "--help" ] | [ -z "$TIME" ] -then - echo "" - echo "This will pull lines matching 'error' or 'DATA RACE' from docker logs for all the containers in the script" - echo "" - echo "param 1: number of min since logs to be displayed" - echo "" - echo "param 2: pass the containers is you dont want to use - default containers in the script" - exit -fi - -if [ ! -z "$PASSED_CONTAINERS" ] -then - CONTAINERS="$PASSED_CONTAINERS" -fi - - -for container in $CONTAINERS; do - - echo "===========================================================================" - echo " " - echo -e "$YELLOW logs for container : $container $RESET" - echo "" - # echo "time is:" $TIME'm' - docker logs --since=$TIME'm' $container | grep -E -B 10 -A 30 'error|DATA RACE' - -done - -