Available profiles:
- For local use:
jwtAuthDisabled- Disables JWT authorizationawsSqsDisabled- Disables AWS SQS integrationpipelineDisabled- Disables all scheduled ETL jobs
- For external use:
dev- for DEV environmenttest- for TEST environmentprod- for PROD environment
Profiles can be activated in several ways:
- using system parameter
-Dspring.profiles.active={profile_name} - using environment variable
export spring_profiles_active={profile_name}
Several profiles can be activated at once with , separator: profile1,profile2
- PostGIS
- uuid-ossp
To configure additional external config file for Spring Boot application set up Env property:
SPRING_CONFIG_ADDITIONAL_LOCATION="file:%h/config.local.yaml"
There are two config files in the repository:
application.yml- default config file for local runconfig.yaml- template of external config
Environment specific properties are supplied externally (see disaster‐ninja‐cd).
Secure data should be stored in an external config file: config.local.yaml
spring: datasource: platform: postgres url: 'jdbc:postgresql://localhost:5432/db_name' username: USER_NAME password: 'CHANGE_ME_TO_SECURE_PASSWORD'
spring: security: oauth2: resourceserver: jwt: issuer-uri: [ISSUER_URI] jwk-set-uri: [JWK_SET_URI]
ISSUER_URI- the base Keycloak Authorization Server URI. Likehttp://[KEYCLOAK_HOST]/auth/realms/[REALM]/JWK_SET_URI-http://[KEYCLOAK_HOST]/auth/realms/[REALM]/protocol/openid-connect/certs
pdc: host: 'https://testemops.pdc.org' user: user password: password
Jobs for data import:
hpSrvImport- collects the raw data from PDC's Hazard and Product service (HpSrv)gdacsImport- collects the raw data from Gdacs- ...
Jobs for data processing:
normalization- normalizes the raw dataeventCombination- combines episodes from normalized records into Kontur eventsfeedComposition- creates customer feeds from normalized episodesenrichment- enriches events and episodes with analytics
scheduler: hpSrvImport: enable: true initialDelay: 1000 gdacsImport: enable: true cron: 0 1/5 * * * * normalization: enable: true initialDelay: 1000 fixedDelay: 10000 eventCombination: enable: true initialDelay: 10000 fixedDelay: 10000 feedComposition: enable: true initialDelay: 20000 fixedDelay: 10000 enrichment: enable: true initialDelay: 30000 fixedDelay: 10000
AWS S3 bucket event-api-locker01 is used for storing static data files.
PROD/- for productionTEST QA/- for testingTEST DEV/- for developmentEXP/- for experiments
Logging to STDOUT should be switched off (level = OFF) for all tiers except local use. For debugging could be used levels ERROR, WARN, INFO, DEBUG, TRACE
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>OFF</level> </filter> <encoder> <pattern>${defaultPattern}</pattern> </encoder> </appender>