Verified Commit 88249cbd authored by Raphaël Flores's avatar Raphaël Flores
Browse files

Configure dev env deploy on rare-with-basket path

parent 665f79ee
...@@ -673,8 +673,6 @@ deploy-data-discovery-to-prod-openstack: ...@@ -673,8 +673,6 @@ deploy-data-discovery-to-prod-openstack:
- git pull - git pull
- git lfs pull -I "data/${APP_NAME}/*.gz" - git lfs pull -I "data/${APP_NAME}/*.gz"
- git lfs pull -I "data/${APP_NAME}/suggestions/*.gz" - git lfs pull -I "data/${APP_NAME}/suggestions/*.gz"
# Deleting old indexes before reindexing from scratch
# - curl -s -XDELETE ${ES_HOST}:${ES_PORT}/*${APP_NAME}-${ENV}-* ; echo
- ./scripts/index.sh -host ${ES_HOST} -app ${APP_NAME} -env ${ENV} --clean ; sleep 1 ; echo - ./scripts/index.sh -host ${ES_HOST} -app ${APP_NAME} -env ${ENV} --clean ; sleep 1 ; echo
environment: environment:
# take care that some variables cannot be expanded according to where they are # take care that some variables cannot be expanded according to where they are
...@@ -695,8 +693,6 @@ deploy-data-discovery-to-prod-openstack: ...@@ -695,8 +693,6 @@ deploy-data-discovery-to-prod-openstack:
- git pull - git pull
- git lfs pull -I "data/${APP_NAME}/*.gz" - git lfs pull -I "data/${APP_NAME}/*.gz"
- git lfs pull -I "data/${APP_NAME}/suggestions/*.gz" - git lfs pull -I "data/${APP_NAME}/suggestions/*.gz"
# Deleting old indexes before reindexing from scratch
# - curl -s -XDELETE ${ES_HOST}:${ES_PORT}/*${APP_NAME}-${ENV}-* ; echo
- ./scripts/index.sh -host "${ES_HOSTS}" -app ${APP_NAME} -env ${ENV} --clean ; sleep 1 ; echo - ./scripts/index.sh -host "${ES_HOSTS}" -app ${APP_NAME} -env ${ENV} --clean ; sleep 1 ; echo
environment: environment:
# take care that some variables cannot be expanded according to where they are # take care that some variables cannot be expanded according to where they are
......
...@@ -133,6 +133,7 @@ or ...@@ -133,6 +133,7 @@ or
```sh ```sh
./gradlew assemble -Papp=wheatis ./gradlew assemble -Papp=wheatis
``` ```
or or
```sh ```sh
...@@ -150,10 +151,10 @@ java -jar backend/build/libs/data-discovery.jar ...@@ -150,10 +151,10 @@ java -jar backend/build/libs/data-discovery.jar
And the full app running on: And the full app running on:
- <http://localhost:8080/rare-dev>
- <http://localhost:8080/rare-dev> - <http://localhost:8080/rare-dev>
- <http://localhost:8180/wheatis-dev> - <http://localhost:8180/wheatis-dev>
- <http://localhost:8280/data-discovery-dev> - <http://localhost:8280/data-discovery-dev>
- <http://localhost:8580/rare-with-basket-dev>
## CI ## CI
...@@ -251,14 +252,11 @@ If you want to use the Spring Cloud config app locally, see <https://forgemia.in ...@@ -251,14 +252,11 @@ If you want to use the Spring Cloud config app locally, see <https://forgemia.in
The configuration is currently only read on startup, meaning the application has to be reboot if the configuration is changed on the Spring Cloud server. For a dynamic reload without restarting the application, see <http://cloud.spring.io/spring-cloud-static/Finchley.SR1/single/spring-cloud.html#refresh-scope> The configuration is currently only read on startup, meaning the application has to be reboot if the configuration is changed on the Spring Cloud server. For a dynamic reload without restarting the application, see <http://cloud.spring.io/spring-cloud-static/Finchley.SR1/single/spring-cloud.html#refresh-scope>
to check what has to be changed. to check what has to be changed.
In case of testing configuration from the config server, one may use a dedicated branch on `data-discovery-config` project and append the `--spring.cloud.config.label=<branch name to test>` parameter when starting the application's executable jar, or use the corresponding Spring [env variable](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config-relaxed-binding-from-environment-variables). More info on [how to pass a parameter to a Spring Boot app](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config). In case of testing configuration from the config server, one may use a dedicated branch on `data-discovery-config` project and append the `--spring.cloud.config.label=<branch name to test>` parameter when starting the application's executable jar, or use the corresponding Spring [env variable](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config-relaxed-binding-from-environment-variables) (_ie._ `SPRING_CLOUD_CONFIG_LABEL`). More info on [how to pass a parameter to a Spring Boot app](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config).
## Building other apps ## Building other apps
By default, the built application is RARe (without basket, i.e. without the possibility to add accessions to a basket By default, the built application is RARe (without basket, i.e. without the possibility to add accessions to a basket and create an accession order on the rare-basket application). But this project actually allows building other applications (RARe with basket and WheatIS, for the moment, but more could come).
and create an accession order on the rare-basket application).
But this project actually allows building other
applications (RARe with basket and WheatIS, for the moment, but more could come).
To build a different app, specify an `app` property when building. For example, to assemble To build a different app, specify an `app` property when building. For example, to assemble
the WheatIS app, run the following command the WheatIS app, run the following command
...@@ -289,9 +287,7 @@ Adding this property has the following consequences: ...@@ -289,9 +287,7 @@ Adding this property has the following consequences:
- the generated jar file (in `backend/build/libs`) is named `wheatis.jar` (resp. `rare-with-basket.jar` instead of `rare.jar`; - the generated jar file (in `backend/build/libs`) is named `wheatis.jar` (resp. `rare-with-basket.jar` instead of `rare.jar`;
- the Spring active profile in `bootstrap.yml` is `wheatis-app` (resp. `rare-with-basket-app`) instead of `rare-app`; - the Spring active profile in `bootstrap.yml` is `wheatis-app` (resp. `rare-with-basket-app`) instead of `rare-app`;
- the frontend application built and embedded inside the jar file is the WheatIS frontend application - the frontend application built and embedded inside the jar file is the WheatIS frontend application (resp. the RARe application with basket support) instead of the RARe frontend application, i.e. the frontend command `yarn build:wheatis` (resp. `yarn build:rare-with-basket`) is executed instead of the command `yarn:rare`.
(resp. the RARe application with basket support) instead of the RARe frontend application, i.e. the frontend command
`yarn build:wheatis` (resp. `yarn build:rare-with-basket`) is executed instead of the command `yarn:rare`.
Since the active Spring profile is different, all the properties specific to this profile Since the active Spring profile is different, all the properties specific to this profile
are applied. In particular: are applied. In particular:
...@@ -310,8 +306,7 @@ java -jar backend/build/libs/data-discovery.jar --data-discovery.elasticsearch-p ...@@ -310,8 +306,7 @@ java -jar backend/build/libs/data-discovery.jar --data-discovery.elasticsearch-p
## Configuration ## Configuration
The RARe and RARe with basket applications can be configured to apply an implicit filtering on the searches, The RARe and RARe with basket applications can be configured to apply an implicit filtering on the searches,
aggregations, and pillar list. There is currently only one implicit filter that can be added, which is a filter on the aggregations, and pillar list. There is currently only one implicit filter that can be added, which is a filter on the pillar name.
pillar name.
To activate it, add the following YAML configuration under the appropriate profile: To activate it, add the following YAML configuration under the appropriate profile:
...@@ -322,4 +317,3 @@ rare: ...@@ -322,4 +317,3 @@ rare:
- Pilier Forêt - Pilier Forêt
- Pilier Micro-organisme - Pilier Micro-organisme
``` ```
...@@ -77,7 +77,7 @@ data-discovery: ...@@ -77,7 +77,7 @@ data-discovery:
server: server:
port: 8580 port: 8580
servlet: servlet:
context-path: /rare-dev context-path: /rare-with-basket-dev
--- ---
spring: spring:
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
"with": "src/environments/rare-with-basket.ts" "with": "src/environments/rare-with-basket.ts"
} }
], ],
"baseHref": "/rare-dev/" "baseHref": "/rare-with-basket-dev/"
}, },
"rare-with-basket-production": { "rare-with-basket-production": {
"fileReplacements": [ "fileReplacements": [
......
...@@ -22,6 +22,14 @@ const PROXY_CONFIG = [ ...@@ -22,6 +22,14 @@ const PROXY_CONFIG = [
], ],
target: "http://localhost:8280", target: "http://localhost:8280",
secure: false secure: false
},
{
context: [
"/rare-with-basket-dev/api",
"/rare-with-basket-dev/actuator"
],
target: "http://localhost:8580",
secure: false
} }
]; ];
......
Markdown is supported
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