-
Notifications
You must be signed in to change notification settings - Fork 5
/
bootstrap.yml
384 lines (368 loc) · 12.4 KB
/
bootstrap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
server:
port: ${PORT:8095} # port of the application
spring:
application:
# the name of the application represents the global identifier of this microservice.
name: catalogue-service-srdc
url: ${CATALOGUE_SERVICE_URL} # the url of catalogue service
# cache configuration
cache:
jcache:
config: classpath:ehcache.xml
# cloud configuration
cloud:
config:
uri: ${CONFIG_SERVER_URI:http://localhost:8888}
# failFast is disabled per default, so that the service can start standalone without config server.
# failFast should be enabled in production environments.
# it can be set via an environment variable or the config server
failFast: ${CONFIG_SERVER_FAILFAST:false}
discovery:
# by disabling the service discovery the application/service can be started in "standalone mode".
# service discovery is disabled by default and should be enabled (set to true) for the "cloud mode".
# it can be set via an environment variable or the config server
enabled: ${discovery.enabled:${DISCOVERY_ENABLED:false}}
# database connection details
datasource:
# database to store product and catalogue information
ubldb:
url: jdbc:postgresql://${UBL_DB_HOST}:${UBL_DB_HOST_PORT}/${UBL_DB_NAME}?currentSchema=public&ApplicationName=catalogue-service-ubldb
username: ${UBL_DB_USERNAME}
password: ${UBL_DB_PASSWORD}
driver-class: org.postgresql.Driver
# database to store binary contents of products
binarycontentdb:
url: jdbc:postgresql://${BINARY_CONTENT_DB_HOST}:${BINARY_CONTENT_DB_PORT}/${BINARY_CONTENT_DB_NAME}?currentSchema=public&ApplicationName=catalogue-service-binarycontentdb
username: ${BINARY_CONTENT_DB_USERNAME}
password: ${BINARY_CONTENT_DB_PASSWORD}
driver-class: org.postgresql.Driver
test-on-borrow: true
test-while-idle: true
remove-abandoned: false #making this false since some of the queries take too much time and abandoning connections causes an error in such cases
log-abandoned: true
initial-size: 3
max-active: 175
max-idle: 3
min-idle: 3
max-wait: 90000
time-between-eviction-runs-millis: 30000
min-evictable-idle-time-millis: 60000
validation-query: "SELECT 1;" # Validation query must be set in order to test connections
# encoding
messages:
encoding: ISO-8859-1
jackson:
mapper:
PROPAGATE_TRANSIENT_MARKER: true
# http multipart settings
http:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# mail server configuration
mail:
host: ${SMTP_HOST:localhost}
port: ${SMTP_PORT:25}
defaultFrom: ${SMTP_DEFAULT_FROM:}
username: ${SMTP_USERNAME:}
password: ${SMTP_PASSWORD:}
smtp.auth: ${SMTP_AUTH:true}
properties.mail.smtp.starttls.enable: ${SMTP_STARTTLS:true}
platformName : ${MAIL_PLATFORM_NAME:NIMBLE}
# thymeleaf configuration
thymeleaf:
cache: false
mode: HTML
logstash:
uri: ${LOGSTASH_URI:localhost:5000}
#### c3p0 database connection pool configurations
com:
mchange:
v2:
c3p0:
impl:
DefaultConnectionTester:
querylessTestRunner: SWITCH
log:
MLog: slf4j
# settings for the database management systems used in catalogue service
persistence:
categorydb:
driver: org.postgresql.Driver
connection:
url: jdbc:postgresql://${CATEGORY_DB_HOST}:${CATEGORY_DB_PORT}/${CATEGORY_DB_NAME}
username: ${CATEGORY_DB_USERNAME}
password: ${CATEGORY_DB_PASSWORD}
schema: public
orm:
ubl:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
show_sql: false
hbm2ddl:
auto: update
cache:
provider_class: org.hibernate.cache.HashtableCacheProvider
jdbc:
batch_size: 10
use_sql_comments: true
transaction:
factory_class: org.hibernate.transaction.JDBCTransactionFactory
current_session_context_class: thread
event:
merge:
entity_copy_observer: allow
modaml:
hibernate:
connection:
url: jdbc:h2:file://${user.home}/nimble/modaml;AUTO_SERVER=TRUE;MVCC=TRUE;AUTO_RECONNECT=TRUE;DB_CLOSE_DELAY=10;INIT=create schema IF NOT EXISTS APPS
username: sa
password:
driver_class: org.h2.Driver
dialect: org.hibernate.dialect.H2Dialect
show_sql: false
hbm2ddl:
auto: update
cache:
provider_class: org.hibernate.cache.HashtableCacheProvider
jdbc:
batch_size: 10
c3p0:
acquire_increment: 2
initialPoolSize: 2
max_size: 10
min_size: 2
maxStatementsPerConnection: 2
acquireRetryAttempts: 10
acquireRetryDelay: 100
numHelperThreads: 10
idle_test_period: 600
use_sql_comments: true
transaction:
factory_class: org.hibernate.transaction.JDBCTransactionFactory
current_session_context_class: thread
event:
merge:
entity_copy_observer: allow
security:
oauth2:
authorization:
check-token-access:
nimble:
catalog:
max-file-size: 5 #in MB
spare-part: ${SPARE_PART_ENABLED:false}
category:
enabled-taxonomies: ${CATALOGUE_SERVICE_ENABLED_TAXONOMIES} #comma separated taxonomy ids as defined in the Taxonomies.json file e.g. eClass,FurnitureOntology
# binary content settings
binary-content:
url: CatalogBinaryContentUri # the prefix for the product binary contents
# identity service settings
identity:
url: ${IDENTITY_SERVICE_URL}
check-token: ${IDENTITY_SERVICE_CHECK_TOKEN:true} # whether the authorization tokens should be validated
# keycloak settings
keycloak:
public-key: ${KEYCLOAK_PUBLIC_KEY} # keycloak public key used to validate the authorization tokens
# frontend service settings
frontend:
url: ${FRONTEND_URL:http://localhost:9092}
# trust service settings
trust:
url: ${TRUST_SERVICE_URL}
# indexing service settings
indexing:
url: ${INDEXING_SERVICE_URL}
sync: ${INDEXING_SYNC:true}
federated-index-enabled: ${FEDERATED_INDEX_ENABLED:false}
federated-index-url: ${FEDERATED_INDEXING_SERVICE_URL:}
federated-index-platform-name: ${FEDERATED_INDEX_PLATFORM_NAME:nimble}
# oauth clients to retrieve authorization tokens
oauth:
client:
clientId: ${CATALOG_SERVICE_OAUTH_CLIENT_ID}
clientSecret: ${CATALOG_SERVICE_OAUTH_SECRET}
accessTokenUri: ${OAUTH_CLIENT_ACCESSTOKEN_URI}
eFactoryClient:
clientId: ${OAUTH_EFACTORY_CLIENT_ID:}
clientSecret: ${OAUTH_EFACTORY_CLIENT_SECRET:}
accessTokenUri: ${OAUTH_EFACTORY_CLIENT_ACCESSTOKEN_URI:}
userDetailsUri: ${OAUTH_EFACTORY_USER_DETAILS_URI:}
check-entity-ids: ${CHECK_ENTITY_IDS:false}
federation-instance-id: ${FEDERATION_INSTANCE_ID} # identifier of the federation instance to which catalogue service belongs
# delegate service settings
delegate-service:
url: ${DELEGATE_SERVICE_URL:}
# the list of available languages for catalogue service
languages: ${CATALOG_SERVICE_LANGUAGES:en,es}
# hystrix settings
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 300000
threadpool:
default:
coreSize: 175
maxQueueSize: -1
################################################################################################
################################## KUBERNETES CONFIG ###########################################
################################################################################################
---
spring:
profiles: k8s
persistence:
categorydb:
driver: org.postgresql.Driver
connection:
url: # set in eu.nimble.service.catalogue.config.CatalogueServiceConfig
username: # set in eu.nimble.service.catalogue.config.CatalogueServiceConfig
password: # set in eu.nimble.service.catalogue.config.CatalogueServiceConfig
bluemix:
credentials_json: ${BLUEMIX_CATEGORY_DB_JSON:}
orm:
ubl:
hibernate:
connection:
url: #set in eu.nimble.utility.config.PersistenceConfig
username: #set in eu.nimble.utility.config.PersistenceConfig
password: #set in eu.nimble.utility.config.PersistenceConfig
driver_class: org.postgresql.Driver
dialect: org.hibernate.dialect.PostgreSQLDialect
show_sql: false
hbm2ddl:
auto: update
cache:
provider_class: org.hibernate.cache.HashtableCacheProvider
jdbc:
batch_size: 10
c3p0:
acquire_increment: 5
initialPoolSize: 5
max_size: 25
min_size: 5
maxStatementsPerConnection: 5
acquireRetryAttempts: 10
acquireRetryDelay: 100
numHelperThreads: 10
idle_test_period: 600
use_sql_comments: true
transaction:
factory_class: org.hibernate.transaction.JDBCTransactionFactory
current_session_context_class: thread
event:
merge:
entity_copy_observer: allow
bluemix:
credentials_json: ${BLUEMIX_UBL_DB_JSON:}
modaml:
hibernate:
connection:
url: #set in eu.nimble.utility.config.PersistenceConfig
username: #set in eu.nimble.utility.config.PersistenceConfig
password: #set in eu.nimble.utility.config.PersistenceConfig
driver_class: org.postgresql.Driver
dialect: org.hibernate.dialect.PostgreSQLDialect
show_sql: false
hbm2ddl:
auto: update
cache:
provider_class: org.hibernate.cache.HashtableCacheProvider
jdbc:
batch_size: 10
c3p0:
acquire_increment: 2
initialPoolSize: 2
max_size: 10
min_size: 2
maxStatementsPerConnection: 2
acquireRetryAttempts: 10
acquireRetryDelay: 100
numHelperThreads: 10
idle_test_period: 600
use_sql_comments: true
transaction:
factory_class: org.hibernate.transaction.JDBCTransactionFactory
current_session_context_class: thread
event:
merge:
entity_copy_observer: allow
bluemix:
credentials_json: ${BLUEMIX_MODAML_DB_JSON:}
################################################################################################
################################### TEST CONFIG ###########################################
################################################################################################
---
spring:
profiles: test
application:
url: http://localhost:8095
datasource:
ubldb:
url: jdbc:h2:mem:db3;AUTO_RECONNECT=TRUE;DB_CLOSE_DELAY=-1;INIT=create schema IF NOT EXISTS APPS
username: sa
password:
driver-class: org.h2.Driver
# url: jdbc:postgresql://localhost:5432/ubldb_test?currentSchema=public
# username: postgres
# password: nimble
# driver_class: org.postgresql.Driver
binarycontentdb:
url: jdbc:h2:mem:db2;AUTO_RECONNECT=TRUE;DB_CLOSE_DELAY=-1;INIT=create schema IF NOT EXISTS APPS
username: sa
password:
driver-class: org.h2.Driver
# url: jdbc:postgresql://localhost:5432/binarycontentdb_test?currentSchema=public
# username: postgres
# password: nimble
# driver_class: org.postgresql.Driver
persistence:
categorydb:
driver: org.postgresql.Driver
connection:
url:
username:
password:
schema:
orm:
ubl:
hibernate:
dialect: org.hibernate.dialect.H2Dialect
# dialect: org.hibernate.dialect.PostgreSQLDialect
# show_sql: true
# hbm2ddl:
# auto: create-drop
nimble:
catalog:
max-file-size: 5 #in MB
category:
enabled-taxonomies: eClass,FurnitureOntology
binary-content:
url: CatalogBinaryContentUri
identity:
url:
check-token: true
trust:
url:
indexing:
url: http://localhost:8090
sync: false
federated-index-enabled: ${FEDERATED_INDEX_ENABLED:false}
federated-index-url: ${FEDERATED_INDEXING_SERVICE_URL:http://localhost:8090}
federated-index-platform-name: ${FEDERATED_INDEX_PLATFORM_NAME:nimble}
oauth:
client:
clientId:
clientSecret:
accessTokenUri:
check-entity-ids: false
federation-instance-id: TEST_INSTANCE
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000