support for fleet, heavynode, receiver, idh

This commit is contained in:
m0duspwnens
2024-08-29 13:41:58 -04:00
parent 0766a5da91
commit aaa48f6a1a
8 changed files with 95 additions and 20 deletions
+15 -11
View File
@@ -11,11 +11,24 @@
{% do DATA.update({'CORECOUNT': grains.num_cpus}) %}
{% do DATA.update({'CPUCORES': grains.num_cpus}) %}
{% if nodetype in ['searchnode', 'receiver', 'fleet', 'heavynode'] %}
{% if nodetype == "searchnode" %}
{# we can't use the host grain here because the grain may not be updated yet from the hostname change #}
{% do DATA.update({'LSHOSTNAME': grains.id.split("_") | first}) %}
{% if total_mem >= 32000 or nodetype in ['managersearch','heavynode','standalone'] %}
{% set LSHEAP="1000m" %}
{% elif nodetype == 'eval' %}
{% set LSHEAP="700m" %}
{% else %}
{% set LSHEAP="500m" %}
{% endif %}
{% do DATA.update({'LSHEAP': LSHEAP}) %}
{% endif %}
{% if nodetype in ['searchnode', 'heavynode'] %}
{# this replicates the function es_heapsize in so-functions #}
{% if total_mem < 8000 %}
{% set ES_HEAP_SIZE = "600m" %}
@@ -31,13 +44,4 @@
{% endif %}
{% do DATA.update({'ES_HEAP_SIZE': ES_HEAP_SIZE}) %}
{% if total_mem >= 32000 or nodetype in ['managersearch','heavynode','standalone'] %}
{% set LSHEAP="1000m" %}
{% elif nodetype == 'eval' %}
{% set LSHEAP="700m" %}
{% else %}
{% set LSHEAP="500m" %}
{% endif %}
{% do DATA.update({'LSHEAP': LSHEAP}) %}
{% endif %}