- add support for elasticsearch 7.x - remove support for elasticsearch 5.x - update kitchen-ansible configuration (install ansible and jmespath dependencies using os repositories) - replace geoip plugin in tests as this one is now embeded in elasticsearch since 6.7.0 (cf. https://www.elastic.co/guide/en/elasticsearch/plugins/6.7/ingest-geoip.html) - update discovery configuration for 7.x (in ES 7.x, discovery.zen.ping.unicast.hosts is replaced by discovery.seed_hosts and transport.tcp.port is replaced by transport.port, also discovery.seed_hosts is disabled on master nodes to avoid "master_not_discovered_exception" error when creating templates in the same play) - update index template structure for 7.x - update security realms settings for 7.x (cf. https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#include-realm-type-in-setting)
110 lines
2.7 KiB
Django/Jinja
110 lines
2.7 KiB
Django/Jinja
## JVM configuration
|
|
|
|
################################################################
|
|
## IMPORTANT: JVM heap size
|
|
################################################################
|
|
##
|
|
## You should always set the min and max JVM heap
|
|
## size to the same value. For example, to set
|
|
## the heap to 4 GB, set:
|
|
##
|
|
## -Xms4g
|
|
## -Xmx4g
|
|
##
|
|
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
|
|
## for more information
|
|
##
|
|
################################################################
|
|
|
|
# Xms represents the initial size of total heap space
|
|
# Xmx represents the maximum size of total heap space
|
|
{% if es_heap_size is defined %}
|
|
-Xms{{ es_heap_size }}
|
|
-Xmx{{ es_heap_size }}
|
|
{% else %}
|
|
-Xms2g
|
|
-Xmx2g
|
|
{% endif %}
|
|
|
|
################################################################
|
|
## Expert settings
|
|
################################################################
|
|
##
|
|
## All settings below this section are considered
|
|
## expert settings. Don't tamper with them unless
|
|
## you understand what you are doing
|
|
##
|
|
################################################################
|
|
|
|
## GC configuration
|
|
-XX:+UseConcMarkSweepGC
|
|
-XX:CMSInitiatingOccupancyFraction=75
|
|
-XX:+UseCMSInitiatingOccupancyOnly
|
|
|
|
## optimizations
|
|
|
|
# pre-touch memory pages used by the JVM during initialization
|
|
-XX:+AlwaysPreTouch
|
|
|
|
## basic
|
|
|
|
# force the server VM
|
|
-server
|
|
|
|
# set to headless, just in case
|
|
-Djava.awt.headless=true
|
|
|
|
# ensure UTF-8 encoding by default (e.g. filenames)
|
|
-Dfile.encoding=UTF-8
|
|
|
|
# use our provided JNA always versus the system one
|
|
-Djna.nosys=true
|
|
|
|
# use old-style file permissions on JDK9
|
|
-Djdk.io.permissionsUseCanonicalPath=true
|
|
|
|
# flags to configure Netty
|
|
-Dio.netty.noUnsafe=true
|
|
-Dio.netty.noKeySetOptimization=true
|
|
-Dio.netty.recycler.maxCapacityPerThread=0
|
|
|
|
# log4j 2
|
|
-Dlog4j.shutdownHookEnabled=false
|
|
-Dlog4j2.disable.jmx=true
|
|
-Dlog4j.skipJansi=true
|
|
|
|
## heap dumps
|
|
|
|
# generate a heap dump when an allocation from the Java heap fails
|
|
# heap dumps are created in the working directory of the JVM
|
|
-XX:+HeapDumpOnOutOfMemoryError
|
|
|
|
# specify an alternative path for heap dumps
|
|
# ensure the directory exists and has sufficient space
|
|
#-XX:HeapDumpPath=${heap.dump.path}
|
|
|
|
## GC logging
|
|
|
|
#-XX:+PrintGCDetails
|
|
#-XX:+PrintGCTimeStamps
|
|
#-XX:+PrintGCDateStamps
|
|
#-XX:+PrintClassHistogram
|
|
#-XX:+PrintTenuringDistribution
|
|
#-XX:+PrintGCApplicationStoppedTime
|
|
|
|
# log GC status to a file with time stamps
|
|
# ensure the directory exists
|
|
#-Xloggc:${loggc}
|
|
|
|
|
|
# By default, the GC log file will not rotate.
|
|
# By uncommenting the lines below, the GC log file
|
|
# will be rotated every 128MB at most 32 times.
|
|
#-XX:+UseGCLogFileRotation
|
|
#-XX:NumberOfGCLogFiles=32
|
|
#-XX:GCLogFileSize=128M
|
|
{% if es_jvm_custom_parameters !='' %}
|
|
{% for item in es_jvm_custom_parameters %}
|
|
{{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|