-
Notifications
You must be signed in to change notification settings - Fork 0
/
gravitee-template-openshift.yaml
1990 lines (1809 loc) · 65 KB
/
gravitee-template-openshift.yaml
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
##comienzo Template
apiVersion: v1
kind: Template
metadata:
name: gateway-openshift-mvilche
labels:
template: management-api-openshift-mvilche
autor: "Martin_Fabrizzio_Vilche"
annotations:
openshift.io/display-name: "management-api-openshift-mvilche"
iconClass: "icon-github"
description: >-
management-api api gateway INTEGRACION OPENSHIFT
Martin Fabrizzio Vilche.
https://github.com/mvilche.
objects:
########## gateway
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
finalizers:
- kubernetes.io/pvc-protection
name: gravitee-api-gateway-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- apiVersion: v1
data:
gravitee.yml: |-
############################################################################################################
#################################### Gravitee.IO Gateway - Configuration ###################################
############################################################################################################
############################################################################################################
# This file is the general configuration of Gravitee.IO Gateway:
# - Properties (and respective default values) in comment are provided for information.
# - You can reference other property by using ${property.name} syntax
# - gravitee.home property is automatically set-up by launcher and refers to the installation path. Do not override it !
#
# Please have a look to http://docs.gravitee.io/ for more options and fine-grained granularity
############################################################################################################
# Gateway HTTP server
http:
port: 8082
host: 0.0.0.0
idleTimeout: 0
tcpKeepAlive: true
compressionSupported: false
maxHeaderSize: 8192
maxChunkSize: 8192
instances: 0
requestTimeout: 0
secured: false
alpn: false
# ssl:
# clientAuth: none # Supports none, request, requires
# keystore:
# type: jks # Supports jks, pem, pkcs12
# path: ${gravitee.home}/security/keystore.jks
# password: secret
# truststore:
# type: jks # Supports jks, pem, pkcs12
# path: ${gravitee.home}/security/truststore.jks
# password: secret
# websocket:
# enabled: false
# Plugins repository
#plugins:
# path:
# - ${gravitee.home}/plugins
# - ${gravitee.home}/my-custom-plugins
# If a plugin is already installed (but with a different version), management node does not start anymore
# failOnDuplicate: true
# Management repository is used to store global configuration such as APIs, applications, apikeys, ...
# This is the default configuration using MongoDB (single server)
# For more information about MongoDB configuration, please have a look to:
# - http://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.html
management:
type: mongodb
mongodb:
dbname: ${ds.mongodb.dbname}
host: ${ds.mongodb.host}
port: ${ds.mongodb.port}
# username:
# password:
# connectionsPerHost: 0
# connectTimeout: 500
# maxWaitTime: 120000
# socketTimeout: 500
# socketKeepAlive: false
# maxConnectionLifeTime: 0
# maxConnectionIdleTime: 0
# serverSelectionTimeout: 0
# description: gravitee.io
# heartbeatFrequency: 10000
# minHeartbeatFrequency: 500
# heartbeatConnectTimeout: 1000
# heartbeatSocketTimeout: 20000
# localThreshold: 15
# minConnectionsPerHost: 0
# sslEnabled: false
# keystore: # path to KeyStore (when sslEnabled is true)
# keystorePassword: # KeyStore password
# keyPassword: # password for recovering keys in the KeyStore
# threadsAllowedToBlockForConnectionMultiplier: 5
# cursorFinalizerEnabled: true
# possible values are 1,2,3... (the number of node) or 'majority'
# writeConcern: 1
# wtimeout: 0
# journal: true
# Management repository: single MongoDB using URI
# For more information about MongoDB configuration using URI, please have a look to:
# - http://api.mongodb.org/java/current/com/mongodb/MongoClientURI.html
#management:
# type: mongodb
# mongodb:
# uri: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
# Management repository: clustered MongoDB
#management:
# type: mongodb
# mongodb:
# servers:
# - host: mongo1
# port: 27017
# - host: mongo2
# port: 27017
# dbname: ${ds.mongodb.dbname}
# connectTimeout: 500
# socketTimeout: 250
# When defining rate-limiting policy, the gateway has to store data to share with other gateway instances.
# In this example, we are using MongoDB to store counters.
ratelimit:
type: mongodb
mongodb:
uri: mongodb://${ds.mongodb.host}:${ds.mongodb.port}/${ds.mongodb.dbname}
cache:
type: ehcache
# Reporters configuration (used to store reporting monitoring data, request metrics, healthchecks and others...
# All reporters are enabled by default. To stop one of them, you have to add the property 'enabled: false'
reporters:
# logging configuration
# logging:
# max_size: -1 # max size per API log content respectively : client-request, client-response, proxy-request and proxy-response in MB (-1 means no limit)
# excluded_response_types: video.*|audio.*|image.*|application\/octet-stream|application\/pdf # Response content types to exclude in logging (must be a regular expression)
# Elasticsearch reporter
elasticsearch:
enabled: true # Is the reporter enabled or not (default to true)
endpoints:
- http://${ds.elastic.host}:${ds.elastic.port}
# index: gravitee
# index_per_type: true
# bulk:
# actions: 1000 # Number of requests action before flush
# flush_interval: 5 # Flush interval in seconds
# settings:
# number_of_shards: 1
# number_of_replicas: 1
# refresh_interval: 5s
# pipeline:
# plugins:
# ingest: geoip, user_agent
# security:
# username: user
# password: secret
# http:
# timeout: 30000 # in milliseconds
# template_mapping:
# path: ${gravitee.home}/config/reporter/elasticsearch/templates
# extended_request_mapping: request.ftl
# Gateway service configurations. Provided values are default values.
# All services are enabled by default. To stop one of them, you have to add the property 'enabled: false' (See the
# 'local' service for an example).
services:
core:
http:
enabled: true
port: 18082
host: localhost
authentication:
# authentication type to be used for the core services
# - none : to disable authentication
# - basic : to use basic authentication
# default is "basic"
type: basic
users:
admin: adminadmin
# Synchronization daemon used to keep the gateway state in sync with the configuration from the management repository
# Be aware that, by disabling it, the gateway will not be sync with the configuration done through management API
# and management UI
sync:
# Synchronization is done each 5 seconds
cron: '*/5 * * * * *'
# Service used to store and cache api-keys from the management repository to avoid direct repository communication
# while serving requests.
apikeyscache:
delay: 10000
unit: MILLISECONDS
threads: 3 # Threads core size used to retrieve api-keys from repository.
# Local registry service.
# This registry is used to load API Definition with json format from the file system. By doing so, you do not need
# to configure your API using the web console or the rest API (but you need to know and understand the json descriptor
# format to make it work....)
local:
enabled: false
path: ${gravitee.home}/apis # The path to API descriptors
# Gateway monitoring service.
# This service retrieves metrics like os / process / jvm metrics and send them to an underlying reporting service.
monitoring:
delay: 5000
unit: MILLISECONDS
# metrics service
metrics:
enabled: false
# default: local, http_method, http_code
# labels:
# - local
# - remote
# - http_method
# - http_code
# - http_path
prometheus:
enabled: true
# heartbeat
# heartbeat:
# enabled: true
# delay: 5000
# unit: MILLISECONDS
# storeSystemProperties: true
handlers:
request:
transaction:
header: X-Gravitee-Transaction-Id
# Referenced properties
ds:
mongodb:
dbname: gravitee
host: mongo
port: 27017
elastic:
host: elasticsearch
port: 9200
# Sharding tags configuration
# Allows to define inclusion/exclusion sharding tags to only deploy a part of APIs. To exclude just prefix the tag with '!'.
#tags: products,stocks,!international
# Multi-tenant configuration
# Allow only a single-value
#tenant: europe
#policy:
# Customize the api-key header and / or query parameter.
# Set an empty value to prohibit its use.
# api-key:
# header: X-Gravitee-Api-Key
# param: api-key
#el:
# Allows to define which methods or classes are accessible to the Expression Language engine (/!\ caution, changing default whitelist may expose you to security issues).
# A complete list of default whitelist methods can be found here (https://raw.githubusercontent.com/gravitee-io/gravitee-expression-language/master/src/main/resources/whitelist).
# whitelist:
# Allows to define if the specified list of method or classes should be append to the default one or should replace it.
# We recommend you to always choose 'append' unless you absolutely know what you are doing.
# mode: append
# Define the list of classes or methods to append (or set) to made accessible to the Expression Language.
# start with 'method' to allow a specific method (complete signature).
# start with 'class' to allow a complete class. All methods of the class will then be accessible.
# list:
# Ex: allow access to DateTimeFormatter.ofLocalizedDate(FormatStyle) method
# - method java.time.format.DateTimeFormatter ofLocalizedDate java.time.format.FormatStyle
# Ex: allow access to all methods of DateTimeFormatter class
# - class java.time.format.DateTimeFormatter
logback.xml: |-
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2015-2016, The Gravitee team (http://www.gravitee.io)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] [%X{api}] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${gravitee.home}/logs/gravitee.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${gravitee.home}/logs/gravitee_%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] [%X{api}] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="async-file" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="FILE" />
</appender>
<appender name="async-console" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="STDOUT" />
</appender>
<logger name="io.gravitee" level="INFO" />
<logger name="org.reflections" level="WARN" />
<logger name="org.springframework" level="WARN" />
<logger name="org.eclipse.jetty" level="WARN" />
<!-- Strictly speaking, the level attribute is not necessary since -->
<!-- the level of the root level is set to DEBUG by default. -->
<root level="INFO">
<appender-ref ref="async-console" />
<appender-ref ref="async-file" />
</root>
</configuration>
ehcache.xml: |-
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd">
<diskStore path="java.io.tmpdir" />
<cache name="apikey"
maxEntriesLocalHeap="10000"
maxEntriesLocalDisk="1000"
eternal="false"
diskSpoolBufferSizeMB="20"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
memoryStoreEvictionPolicy="LFU">
</cache>
<cache name="subscriptions"
maxEntriesLocalHeap="10000"
maxEntriesLocalDisk="1000"
eternal="false"
diskSpoolBufferSizeMB="20"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
memoryStoreEvictionPolicy="LFU">
</cache>
</ehcache>
kind: ConfigMap
metadata:
name: gateway-config
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: gravitee-api-gateway
name: gateway
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
app: gravitee-api-gateway
deploymentconfig: gateway
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: gravitee-api-gateway
deploymentconfig: gateway
spec:
containers:
- env:
- name: WAITFOR_HOST
value: mongo
- name: WAITFOR_PORT
value: '27017'
- name: JAVA_OPTS
value: -Djava.awt.headless=true -XX:+UseContainerSupport -XX:MaxRAMPercentage=90.0 -Dfile.encoding=UTF8 -XX:+ExitOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
image: "gateway:latest"
imagePullPolicy: Always
name: gateway
ports:
- containerPort: 8082
protocol: TCP
- containerPort: 18082
protocol: TCP
livenessProbe:
exec:
command:
- sh
- "-c"
- |
nc -z -v -w5 127.0.0.1 8082
if [ "$?" == 0 ]; then
exit 0
else
exit 1
fi
initialDelaySeconds: 90
timeoutSeconds: 5
readinessProbe:
exec:
command:
- sh
- "-c"
- |
nc -z -v -w5 127.0.0.1 8082
if [ "$?" == 0 ]; then
exit 0
else
exit 1
fi
initialDelaySeconds: 30
timeoutSeconds: 15
resources:
requests:
memory: 500Mi
cpu: 500m
limits:
cpu: 1000m
memory: 1024Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- name: gateway-config
mountPath: /opt/gateway/config
- mountPath: /opt/gateway/data
name: gateway
subPath: gateway
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- configMap:
name: gateway-config
name: gateway-config
- name: gateway
persistentVolumeClaim:
claimName: gravitee-api-gateway-data
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- gateway
from:
kind: ImageStreamTag
name: "gateway:latest"
type: ImageChange
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: gravitee-api-gateway
build: gateway
name: gateway
spec:
failedBuildsHistoryLimit: 5
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: 'gateway:latest'
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: gateway
git:
ref: master
uri: 'https://github.com/mvilche/gravitee-api-gateway-openshift.git'
type: Git
strategy:
dockerStrategy:
dockerfilePath: Dockerfile
type: Docker
successfulBuildsHistoryLimit: 5
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
app: gravitee-api-gateway
name: gateway
spec:
ports:
- name: http
port: 8082
protocol: TCP
targetPort: 8082
- name: admin-http
port: 18082
protocol: TCP
targetPort: 18082
selector:
app: gravitee-api-gateway
deploymentconfig: gateway
sessionAffinity: None
type: ClusterIP
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: gravitee-api-gateway
name: gateway
spec:
host:
port:
targetPort: http
to:
kind: Service
name: gateway
weight: 100
wildcardPolicy: None
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: gravitee-api-gateway
name: gateway
spec: {}
########## FIN gateway
#### mongo
- apiVersion: v1
data:
mongod.conf: |-
storage:
dbPath: /opt/mongodb-data
journal:
enabled: true
net:
port: 27017
bindIp: 0.0.0.0
kind: ConfigMap
metadata:
name: mongo-config
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: gravitee-api-gateway
name: mongo
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
app: gravitee-api-gateway
deploymentconfig: mongo
strategy:
activeDeadlineSeconds: 21600
resources: {}
type: Recreate
template:
metadata:
labels:
app: gravitee-api-gateway
deploymentconfig: mongo
spec:
containers:
- image: "mongo:latest"
imagePullPolicy: Always
command:
- bash
- "-c"
- |
/opt/mongodb/bin/mongod --config /opt/mongodb-config/mongod.conf
name: mongo
ports:
- containerPort: 27017
protocol: TCP
livenessProbe:
exec:
command:
- sh
- "-c"
- |
nc -z -v -w5 127.0.0.1 27017
if [ "$?" == 0 ]; then
exit 0
else
exit 1
fi
initialDelaySeconds: 90
timeoutSeconds: 5
readinessProbe:
exec:
command:
- sh
- "-c"
- |
nc -z -v -w5 127.0.0.1 27017
if [ "$?" == 0 ]; then
exit 0
else
exit 1
fi
initialDelaySeconds: 30
timeoutSeconds: 15
resources:
requests:
memory: 128Mi
cpu: 200m
limits:
cpu: 500m
memory: 512Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- name: mongo
mountPath: /opt/mongodb-data
subPath: mongodb
- name: mongo-config
mountPath: /opt/mongodb-config
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: mongo
persistentVolumeClaim:
claimName: gravitee-api-gateway-data
- configMap:
name: mongo-config
name: mongo-config
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- mongo
from:
kind: ImageStreamTag
name: "mongo:latest"
type: ImageChange
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: gravitee-api-gateway
build: mongo
name: mongo
spec:
failedBuildsHistoryLimit: 5
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: 'mongo:latest'
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: mongo
git:
ref: master
uri: 'https://github.com/mvilche/gravitee-api-gateway-openshift.git'
type: Git
strategy:
dockerStrategy:
dockerfilePath: Dockerfile
type: Docker
successfulBuildsHistoryLimit: 5
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
app: gravitee-api-gateway
name: mongo
spec:
ports:
- name: client
port: 27017
protocol: TCP
targetPort: 27017
selector:
app: gravitee-api-gateway
deploymentconfig: mongo
sessionAffinity: None
type: ClusterIP
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: gravitee-api-gateway
name: mongo
spec: {}
### fin mongo
#### comienzo api admin
- apiVersion: v1
data:
gravitee.yml: |-
############################################################################################################
################################ Gravitee.IO Management API - Configuration ################################
############################################################################################################
############################################################################################################
# This file is the general configuration of Gravitee.IO Management API:
# - Properties (and respective default values) in comment are provided for information.
# - You can reference other property by using ${property.name} syntax
# - gravitee.home property is automatically set-up by launcher and refers to the installation path. Do not override it !
#
# Please have a look to http://docs.gravitee.io/ for more options and fine-grained granularity
############################################################################################################
# HTTP Server
jetty:
# IP/hostname to bind to. Default is 0.0.0.0
host: 0.0.0.0
port: 8083
idleTimeout: 30000
acceptors: -1
selectors: -1
pool:
minThreads: 10
maxThreads: 200
idleTimeout: 60000
queueSize: 6000
jmx: false
statistics: false
# accesslog:
# enabled: true
# path: ${gravitee.home}/logs/gravitee_accesslog_yyyy_mm_dd.log
# secured: false
# ssl:
# keystore:
# type: jks # Supports jks, pkcs12
# path: ${gravitee.home}/security/keystore.jks
# password: secret
# truststore:
# type: jks # Supports jks, pkcs12
# path: ${gravitee.home}/security/truststore.jks
# password: secret
http:
api:
# Configure the listening path for the API. Default to /
entrypoint: /
# Configure Management API and Portal API.
management:
enabled: true
entrypoint: ${http.api.entrypoint}management
portal:
enabled: true
entrypoint: ${http.api.entrypoint}portal
cors:
# Allows to configure the header Access-Control-Allow-Origin (default value: *)
# '*' is a valid value but is considered as a security risk as it will be opened to cross origin requests from anywhere.
#allow-origin: http://developer.mycompany.com
# Allows to define how long the result of the preflight request should be cached for (default value; 1728000 [20 days])
#max-age: 864000
# Which methods to allow (default value: OPTIONS, GET, POST, PUT, DELETE)
#allow-methods: 'OPTIONS, GET, POST, PUT, DELETE'
# Which headers to allow (default values: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With, If-Match, X-Xsrf-Token)
#allow-headers: 'X-Requested-With'
csrf:
# Allows to enable or disable the CSRF protection. Enabled by default.
enabled: true
hsts:
enabled: true
include-sub-domains: true
max-age: 31536000
# Plugins repository
#plugins:
# path:
# - ${gravitee.home}/plugins
# - ${gravitee.home}/my-custom-plugins
# If a external is already installed (but with a different version), management node does not start anymore
# failOnDuplicate: true
# Management repository is used to store global configuration such as APIs, applications, apikeys, ...
# This is the default configuration using MongoDB (single server)
# For more information about MongoDB configuration, please have a look to:
# - http://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.html
management:
type: mongodb
mongodb:
dbname: ${ds.mongodb.dbname}
host: ${ds.mongodb.host}
port: ${ds.mongodb.port}
# username:
# password:
# connectionsPerHost: 0
# connectTimeout: 500
# maxWaitTime: 120000
# socketTimeout: 500
# socketKeepAlive: false
# maxConnectionLifeTime: 0
# maxConnectionIdleTime: 0
# serverSelectionTimeout: 0
# description: gravitee.io
# heartbeatFrequency: 10000
# minHeartbeatFrequency: 500
# heartbeatConnectTimeout: 1000
# heartbeatSocketTimeout: 20000
# localThreshold: 15
# minConnectionsPerHost: 0
# sslEnabled: false
# threadsAllowedToBlockForConnectionMultiplier: 5
# cursorFinalizerEnabled: true
# possible values are 1,2,3... (the number of node) or 'majority'
# writeConcern: 1
# wtimeout: 0
# journal: true
# Management repository: single MongoDB using URI
# For more information about MongoDB configuration using URI, please have a look to:
# - http://api.mongodb.org/java/current/com/mongodb/MongoClientURI.html
#management:
# type: mongodb
# mongodb:
# uri: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
# Management repository: clustered MongoDB
#management:
# type: mongodb
# mongodb:
# servers:
# - host: mongo1
# port: 27017
# - host: mongo2
# port: 27017
# dbname: ${ds.mongodb.dbname}
# connectTimeout: 500
# socketTimeout: 250
services:
core:
http:
enabled: true
port: 18083
host: localhost
authentication:
# authentication type to be used for the core services
# - none : to disable authentication
# - basic : to use basic authentication
# default is "basic"
type: basic
users:
admin: adminadmin
# metrics service
metrics:
enabled: false
prometheus:
enabled: true
# v3 upgrader service. Can be disabled after first launch.
v3-upgrader:
enabled: true
# Analytics repository is used to store all reporting, metrics, health-checks stored by gateway instances
# This is the default configuration using Elasticsearch
analytics:
type: elasticsearch
elasticsearch:
endpoints:
- http://${ds.elastic.host}:${ds.elastic.port}
# index: gravitee
# index_per_type: true
# cross_cluster:
# mapping:
# tenant_id: cluster_name
# tenant_id: cluster_name
# security:
# username: user
# password: secret
# http:
# timeout: 10000 # in milliseconds
#
# Authentication and identity sources
# Users can have following roles (authorities):
# USER: Can access portal and be a member of an API
# API_PUBLISHER: Can create and manage APIs
# API_CONSUMER: Can create and manage Applications
# ADMIN: Can manage global system
security:
# When using an authentication providers, use trustAll mode for TLS connections
# trustAll: false
providers: # authentication providers
- type: memory
# allow search results to display the user email. Be careful, It may be contrary to the user privacy.
# allow-email-in-search-results: true
# password encoding/hashing algorithm. One of:
# - bcrypt : passwords are hashed with bcrypt (supports only $2a$ algorithm)
# - none : passwords are not hashed/encrypted
# default value is bcrypt
password-encoding-algo: bcrypt
users:
- user:
username: user
#firstname:
#lastname:
# Passwords are encoded using BCrypt
# Password value: password
password: $2a$10$9kjw/SH9gucCId3Lnt6EmuFreUAcXSZgpvAYuW2ISv7hSOhHRH1AO
roles: ORGANIZATION:USER,ENVIRONMENT:USER