From 6298790b8901165e2ffdc1db4fdf15205014c41b Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 1 Jun 2023 09:07:11 +0200
Subject: [PATCH] Hotfix search service name

---
 .gitignore                                       |   2 +-
 .gitlab-ci.yml                                   |  10 +++++-----
 .junit/hosts                                     |   2 +-
 Makefile                                         |   4 ++--
 .../src/main/resources/application.yml           |   2 +-
 .../src/main/resources/application.yml           |   2 +-
 .../src/main/resources/application.yml           |   2 +-
 .../src/main/java/at/tuwien/test/BaseTest.java   |   4 ++--
 .../src/main/resources/application.yml           |   2 +-
 .../src/test/resources/application.properties    |   4 ++--
 .../src/main/resources/application.yml           |   2 +-
 .../src/main/resources/application.yml           |   2 +-
 dbrepo-ui/Dockerfile                             |   2 +-
 dbrepo-ui/static/covfefe.gif                     | Bin 0 -> 1722 bytes
 .../src/main/resources/application.yml           |   2 +-
 .../src/test/resources/application.properties    |   2 +-
 docker-compose.dbrepo1.yml                       |   8 ++++----
 docker-compose.dbrepo2.yml                       |   8 ++++----
 docker-compose.egi.yml                           |   8 ++++----
 docker-compose.prod.yml                          |   8 ++++----
 20 files changed, 38 insertions(+), 38 deletions(-)
 create mode 100644 dbrepo-ui/static/covfefe.gif

diff --git a/.gitignore b/.gitignore
index 35baef2b4c..db94d9e162 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,7 +21,7 @@ fda-identifier-service/
 fda-metadata-db/
 fda-metadata-service/
 fda-query-service/
-fda-search-service/
+fda-search-db/
 fda-semantics-service/
 fda-table-service/
 fda-ui/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd583480a6..e5d50a84d5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -511,7 +511,7 @@ scan-query-service:
     reports:
       container_scanning: ./.trivy/trivy-query-service-report.json
 
-scan-search-service:
+scan-search-db:
   stage: scan-docker
   needs:
     - build-docker
@@ -521,7 +521,7 @@ scan-search-service:
       - master
   allow_failure: true
   script:
-    - make scan-search-service
+    - make scan-search-db
   cache:
     paths:
       - .trivycache/
@@ -529,7 +529,7 @@ scan-search-service:
     when: always
     expire_in: 1 days
     reports:
-      container_scanning: ./.trivy/trivy-search-service-report.json
+      container_scanning: ./.trivy/trivy-search-db-report.json
 
 scan-semantics-service:
   stage: scan-docker
@@ -625,7 +625,7 @@ release-latest:
     - scan-metadata-service
     - scan-proxy
     - scan-query-service
-    - scan-search-service
+    - scan-search-db
     - scan-semantics-service
     - scan-table-service
     - scan-ui
@@ -652,7 +652,7 @@ release-version:
     - scan-metadata-service
     - scan-proxy
     - scan-query-service
-    - scan-search-service
+    - scan-search-db
     - scan-semantics-service
     - scan-table-service
     - scan-ui
diff --git a/.junit/hosts b/.junit/hosts
index 701ef56fa3..16352ce832 100644
--- a/.junit/hosts
+++ b/.junit/hosts
@@ -7,4 +7,4 @@
 172.30.0.7	dbrepo-userdb-u03
 172.30.0.8	dbrepo-userdb-u04
 172.31.0.2	dbrepo-broker-service
-172.31.0.3	dbrepo-search-service
\ No newline at end of file
+172.31.0.3	dbrepo-search-db
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 0524177418..ed8f632caa 100644
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,7 @@ tag-broker:
 	docker tag dbrepo-broker-service:latest "dbrepo/broker-service:${TAG}"
 
 tag-search:
-	docker tag dbrepo-search-service:latest "dbrepo/search-service:${TAG}"
+	docker tag dbrepo-search-db:latest "dbrepo/search-db:${TAG}"
 
 release: build-docker tag release-identifier release-container release-database release-query release-table release-analyse release-authentication release-metadata-db release-ui release-semantics release-broker release-metadata release-user
 
@@ -221,7 +221,7 @@ scan-query-service:
 
 scan-search-db:
 	docker pull "elasticsearch:${ELASTIC_VERSION}"
-	trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-service-report.json "elasticsearch:${ELASTIC_VERSION}"
+	trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-db-report.json "elasticsearch:${ELASTIC_VERSION}"
 	trivy image --insecure --exit-code 0 "elasticsearch:${ELASTIC_VERSION}"
 	trivy image --insecure --exit-code 1 --severity CRITICAL "elasticsearch:${ELASTIC_VERSION}"
 
diff --git a/dbrepo-container-service/rest-service/src/main/resources/application.yml b/dbrepo-container-service/rest-service/src/main/resources/application.yml
index 514c45bb32..70619e94b9 100644
--- a/dbrepo-container-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-container-service/rest-service/src/main/resources/application.yml
@@ -30,7 +30,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: "${ELASTIC_USERNAME}"
-    uris: http://search-service:9200
+    uris: http://search-db:9200
 management.endpoints.web.exposure.include: health,info,prometheus
 springdoc.swagger-ui.enabled: true
 server:
diff --git a/dbrepo-database-service/rest-service/src/main/resources/application.yml b/dbrepo-database-service/rest-service/src/main/resources/application.yml
index 3c555dd20b..ba7ad2434e 100644
--- a/dbrepo-database-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-database-service/rest-service/src/main/resources/application.yml
@@ -30,7 +30,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: "${ELASTIC_USERNAME}"
-    uris: http://search-service:9200
+    uris: http://search-db:9200
 management.endpoints.web.exposure.include: health,info,prometheus
 server:
   port: 9092
diff --git a/dbrepo-identifier-service/rest-service/src/main/resources/application.yml b/dbrepo-identifier-service/rest-service/src/main/resources/application.yml
index 1782b03e65..0ec8f69c7b 100644
--- a/dbrepo-identifier-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-identifier-service/rest-service/src/main/resources/application.yml
@@ -30,7 +30,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: elastic
-    uris: http://search-service:9200
+    uris: http://search-db:9200
 management.endpoints.web.exposure.include: health,info,prometheus
 server:
   port: 9096
diff --git a/dbrepo-metadata-db/test/src/main/java/at/tuwien/test/BaseTest.java b/dbrepo-metadata-db/test/src/main/java/at/tuwien/test/BaseTest.java
index 363c82a0e1..22e0c0c39a 100644
--- a/dbrepo-metadata-db/test/src/main/java/at/tuwien/test/BaseTest.java
+++ b/dbrepo-metadata-db/test/src/main/java/at/tuwien/test/BaseTest.java
@@ -1112,8 +1112,8 @@ public abstract class BaseTest {
             .build();
 
     public final static Long CONTAINER_ELASTIC_ID = 6L;
-    public final static String CONTAINER_ELASTIC_NAME = "dbrepo-search-service";
-    public final static String CONTAINER_ELASTIC_INTERNAL_NAME = "dbrepo-search-service";
+    public final static String CONTAINER_ELASTIC_NAME = "dbrepo-search-db";
+    public final static String CONTAINER_ELASTIC_INTERNAL_NAME = "dbrepo-search-db";
     public final static String CONTAINER_ELASTIC_IP = "172.31.0.3";
     public final static String CONTAINER_ELASTIC_HASH = "deadbeef";
     public final static Instant CONTAINER_ELASTIC_CREATED = Instant.ofEpochSecond(1677399721) /* 2023-02-26 08:22:01 (UTC) */;
diff --git a/dbrepo-query-service/rest-service/src/main/resources/application.yml b/dbrepo-query-service/rest-service/src/main/resources/application.yml
index 2dafd0f281..db37d874ec 100644
--- a/dbrepo-query-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-query-service/rest-service/src/main/resources/application.yml
@@ -28,7 +28,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: elastic
-    uris: http://search-service:9200
+    uris: http://search-db:9200
   cloud:
     loadbalancer.ribbon.enabled: false
 management.endpoints.web.exposure.include: health,info,prometheus
diff --git a/dbrepo-query-service/rest-service/src/test/resources/application.properties b/dbrepo-query-service/rest-service/src/test/resources/application.properties
index c64e6962f9..c030a10c37 100644
--- a/dbrepo-query-service/rest-service/src/test/resources/application.properties
+++ b/dbrepo-query-service/rest-service/src/test/resources/application.properties
@@ -23,7 +23,7 @@ logging.level.root=error
 logging.level.at.tuwien.=trace
 
 # elastic
-spring.elasticsearch.uris=dbrepo-search-service:9200
+spring.elasticsearch.uris=dbrepo-search-db:9200
 
 # broker service
 spring.rabbitmq.host=dbrepo-broker-service
@@ -34,4 +34,4 @@ spring.rabbitmq.password=guest
 # search service
 fda.consumers=2
 fda.gateway.endpoint: http://localhost:15672
-fda.elastic.endpoint=dbrepo-search-service:9200
\ No newline at end of file
+fda.elastic.endpoint=dbrepo-search-db:9200
\ No newline at end of file
diff --git a/dbrepo-semantics-service/rest-service/src/main/resources/application.yml b/dbrepo-semantics-service/rest-service/src/main/resources/application.yml
index a26264fb3d..7e35d82129 100644
--- a/dbrepo-semantics-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-semantics-service/rest-service/src/main/resources/application.yml
@@ -28,7 +28,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: elastic
-    uris: http://search-service:9200
+    uris: http://search-db:9200
   cloud:
     loadbalancer.ribbon.enabled: false
 management.endpoints.web.exposure.include: health,info,prometheus
diff --git a/dbrepo-table-service/rest-service/src/main/resources/application.yml b/dbrepo-table-service/rest-service/src/main/resources/application.yml
index 3cf83d1507..ac70fe699a 100644
--- a/dbrepo-table-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-table-service/rest-service/src/main/resources/application.yml
@@ -28,7 +28,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: elastic
-    uris: http://search-service:9200
+    uris: http://search-db:9200
   cloud:
     loadbalancer.ribbon.enabled: false
 management.endpoints.web.exposure.include: health,info,prometheus
diff --git a/dbrepo-ui/Dockerfile b/dbrepo-ui/Dockerfile
index c286e5a6db..ecc3d12c3a 100644
--- a/dbrepo-ui/Dockerfile
+++ b/dbrepo-ui/Dockerfile
@@ -47,7 +47,7 @@ EXPOSE 9100
 ENV BROKER_USERNAME="fda"
 ENV BROKER_PASSWORD="fda"
 ENV SANDBOX=false
-ENV SEARCH="http://search-service:9200"
+ENV SEARCH="http://search-db:9200"
 ENV SHARED_FILESYSTEM="/tmp"
 ENV LOGO="/logo.png"
 ENV ELASTIC_USERNAME="elastic"
diff --git a/dbrepo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5?&Efx2F0J!
zqzY!w(W}_tU@ax3zb(y7=lP-5S&_Min4+z(AC^0Pd&O?9-X4t*k2ZI`&Ywb4iUR&{
zUDexn@8hjaPKD22NrkKmJE>j7llFR9`v<1<&B^IjN1pZtPh;P7yrWg~(M6BhTa279
zzD+IM-<|a5%2h*m?kSPay?oM~L*ltj=hkN)kIT4Z^~)q&wAg2b@Bdr9FYoZoY+3Vs
z*CIcSCD#+*Kly%^wYaR}_zSkWb&v0vzS~jM8XdLnF?(p8#<dC4=T<y;p!8#X@|?>)
z%i9Dp`R*NKUm9D!v@1^b*B0maZCcZO--oYv^?kf=(F<+9EHy8cpC`XNuUdbt^yB(|
oQ}NfbjB`c5l<_Ty55KZK<?EghvzLFrKWNwg_v4AQhya5%0RO|wH2?qr

literal 0
HcmV?d00001

diff --git a/dbrepo-user-service/rest-service/src/main/resources/application.yml b/dbrepo-user-service/rest-service/src/main/resources/application.yml
index 3ff5be6c90..58ca1c7f57 100644
--- a/dbrepo-user-service/rest-service/src/main/resources/application.yml
+++ b/dbrepo-user-service/rest-service/src/main/resources/application.yml
@@ -28,7 +28,7 @@ spring:
   elasticsearch:
     password: "${ELASTIC_PASSWORD}"
     username: elastic
-    uris: http://search-service:9200
+    uris: http://search-db:9200
   cloud:
     loadbalancer.ribbon.enabled: false
 management.endpoints.web.exposure.include: health,info,prometheus
diff --git a/dbrepo-user-service/rest-service/src/test/resources/application.properties b/dbrepo-user-service/rest-service/src/test/resources/application.properties
index d2ef7c7093..0400abd1af 100644
--- a/dbrepo-user-service/rest-service/src/test/resources/application.properties
+++ b/dbrepo-user-service/rest-service/src/test/resources/application.properties
@@ -27,4 +27,4 @@ logging.level.org.hibernate.type=trace
 # search service
 fda.consumers=2
 fda.gateway.endpoint: http://localhost:15672
-fda.elastic.endpoint=dbrepo-search-service:9200
\ No newline at end of file
+fda.elastic.endpoint=dbrepo-search-db:9200
\ No newline at end of file
diff --git a/docker-compose.dbrepo1.yml b/docker-compose.dbrepo1.yml
index 71b612f3fe..529f45401b 100644
--- a/docker-compose.dbrepo1.yml
+++ b/docker-compose.dbrepo1.yml
@@ -6,7 +6,7 @@ version: "3.6"
 
 volumes:
   metadata-db-data:
-  search-service-data:
+  search-db-data:
   broker-service-data:
 
 networks:
@@ -145,7 +145,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
@@ -281,7 +281,7 @@ services:
       bootstrap.memory_lock: "true"
       xpack.security.enabled: "true"
     volumes:
-      - search-service-data:/usr/share/elasticsearch/data
+      - search-db-data:/usr/share/elasticsearch/data
     logging:
       driver: json-file
 
@@ -338,7 +338,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
diff --git a/docker-compose.dbrepo2.yml b/docker-compose.dbrepo2.yml
index ce16a340b7..cfcda2454d 100644
--- a/docker-compose.dbrepo2.yml
+++ b/docker-compose.dbrepo2.yml
@@ -6,7 +6,7 @@ version: "3.6"
 
 volumes:
   metadata-db-data:
-  search-service-data:
+  search-db-data:
   broker-service-data:
   authentication-service-data:
 
@@ -146,7 +146,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
@@ -282,7 +282,7 @@ services:
       bootstrap.memory_lock: "true"
       xpack.security.enabled: "true"
     volumes:
-      - search-service-data:/usr/share/elasticsearch/data
+      - search-db-data:/usr/share/elasticsearch/data
     logging:
       driver: json-file
 
@@ -339,7 +339,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
diff --git a/docker-compose.egi.yml b/docker-compose.egi.yml
index 030422783c..6447daecf7 100644
--- a/docker-compose.egi.yml
+++ b/docker-compose.egi.yml
@@ -6,7 +6,7 @@ version: "3.6"
 
 volumes:
   metadata-db-data:
-  search-service-data:
+  search-db-data:
   broker-service-data:
   authentication-service-data:
 
@@ -146,7 +146,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
@@ -282,7 +282,7 @@ services:
       bootstrap.memory_lock: "true"
       xpack.security.enabled: "true"
     volumes:
-      - search-service-data:/usr/share/elasticsearch/data
+      - search-db-data:/usr/share/elasticsearch/data
     logging:
       driver: json-file
 
@@ -339,7 +339,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
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index 090f5d1f33..5b6939c0ed 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -6,7 +6,7 @@ version: "3.6"
 
 volumes:
   metadata-db-data:
-  search-service-data:
+  search-db-data:
   broker-service-data:
   authentication-service-data:
 
@@ -146,7 +146,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
@@ -279,7 +279,7 @@ services:
       bootstrap.memory_lock: "true"
       xpack.security.enabled: "true"
     volumes:
-      - search-service-data:/usr/share/elasticsearch/data
+      - search-db-data:/usr/share/elasticsearch/data
     logging:
       driver: json-file
 
@@ -335,7 +335,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
-- 
GitLab