Commit 64ea4e95 authored by Guillaume Cornut's avatar Guillaume Cornut
Browse files

chore: Remove ES cluster name config. Change server ports config.

parent d0795e3a
...@@ -36,9 +36,7 @@ test: ...@@ -36,9 +36,7 @@ test:
# so there will be no bootstrap checks that would fail on CI # so there will be no bootstrap checks that would fail on CI
# especially the error regarding # especially the error regarding
# `max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]` # `max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]`
# cluster.name=es-rare command: ["bin/elasticsearch", "-Ediscovery.type=single-node"]
# the cluster name used in tests
command: ["bin/elasticsearch", "-Ediscovery.type=single-node", "-Ecluster.name=es-data-discovery"]
script: ./gradlew --parallel test script: ./gradlew --parallel test
cache: cache:
key: "$CI_COMMIT_REF_NAME" key: "$CI_COMMIT_REF_NAME"
......
...@@ -11,8 +11,7 @@ You need to install: ...@@ -11,8 +11,7 @@ You need to install:
- a recent enough JDK8 - a recent enough JDK8
The application expects to connect on an ElasticSearch instance running on `http://127.0.0.1:9300`, The application expects to connect on an ElasticSearch instance running on `http://127.0.0.1:9300`.
in a cluster named `es-data-discovery`.
To have such an instance, simply run: To have such an instance, simply run:
docker-compose up docker-compose up
...@@ -59,7 +58,7 @@ This will build a standalone jar at `backend/build/libs/rare.jar` or `backend/b ...@@ -59,7 +58,7 @@ This will build a standalone jar at `backend/build/libs/rare.jar` or `backend/b
And the full app run on: And the full app run on:
- http://localhost:8080/rare-dev - http://localhost:8080/rare-dev
- http://localhost:8090/wheatis-dev - http://localhost:8180/wheatis-dev
## CI ## CI
...@@ -422,7 +421,7 @@ This readme will be useful : ...@@ -422,7 +421,7 @@ This readme will be useful :
resource-dir: /tmp/gnpis-dev/resources resource-dir: /tmp/gnpis-dev/resources
server: server:
port: 8070 port: 8280
servlet: servlet:
context-path: /gnpis-dev context-path: /gnpis-dev
...@@ -480,7 +479,7 @@ And edit them as desired. ...@@ -480,7 +479,7 @@ And edit them as desired.
"/gnpis-dev/api", "/gnpis-dev/api",
"/gnpis-dev/actuator" "/gnpis-dev/actuator"
], ],
target: "http://localhost:8070", target: "http://localhost:8280",
secure: false secure: false
} }
...@@ -498,7 +497,7 @@ And edit them as desired. ...@@ -498,7 +497,7 @@ And edit them as desired.
# delegates to parameterized script # delegates to parameterized script
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
sh $BASEDIR/harvestCI.sh localhost 8070 gnpis dev sh $BASEDIR/harvestCI.sh localhost 8280 gnpis dev
##### Testing ##### Testing
...@@ -525,7 +524,7 @@ In our case, after launching the test, we kept getting `Permission denied` error ...@@ -525,7 +524,7 @@ In our case, after launching the test, we kept getting `Permission denied` error
./scripts/createIndexAndAliases.sh ./scripts/createIndexAndAliases.sh
./scripts/harvestGnpis.sh ./scripts/harvestGnpis.sh
5. App is running at : http://localhost:8070/gnpis-dev/ 5. App is running at : http://localhost:8280/gnpis-dev/
Check out the [main readme](https://forgemia.inra.fr/urgi-is/data-discovery/blob/master/README.md) for more details. Check out the [main readme](https://forgemia.inra.fr/urgi-is/data-discovery/blob/master/README.md) for more details.
...@@ -576,11 +575,7 @@ Check out the [main readme](https://forgemia.inra.fr/urgi-is/data-discovery/blob ...@@ -576,11 +575,7 @@ Check out the [main readme](https://forgemia.inra.fr/urgi-is/data-discovery/blob
└── scripts > [C] harvestGnpis.sh └── scripts > [C] harvestGnpis.sh
``` ```
##### Example of the ports used according to the applications and the environment: #### Deployment environments
| | RARe | WheatIS | GnpIS | Checkout the [README.md](https://forgemia.inra.fr/urgi-is/data-discovery-config/blob/master/README.md) file for the
|:-------:|:----:|:-------:|:------:| full list of deployment environments for the `data-discovery` webapp (server ports & context paths).
| dev | 8080 | 8090 | 8070 |
| beta | 8081 | 8091 | 8071 |
| staging | 8082 | 8092 | 8072 |
| prod | 8083 | 8093 | 8073 |
\ No newline at end of file
...@@ -20,9 +20,6 @@ import java.net.UnknownHostException; ...@@ -20,9 +20,6 @@ import java.net.UnknownHostException;
@EnableElasticsearchRepositories(basePackageClasses = DocumentDao.class) @EnableElasticsearchRepositories(basePackageClasses = DocumentDao.class)
public class ElasticSearchConfig { public class ElasticSearchConfig {
@Value("${spring.data.elasticsearch.cluster.name}")
private String esClusterName;
@Value("${spring.data.elasticsearch.host}") @Value("${spring.data.elasticsearch.host}")
private String esHost; private String esHost;
......
...@@ -6,8 +6,6 @@ spring: ...@@ -6,8 +6,6 @@ spring:
data: data:
elasticsearch: elasticsearch:
cluster:
name: es-data-discovery
host: 127.0.0.1 host: 127.0.0.1
port: 9200 port: 9200
...@@ -65,7 +63,7 @@ data-discovery: ...@@ -65,7 +63,7 @@ data-discovery:
resource-dir: /tmp/wheatis-dev/resources resource-dir: /tmp/wheatis-dev/resources
server: server:
port: 8090 port: 8180
servlet: servlet:
context-path: /wheatis-dev context-path: /wheatis-dev
...@@ -82,6 +80,6 @@ data-discovery: ...@@ -82,6 +80,6 @@ data-discovery:
resource-dir: /tmp/gnpis-dev/resources resource-dir: /tmp/gnpis-dev/resources
server: server:
port: 8070 port: 8280
servlet: servlet:
context-path: /gnpis-dev context-path: /gnpis-dev
\ No newline at end of file
spring.data.elasticsearch.cluster.name=es-data-discovery
spring.data.elasticsearch.host=localhost spring.data.elasticsearch.host=localhost
spring.data.elasticsearch.port=9200 spring.data.elasticsearch.port=9200
......
spring.data.elasticsearch.cluster.name=es-data-discovery
spring.data.elasticsearch.host=localhost spring.data.elasticsearch.host=localhost
spring.data.elasticsearch.port=9200 spring.data.elasticsearch.port=9200
......
...@@ -4,7 +4,6 @@ services: ...@@ -4,7 +4,6 @@ services:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4 image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
container_name: elasticsearch container_name: elasticsearch
environment: environment:
- cluster.name=es-data-discovery
- discovery.type=single-node - discovery.type=single-node
- bootstrap.memory_lock=true - bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g -XX:ParallelGCThreads=2" - "ES_JAVA_OPTS=-Xms2g -Xmx2g -XX:ParallelGCThreads=2"
......
...@@ -12,7 +12,7 @@ const PROXY_CONFIG = [ ...@@ -12,7 +12,7 @@ const PROXY_CONFIG = [
"/wheatis-dev/api", "/wheatis-dev/api",
"/wheatis-dev/actuator" "/wheatis-dev/actuator"
], ],
target: "http://localhost:8090", target: "http://localhost:8180",
secure: false secure: false
}, },
{ {
...@@ -20,7 +20,7 @@ const PROXY_CONFIG = [ ...@@ -20,7 +20,7 @@ const PROXY_CONFIG = [
"/gnpis-dev/api", "/gnpis-dev/api",
"/gnpis-dev/actuator" "/gnpis-dev/actuator"
], ],
target: "http://localhost:8070", target: "http://localhost:8280",
secure: false secure: false
} }
]; ];
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
# delegates to parameterized script # delegates to parameterized script
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
sh $BASEDIR/harvestCI.sh localhost 8070 gnpis dev sh $BASEDIR/harvestCI.sh localhost 8280 gnpis dev
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
# delegates to parameterized script # delegates to parameterized script
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
sh $BASEDIR/harvestCI.sh localhost 8090 wheatis dev sh $BASEDIR/harvestCI.sh localhost 8180 wheatis dev
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment