Skip to content
Snippets Groups Projects
Commit a5c5d31f authored by Martin Weise's avatar Martin Weise
Browse files

Refs #6

- Hostnames for each component added
- README cleanup
- hystrix-dashboard Dockerfile added
- fda-gateway needs a different implementatin of CORS (reports MVC not compatible with Spring Web on runtime)
- fda-analyse needs some production-grade Dockerfile, currently only dev-server
parent f41dfba5
No related branches found
No related tags found
3 merge requests!23Sprint results,!8Merge dev to master,!7Refactoring docker-compose
Showing
with 53 additions and 39 deletions
# FAIR Data Austria Services # FAIR Data Austria Services
### Build ## Build
Everything is handled by compose, just build it by running: Everything is handled by compose, just build it by running:
...@@ -8,18 +8,12 @@ Everything is handled by compose, just build it by running: ...@@ -8,18 +8,12 @@ Everything is handled by compose, just build it by running:
docker-compose build docker-compose build
``` ```
### Start ## Start
Now start all services by running: Now start all services by running:
```bash ```bash
docker-compose up fda-discovery-server fda-gateway-service fda-database-managing-service fda-container-managing-service fda-query-service fda-table-service fda-analyse-service docker-compose up
```
Optionally, start the user interface by running:
```bash
docker-compose up fda-ui
``` ```
### Troubleshooting ### Troubleshooting
...@@ -35,14 +29,26 @@ WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$Ref ...@@ -35,14 +29,26 @@ WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$Ref
Install maven from Apache Org.: Install maven from Apache Org.:
# Download maven e.g. 3.6.3 Download maven e.g. 3.6.3
```bash
wget https://www-us.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp wget https://www-us.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp
```
Untar downloaded file to /opt
# Untar downloaded file to /opt ```bash
sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt
```
# Install the alternative version for the mvn in your system Install the alternative version for the mvn in your system
```bash
sudo update-alternatives --install /usr/bin/mvn mvn /opt/apache-maven-3.6.3/bin/mvn 363 sudo update-alternatives --install /usr/bin/mvn mvn /opt/apache-maven-3.6.3/bin/mvn 363
```
Check if your configuration is ok. You may use your current or the 3.6.3 whenever you wish, running the command below.
# Check if your configuration is ok. You may use your current or the 3.6.3 whenever you wish, running the command below. ```bash
sudo update-alternatives --config mvn sudo update-alternatives --config mvn
```
...@@ -4,6 +4,7 @@ services: ...@@ -4,6 +4,7 @@ services:
fda-discovery-server: fda-discovery-server:
container_name: fda-discovery-server container_name: fda-discovery-server
hostname: fda-discovery-server
build: ./fda-discovery-server build: ./fda-discovery-server
image: fda-discovery-server image: fda-discovery-server
environment: environment:
...@@ -16,6 +17,7 @@ services: ...@@ -16,6 +17,7 @@ services:
fda-gateway-service: fda-gateway-service:
container_name: fda-gateway-service container_name: fda-gateway-service
hostname: fda-gateway-service
build: ./fda-gateway-service build: ./fda-gateway-service
image: fda-gateway-service image: fda-gateway-service
network_mode: bridge network_mode: bridge
...@@ -42,6 +44,7 @@ services: ...@@ -42,6 +44,7 @@ services:
fda-database-managing-service: fda-database-managing-service:
container_name: fda-database-managing-service container_name: fda-database-managing-service
hostname: fda-database-managing-service
build: build:
context: ./fda-database-managing-service context: ./fda-database-managing-service
image: fda-database-managing-service image: fda-database-managing-service
...@@ -63,6 +66,7 @@ services: ...@@ -63,6 +66,7 @@ services:
fda-container-managing-service: fda-container-managing-service:
container_name: fda-container-managing-service container_name: fda-container-managing-service
hostname: fda-container-managing-service
build: ./fda-container-managing-service build: ./fda-container-managing-service
image: fda-container-managing-service image: fda-container-managing-service
network_mode: bridge network_mode: bridge
...@@ -83,6 +87,7 @@ services: ...@@ -83,6 +87,7 @@ services:
fda-query-service: fda-query-service:
container_name: fda-query-service container_name: fda-query-service
hostname: fda-query-service
build: ./fda-query-service build: ./fda-query-service
image: fda-query-service image: fda-query-service
network_mode: bridge network_mode: bridge
...@@ -105,6 +110,7 @@ services: ...@@ -105,6 +110,7 @@ services:
fda-table-service: fda-table-service:
container_name: fda-table-service container_name: fda-table-service
hostname: fda-table-service
build: ./fda-table-service build: ./fda-table-service
image: fda-table-service image: fda-table-service
network_mode: bridge network_mode: bridge
...@@ -126,6 +132,7 @@ services: ...@@ -126,6 +132,7 @@ services:
fda-analyse-service: fda-analyse-service:
container_name: fda-analyse-service container_name: fda-analyse-service
hostname: fda-analyse-service
build: ./fda-analyse-service build: ./fda-analyse-service
image: analyse-service image: analyse-service
network_mode: bridge network_mode: bridge
...@@ -151,6 +158,7 @@ services: ...@@ -151,6 +158,7 @@ services:
fda-ui: fda-ui:
container_name: fda-ui container_name: fda-ui
hostname: fda-ui
build: ./fda-ui build: ./fda-ui
image: fda-ui image: fda-ui
expose: expose:
......
...@@ -22,4 +22,5 @@ COPY . . ...@@ -22,4 +22,5 @@ COPY . .
EXPOSE 5000 EXPOSE 5000
# TODO on runtime displays: "WARNING: This is a development server. Do not use it in a production deployment."
CMD ["flask", "run"] CMD ["flask", "run"]
\ No newline at end of file
...@@ -7,8 +7,6 @@ COPY ./rest-service ./rest-service ...@@ -7,8 +7,6 @@ COPY ./rest-service ./rest-service
COPY ./services ./services COPY ./services ./services
COPY ./pom.xml ./ COPY ./pom.xml ./
ENV SPRING_MAIN_BANNER-MODE=off
RUN mvn -fn -B dependency:go-offline > /dev/null RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null RUN mvn -q clean package > /dev/null
......
server.port=9091 server.port=9091
spring.application.name=fda-container-managing spring.application.name=fda-container-managing
spring.main.banner-mode=off spring.main.banner-mode=off
logging.level.=warn logging.level.root=warn
logging.level.at.=info logging.level.at.=info
logging.level.pattern.console=%d %highlight(%-5level): %msg%n
eureka.instance.hostname=fda-container-managing eureka.instance.hostname=fda-container-managing
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/ eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
eureka.instance.preferIpAddress=true eureka.instance.preferIpAddress=true
\ No newline at end of file
...@@ -8,8 +8,6 @@ COPY ./rest-service ./rest-service ...@@ -8,8 +8,6 @@ COPY ./rest-service ./rest-service
COPY ./services ./services COPY ./services ./services
COPY ./pom.xml ./ COPY ./pom.xml ./
ENV SPRING_MAIN_BANNER-MODE=off
RUN mvn -fn -B dependency:go-offline > /dev/null RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null RUN mvn -q clean package > /dev/null
......
server.port=9092 server.port=9092
spring.application.name=fda-database-managing spring.application.name=fda-database-managing
spring.main.banner-mode=off spring.main.banner-mode=off
logging.level.=warn logging.level.root=warn
logging.level.at.=info logging.level.at.=info
logging.level.pattern.console=%d %highlight(%-5level): %msg%n
eureka.instance.hostname=fda-database-managing eureka.instance.hostname=fda-database-managing
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/ eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
eureka.instance.preferIpAddress=true eureka.instance.preferIpAddress=true
\ No newline at end of file
server.port=9090 server.port=9090
spring.application.name=fda-discovery-server spring.application.name=fda-discovery-server
spring.main.banner-mode=off spring.main.banner-mode=off
logging.level.=warn logging.level.root=warn
logging.level.at.=info logging.level.at.=info
logging.level.pattern.console=%d %highlight(%-5level): %msg%n
eureka.client.register-with-eureka=false eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false eureka.client.fetch-registry=false
eureka.instance.hostname=fda-discovery-server eureka.instance.hostname=fda-discovery-server
......
server.port=9095 server.port=9095
spring.application.name=fda-gateway-service spring.application.name=fda-gateway-service
spring.main.banner-mode=off spring.main.banner-mode=off
logging.level.=warn logging.level.root=warn
logging.level.at.=info logging.level.at.=info
logging.level.pattern.console=%d %highlight(%-5level): %msg%n logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.instance.hostname=fda-gateway-service eureka.instance.hostname=fda-gateway-service
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/ eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
\ No newline at end of file
eureka.instance.preferIpAddress=true
\ No newline at end of file
...@@ -9,8 +9,6 @@ COPY ./rest-service ./rest-service ...@@ -9,8 +9,6 @@ COPY ./rest-service ./rest-service
COPY ./services ./services COPY ./services ./services
COPY ./pom.xml ./ COPY ./pom.xml ./
ENV SPRING_MAIN_BANNER-MODE=off
RUN mvn -fn -B dependency:go-offline > /dev/null RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null RUN mvn -q clean package > /dev/null
......
server.port=9093 server.port=9093
spring.application.name=fda-query-service spring.application.name=fda-query-service
spring.main.banner-mode=off spring.main.banner-mode=off
logging.level.=warn logging.level.root=warn
logging.level.at.=info logging.level.at.=info
logging.level.pattern.console=%d %highlight(%-5level): %msg%n
eureka.instance.hostname=fda-query-service eureka.instance.hostname=fda-query-service
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/ eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
eureka.instance.preferIpAddress=true
\ No newline at end of file
...@@ -8,8 +8,6 @@ COPY ./rest-service ./rest-service ...@@ -8,8 +8,6 @@ COPY ./rest-service ./rest-service
COPY ./services ./services COPY ./services ./services
COPY ./pom.xml ./ COPY ./pom.xml ./
ENV SPRING_MAIN_BANNER-MODE=off
RUN mvn -fn -B dependency:go-offline > /dev/null RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null RUN mvn -q clean package > /dev/null
......
server.port=9094 server.port=9094
spring.application.name=fda-table-service spring.application.name=fda-table-service
spring.main.banner-mode=off spring.main.banner-mode=off
logging.level.=warn logging.level.root=warn
logging.level.at.=info logging.level.at.=info
logging.level.pattern.console=%d %highlight(%-5level): %msg%n
eureka.instance.hostname=fda-table-service eureka.instance.hostname=fda-table-service
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/ eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
eureka.instance.preferIpAddress=true
spring.servlet.multipart.max-file-size=50MB spring.servlet.multipart.max-file-size=50MB
spring.servlet.multipart.max-request-size=50MB spring.servlet.multipart.max-request-size=50MB
multipart.location=${java.io.tmpdir} multipart.location=${java.io.tmpdir}
\ No newline at end of file
###### FIRST STAGE ######
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./src ./src
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null
###### SECOND STAGE ######
FROM openjdk:11-jre-slim as runtime
COPY --from=build ./rest-service/target/hystrix-dashboard-*.jar ./hystrix.jar
ENTRYPOINT ["java", "-jar", "./hystrix.jar"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment