diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b3f9dcbbf9d760f6d17eb23aa5edc53bfb8c7f0..dd583480a66cc2da632b6d9f382f465f428468e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ before_script: - "docker version" - "docker compose version" - "docker system prune -f" - - "bash .gitlab/set-java.sh 17" - "mvn --version" - "python3 --version" - "df / -h" diff --git a/.gitlab/set-java.sh b/.gitlab/set-java.sh deleted file mode 100755 index 453a1bde3ea781d50a52c1f7fa248c01f2d282fc..0000000000000000000000000000000000000000 --- a/.gitlab/set-java.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -if [ "$1" -eq "17" ]; then - echo 'export JAVA_HOME="/usr/lib/jvm/java-17-openjdk/"' > ~/.mavenrc -elif [ "$1" -eq "11" ]; then - echo 'export JAVA_HOME="/usr/lib/jvm/java-11-openjdk/"' > ~/.mavenrc -fi \ No newline at end of file diff --git a/dbrepo-semantics-service/rest-service/ready b/dbrepo-semantics-service/rest-service/ready new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docker-compose.dbrepo1.yml b/docker-compose.dbrepo1.yml index 626ed083c1a9e666dec5e229d2c1d6e2ff7c79c1..c05124d22c50ccd3bf13f1188aba43f895593003 100644 --- a/docker-compose.dbrepo1.yml +++ b/docker-compose.dbrepo1.yml @@ -32,7 +32,7 @@ networks: services: dbrepo-metadata-db: - restart: on-failure + restart: "no" container_name: dbrepo-metadata-db hostname: metadata-db image: dbrepo/metadata-db:1.2 @@ -48,37 +48,8 @@ services: logging: driver: json-file - dbrepo-discovery-service: - restart: on-failure - container_name: dbrepo-discovery-service - hostname: discovery-service - image: dbrepo/discovery-service:1.2 - networks: - core: - env_file: - - .env - logging: - driver: json-file - - dbrepo-gateway-service: - restart: on-failure - container_name: dbrepo-gateway-service - hostname: gateway-service - image: dbrepo/gateway-service:1.2 - networks: - core: - ports: - - "80:80" - env_file: - - .env - depends_on: - dbrepo-discovery-service: - condition: service_healthy - logging: - driver: json-file - dbrepo-database-service: - restart: on-failure + restart: "no" container_name: dbrepo-database-service hostname: database-service image: dbrepo/database-service:1.2 @@ -100,7 +71,7 @@ services: driver: json-file dbrepo-container-service: - restart: on-failure + restart: "no" container_name: dbrepo-container-service hostname: container-service image: dbrepo/container-service:1.2 @@ -117,26 +88,27 @@ services: driver: json-file dbrepo-authentication-service: - restart: on-failure + restart: "no" container_name: dbrepo-authentication-service hostname: authentication-service image: dbrepo/authentication-service:1.2 networks: core: + ports: + - "8443:8443" + - "8080:8080" env_file: - .env + volumes: + - authentication-service-data:/opt/keycloak/data/ depends_on: - dbrepo-discovery-service: - condition: service_healthy - dbrepo-broker-service: - condition: service_started dbrepo-metadata-db: condition: service_healthy logging: driver: json-file dbrepo-query-service: - restart: on-failure + restart: "no" container_name: dbrepo-query-service hostname: query-service image: dbrepo/query-service:1.2 @@ -148,6 +120,8 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: + dbrepo-broker-service: + condition: service_healthy dbrepo-table-service: condition: service_healthy dbrepo-authentication-service: @@ -174,12 +148,12 @@ services: dbrepo-search-service: condition: service_started dbrepo-broker-service: - condition: service_started + condition: service_healthy logging: driver: json-file dbrepo-identifier-service: - restart: on-failure + restart: "no" container_name: dbrepo-identifier-service hostname: identifier-service image: dbrepo/identifier-service:1.2 @@ -200,7 +174,7 @@ services: driver: json-file dbrepo-metadata-service: - restart: on-failure + restart: "no" container_name: dbrepo-metadata-service hostname: metadata-service image: dbrepo/metadata-service:1.2 @@ -209,13 +183,15 @@ services: env_file: - .env depends_on: + dbrepo-authentication-service: + condition: service_healthy dbrepo-metadata-db: - condition: service_started + condition: service_healthy logging: driver: json-file dbrepo-analyse-service: - restart: on-failure + restart: "no" container_name: dbrepo-analyse-service hostname: analyse-service image: dbrepo/analyse-service:1.2 @@ -227,14 +203,30 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock + logging: + driver: json-file + + dbrepo-user-service: + restart: "no" + container_name: dbrepo-user-service + hostname: user-service + image: dbrepo/user-service:latest + networks: + core: + ports: + - "9098:9098" + env_file: + - .env depends_on: - dbrepo-discovery-service: + dbrepo-metadata-db: + condition: service_healthy + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file dbrepo-semantics-service: - restart: on-failure + restart: "no" container_name: dbrepo-semantics-service hostname: semantics-service image: dbrepo/semantics-service:1.2 @@ -246,15 +238,15 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - dbrepo-discovery-service: - condition: service_healthy dbrepo-metadata-db: condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy logging: driver: json-file dbrepo-broker-service: - restart: on-failure + restart: "no" container_name: dbrepo-broker-service hostname: broker-service image: dbrepo/broker-service:1.2 @@ -266,34 +258,35 @@ services: env_file: - .env depends_on: - dbrepo-discovery-service: + dbrepo-authentication-service: condition: service_healthy volumes: - broker-service-data:/var/lib/rabbitmq/ logging: driver: json-file - dbrepo-search-service: + dbrepo-search-db: restart: always - container_name: dbrepo-search-service - hostname: search-service - image: dbrepo/search-service:1.2 + container_name: dbrepo-search-db + hostname: search-db + image: elasticsearch:8.7.1 networks: core: - depends_on: - dbrepo-discovery-service: - condition: service_healthy - ports: - - 9200:9200 env_file: - .env + environment: + discovery.type: "single-node" + ES_JAVA_OPTS: "-Xms2g -Xmx2g" + logger.level: "WARN" + bootstrap.memory_lock: "true" + xpack.security.enabled: "true" volumes: - search-service-data:/usr/share/elasticsearch/data logging: driver: json-file dbrepo-ui: - restart: on-failure + restart: "no" container_name: dbrepo-ui hostname: ui image: dbrepo/ui:1.2 @@ -311,3 +304,49 @@ services: condition: service_healthy logging: driver: json-file + + dbrepo-gateway-service: + restart: "no" + container_name: dbrepo-gateway-service + hostname: gateway-service + image: nginx:1.25-alpine-slim + networks: + core: + public: + ports: + - "80:80" + - "443:443" + volumes: + - /root/geant/dbrepo1.ec.tuwien.ac.at.pem:/etc/nginx/fullchain.pem:ro + - /root/geant/dbrepo1.ec.tuwien.ac.at.key:/etc/nginx/privkey.pem:ro + - /home/demo/dbrepo-tuw/proxy/dbrepo.conf:/etc/nginx/conf.d/default.conf + - /root/geant/ssl_passwords.txt:/etc/nginx/ssl_passwords.txt + depends_on: + dbrepo-analyse-service: + condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy + dbrepo-broker-service: + condition: service_healthy + dbrepo-container-service: + condition: service_healthy + dbrepo-database-service: + condition: service_healthy + dbrepo-identifier-service: + condition: service_healthy + dbrepo-metadata-service: + condition: service_healthy + dbrepo-query-service: + condition: service_healthy + dbrepo-search-service: + condition: service_started + dbrepo-semantics-service: + condition: service_healthy + dbrepo-table-service: + condition: service_healthy + dbrepo-ui: + condition: service_started + dbrepo-user-service: + condition: service_healthy + logging: + driver: json-file diff --git a/docker-compose.dbrepo2.yml b/docker-compose.dbrepo2.yml index 8395c8a79e1b99fc6c6e4ead1eb3a66312802abb..6e00815937ff6963172a6030ef7673dd01f8e0f8 100644 --- a/docker-compose.dbrepo2.yml +++ b/docker-compose.dbrepo2.yml @@ -266,10 +266,10 @@ services: logging: driver: json-file - dbrepo-search-service: + dbrepo-search-db: restart: always - container_name: dbrepo-search-service - hostname: search-service + container_name: dbrepo-search-db + hostname: search-db image: elasticsearch:8.7.1 networks: core: @@ -310,7 +310,7 @@ services: restart: "no" container_name: dbrepo-gateway-service hostname: gateway-service - image: nginx:alpine + image: nginx:1.25-alpine-slim networks: core: public: diff --git a/docker-compose.egi.yml b/docker-compose.egi.yml new file mode 100644 index 0000000000000000000000000000000000000000..ffc8ec7faf3e1d31359d0845906490d0b5e74cdd --- /dev/null +++ b/docker-compose.egi.yml @@ -0,0 +1,353 @@ +# INFO: This compose file deploys the official Docker images from a staging, tested dev branch +# MODIFIED: 2023-05-30 +# MAINTAINER: Martin Weise <martin.weise@tuwien.ac.at> + +version: "3.6" + +volumes: + metadata-db-data: + search-service-data: + broker-service-data: + authentication-service-data: + +networks: + public: + name: public + driver: bridge + ipam: + config: + - subnet: 172.29.0.0/16 + userdb: + name: userdb + driver: bridge + ipam: + config: + - subnet: 172.28.0.0/16 + core: + name: core + driver: bridge + ipam: + config: + - subnet: 172.27.0.0/16 + +services: + + dbrepo-metadata-db: + restart: "no" + container_name: dbrepo-metadata-db + hostname: metadata-db + image: dbrepo/metadata-db:latest + networks: + core: + volumes: + - metadata-db-data:/var/lib/mysql + ports: + - "3306:3306" + - "9100:9100" + env_file: + - .env + logging: + driver: json-file + + dbrepo-database-service: + restart: "no" + container_name: dbrepo-database-service + hostname: database-service + image: dbrepo/database-service:latest + networks: + userdb: + core: + env_file: + - .env + volumes: + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + dbrepo-container-service: + condition: service_healthy + dbrepo-broker-service: + condition: service_started + dbrepo-authentication-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-container-service: + restart: "no" + container_name: dbrepo-container-service + hostname: container-service + image: dbrepo/container-service:latest + networks: + core: + env_file: + - .env + volumes: + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + dbrepo-authentication-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-authentication-service: + restart: "no" + container_name: dbrepo-authentication-service + hostname: authentication-service + image: dbrepo/authentication-service:latest + networks: + core: + ports: + - "8443:8443" + - "8080:8080" + env_file: + - .env + volumes: + - authentication-service-data:/opt/keycloak/data/ + depends_on: + dbrepo-metadata-db: + condition: service_healthy + logging: + driver: json-file + + dbrepo-query-service: + restart: "no" + container_name: dbrepo-query-service + hostname: query-service + image: dbrepo/query-service:latest + networks: + core: + userdb: + env_file: + - .env + volumes: + - ${SHARED_FILESYSTEM}:/tmp + depends_on: + dbrepo-broker-service: + condition: service_healthy + dbrepo-table-service: + condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-table-service: + restart: on-failure + container_name: dbrepo-table-service + hostname: table-service + image: dbrepo/table-service:latest + networks: + core: + userdb: + env_file: + - .env + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ${SHARED_FILESYSTEM}:/tmp + depends_on: + dbrepo-authentication-service: + condition: service_healthy + dbrepo-search-service: + condition: service_started + dbrepo-broker-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-identifier-service: + restart: "no" + container_name: dbrepo-identifier-service + hostname: identifier-service + image: dbrepo/identifier-service:latest + networks: + core: + env_file: + - .env + environment: + - SPRING_PROFILES_ACTIVE=doi + depends_on: + dbrepo-query-service: + condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy + volumes: + - ${SHARED_FILESYSTEM}:/tmp + logging: + driver: json-file + + dbrepo-metadata-service: + restart: "no" + container_name: dbrepo-metadata-service + hostname: metadata-service + image: dbrepo/metadata-service:latest + networks: + core: + env_file: + - .env + depends_on: + dbrepo-authentication-service: + condition: service_healthy + dbrepo-metadata-db: + condition: service_healthy + logging: + driver: json-file + + dbrepo-analyse-service: + restart: "no" + container_name: dbrepo-analyse-service + hostname: analyse-service + image: dbrepo/analyse-service:latest + networks: + core: + userdb: + env_file: + - .env + volumes: + - ${SHARED_FILESYSTEM}:/tmp + - /var/run/docker.sock:/var/run/docker.sock + logging: + driver: json-file + + dbrepo-user-service: + restart: "no" + container_name: dbrepo-user-service + hostname: user-service + image: dbrepo/user-service:latest + networks: + core: + ports: + - "9098:9098" + env_file: + - .env + depends_on: + dbrepo-metadata-db: + condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-semantics-service: + restart: "no" + container_name: dbrepo-semantics-service + hostname: semantics-service + image: dbrepo/semantics-service:latest + networks: + core: + env_file: + - .env + volumes: + - ${SHARED_FILESYSTEM}:/tmp + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + dbrepo-metadata-db: + condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-broker-service: + restart: "no" + container_name: dbrepo-broker-service + hostname: broker-service + image: dbrepo/broker-service:latest + networks: + core: + ports: + - "5672:5672" + - "15672:15672" + env_file: + - .env + depends_on: + dbrepo-authentication-service: + condition: service_healthy + volumes: + - broker-service-data:/var/lib/rabbitmq/ + logging: + driver: json-file + + dbrepo-search-db: + restart: always + container_name: dbrepo-search-db + hostname: search-db + image: elasticsearch:8.7.1 + networks: + core: + env_file: + - .env + environment: + discovery.type: "single-node" + ES_JAVA_OPTS: "-Xms2g -Xmx2g" + logger.level: "WARN" + bootstrap.memory_lock: "true" + xpack.security.enabled: "true" + volumes: + - search-service-data:/usr/share/elasticsearch/data + logging: + driver: json-file + + dbrepo-ui: + restart: "no" + container_name: dbrepo-ui + hostname: ui + image: dbrepo/ui:latest + networks: + core: + public: + env_file: + - .env + volumes: + - ${SHARED_FILESYSTEM}:/tmp + depends_on: + dbrepo-identifier-service: + condition: service_healthy + dbrepo-database-service: + condition: service_healthy + logging: + driver: json-file + + dbrepo-gateway-service: + restart: "no" + container_name: dbrepo-gateway-service + hostname: gateway-service + image: nginx:1.25-alpine-slim + networks: + core: + public: + ports: + - "80:80" + - "443:443" + volumes: + - /etc/letsencrypt/live/dbrepo.vm.fedcloud.eu/fullchain.pem:/etc/nginx/fullchain.pem:ro + - /etc/letsencrypt/live/dbrepo.vm.fedcloud.eu/privkey.pem:/etc/nginx/privkey.pem:ro + - /home/ubuntu/dbrepo.conf:/etc/nginx/conf.d/default.conf + - /home/ubuntu/ssl_passwords.txt:/etc/nginx/ssl_passwords.txt + depends_on: + dbrepo-analyse-service: + condition: service_healthy + dbrepo-authentication-service: + condition: service_healthy + dbrepo-broker-service: + condition: service_healthy + dbrepo-container-service: + condition: service_healthy + dbrepo-database-service: + condition: service_healthy + dbrepo-identifier-service: + condition: service_healthy + dbrepo-metadata-service: + condition: service_healthy + dbrepo-query-service: + condition: service_healthy + dbrepo-search-service: + condition: service_started + dbrepo-semantics-service: + condition: service_healthy + dbrepo-table-service: + condition: service_healthy + dbrepo-ui: + condition: service_started + dbrepo-user-service: + condition: service_healthy + logging: + driver: json-file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 821612b5c1de921db6e6130994ef7bb8b38da76c..e97c7821e0cc9566235966551e9176102b49f9ea 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -263,10 +263,10 @@ services: logging: driver: json-file - dbrepo-search-service: + dbrepo-search-db: restart: always - container_name: dbrepo-search-service - hostname: search-service + container_name: dbrepo-search-db + hostname: search-db image: elasticsearch:8.7.1 networks: core: diff --git a/docker-compose.yml b/docker-compose.yml index d921ef70ef3826540d2ab87199b3b52452a5dc1d..2ff410efc7f15f8438fe9b4c376331bc3363540e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ version: "3.6" volumes: metadata-db-data: - search-service-data: + search-db-data: broker-service-data: authentication-service-data: @@ -160,7 +160,7 @@ services: depends_on: dbrepo-authentication-service: condition: service_healthy - dbrepo-search-service: + dbrepo-search-db: condition: service_started dbrepo-broker-service: condition: service_healthy @@ -292,10 +292,10 @@ services: logging: driver: json-file - dbrepo-search-service: + dbrepo-search-db: restart: always - container_name: dbrepo-search-service - hostname: search-service + container_name: dbrepo-search-db + hostname: search-db image: elasticsearch:8.7.1 networks: core: @@ -311,7 +311,7 @@ services: xpack.security.enabled: "true" ELASTIC_PASSWORD: "elastic" volumes: - - search-service-data:/usr/share/elasticsearch/data + - search-db-data:/usr/share/elasticsearch/data logging: driver: json-file @@ -366,7 +366,7 @@ services: condition: service_healthy dbrepo-query-service: condition: service_healthy - dbrepo-search-service: + dbrepo-search-db: condition: service_started dbrepo-semantics-service: condition: service_healthy