From e315864f6158e03c94c81aa0dbc9a5edf5356b0d Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Sun, 17 Mar 2024 18:47:10 +0100 Subject: [PATCH] Updated the prod script --- docker-compose.prod.yml | 22 +++++++++++----------- install.sh | 29 ++++++++++++++++------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 37db996859..af888fd3cb 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -14,7 +14,7 @@ services: restart: "no" container_name: dbrepo-metadata-db hostname: metadata-db - image: docker.io/dbrepo/metadata-db:latest + image: docker.io/dbrepo/metadata-db:1.4.1 volumes: - metadata-db-data:/bitnami/mariadb - ./dist/setup-schema_local.sql:/docker-entrypoint-initdb.d/setup-schema_local.sql @@ -76,7 +76,7 @@ services: restart: "no" container_name: dbrepo-authentication-service hostname: authentication-service - image: docker.io/dbrepo/authentication-service:latest + image: docker.io/dbrepo/authentication-service:1.4.1 ports: - "8443:8443" - "8080:8080" @@ -101,7 +101,7 @@ services: restart: "no" container_name: dbrepo-metadata-service hostname: metadata-service - image: docker.io/dbrepo/metadata-service:latest + image: docker.io/dbrepo/metadata-service:1.4.1 volumes: - "${SHARED_FILESYSTEM:-/tmp}:/tmp" ports: @@ -176,7 +176,7 @@ services: restart: "no" container_name: dbrepo-analyse-service hostname: analyse-service - image: docker.io/dbrepo/analyse-service:latest + image: docker.io/dbrepo/analyse-service:1.4.1 ports: - "5000:5000" environment: @@ -220,7 +220,7 @@ services: restart: "no" container_name: dbrepo-search-db hostname: search-db - image: docker.io/dbrepo/search-db:latest + image: docker.io/dbrepo/search-db:1.4.1 ports: - "9200:9200" healthcheck: @@ -244,7 +244,7 @@ services: restart: "no" container_name: dbrepo-search-service hostname: search-service - image: docker.io/dbrepo/search-service:latest + image: docker.io/dbrepo/search-service:1.4.1 ports: - "4000:4000" environment: @@ -256,7 +256,7 @@ services: restart: "no" container_name: dbrepo-data-db-sidecar hostname: data-db-sidecar - image: docker.io/dbrepo/data-db-sidecar:latest + image: docker.io/dbrepo/data-db-sidecar:1.4.1 ports: - "3305:3305" environment: @@ -276,7 +276,7 @@ services: restart: "no" container_name: dbrepo-ui hostname: ui - image: docker.io/dbrepo/ui:latest + image: docker.io/dbrepo/ui:1.4.1 volumes: - ./dist/dbrepo.config.json:/app/dbrepo.config.json depends_on: @@ -332,7 +332,7 @@ services: restart: "no" container_name: dbrepo-search-db-init hostname: search-db-init - image: docker.io/dbrepo/search-db-init:latest + image: docker.io/dbrepo/search-db-init:1.4.1 environment: OPENSEARCH_HOST: ${SEARCH_DB_HOST:-http://search-db:9200} CURL_EXTRA_ARGS: ${SEARCH_DB_EXTRA_ARGS:-} @@ -365,7 +365,7 @@ services: restart: "no" container_name: dbrepo-storage-service-init hostname: storage-service-init - image: docker.io/dbrepo/storage-service-init:latest + image: docker.io/dbrepo/storage-service-init:1.4.1 environment: SEAWEEDFS_ENDPOINT: "${STORAGE_SEAWEEDFS_ENDPOINT:-storage-service:9333}" depends_on: @@ -404,7 +404,7 @@ services: restart: "no" container_name: dbrepo-data-service hostname: data-service - image: docker.io/dbrepo/data-service:latest + image: docker.io/dbrepo/data-service:1.4.1 ports: - "9093:9093" environment: diff --git a/install.sh b/install.sh index 8c436d2e3c..88a4af36b6 100644 --- a/install.sh +++ b/install.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# preset +VERSION="1.4.1" MIN_CPU=8 MIN_RAM=8 SKIP_CHECKS=${SKIP_CHECKS:-0} @@ -43,19 +46,19 @@ fi # environment echo "[🚀] Gathering environment ..." mkdir -p ./dist -curl -sSL -o ./docker-compose.yml https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml -curl -sSL -o ./dist/setup-schema_local.sql https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-metadata-db/setup-schema_local.sql -curl -sSL -o ./dist/rabbitmq.conf https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-broker-service/rabbitmq.conf -curl -sSL -o ./dist/enabled_plugins https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-broker-service/enabled_plugins -curl -sSL -o ./dist/cert.pem https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-broker-service/cert.pem -curl -sSL -o ./dist/pubkey.pem https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-broker-service/pubkey.pem -curl -sSL -o ./dist/definitions.json https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-broker-service/definitions.json -curl -sSL -o ./dist/dbrepo.conf https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-gateway-service/dbrepo.conf -curl -sSL -o ./dist/opensearch_dashboards.yml https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-search-db/opensearch_dashboards.yml -curl -sSL -o ./dist/dbrepo.config.json https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-ui/dbrepo.config.json -curl -sSL -o ./dist/s3_config.json https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/dbrepo-storage-service/s3_config.json +curl -sSL -o ./docker-compose.yml "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/docker-compose.prod.yml" +curl -sSL -o ./dist/setup-schema_local.sql "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-metadata-db/setup-schema_local.sql" +curl -sSL -o ./dist/rabbitmq.conf "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-broker-service/rabbitmq.conf" +curl -sSL -o ./dist/enabled_plugins "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-broker-service/enabled_plugins" +curl -sSL -o ./dist/cert.pem "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-broker-service/cert.pem" +curl -sSL -o ./dist/pubkey.pem "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-broker-service/pubkey.pem" +curl -sSL -o ./dist/definitions.json "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-broker-service/definitions.json" +curl -sSL -o ./dist/dbrepo.conf "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-gateway-service/dbrepo.conf" +curl -sSL -o ./dist/opensearch_dashboards.yml "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-search-db/opensearch_dashboards.yml" +curl -sSL -o ./dist/dbrepo.config.json "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-ui/dbrepo.config.json" +curl -sSL -o ./dist/s3_config.json "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/dbrepo-storage-service/s3_config.json" -echo "[📦] Pulling images ..." +echo "[📦] Pulling images for version ${VERSION} ..." docker compose pull MAX_MAP_COUNT=$(cat /proc/sys/vm/max_map_count) @@ -75,5 +78,5 @@ if [ $? -eq 0 ]; then echo "" echo " docker compose logs -f" echo "" - echo "Read about next steps online: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/deployment-docker-compose/#next-steps" + echo "Read about next steps online: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/${VERSION}/deployment-docker-compose/#next-steps" fi -- GitLab