From e6167dc34ac8f14f301716e445e9d56bd62cd179 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 2 Mar 2023 15:09:59 -0500 Subject: [PATCH] heavynode changes --- pillar/top.sls | 2 ++ salt/firewall/assigned_hostgroups.map.yaml | 4 ++-- salt/vars/heavynode.map.jinja | 17 +++++++++++++++++ setup/so-functions | 2 +- setup/so-setup | 2 +- 5 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 salt/vars/heavynode.map.jinja diff --git a/pillar/top.sls b/pillar/top.sls index 41d3265f0..2f7894769 100644 --- a/pillar/top.sls +++ b/pillar/top.sls @@ -27,6 +27,8 @@ base: - logstash.soc_logstash - logstash.adv_logstash - elasticsearch.index_templates + - elasticsearch.soc_elasticsearch + - elasticsearch.adv_elasticsearch '*_manager': - logstash diff --git a/salt/firewall/assigned_hostgroups.map.yaml b/salt/firewall/assigned_hostgroups.map.yaml index 0f748e6d6..2e54a5e9f 100644 --- a/salt/firewall/assigned_hostgroups.map.yaml +++ b/salt/firewall/assigned_hostgroups.map.yaml @@ -411,11 +411,9 @@ role: elasticsearch_rest: portgroups: - {{ portgroups.elasticsearch_rest }} - {% if TRUE_CLUSTER %} searchnodes: portgroups: - {{ portgroups.elasticsearch_node }} - {% endif %} self: portgroups: - {{ portgroups.syslog}} @@ -469,6 +467,8 @@ role: self: portgroups: - {{ portgroups.syslog}} + - {{ portgroups.elasticsearch_node }} + - {{ portgroups.elasticsearch_rest }} strelka_frontend: portgroups: - {{ portgroups.strelka_frontend }} diff --git a/salt/vars/heavynode.map.jinja b/salt/vars/heavynode.map.jinja new file mode 100644 index 000000000..ccc241884 --- /dev/null +++ b/salt/vars/heavynode.map.jinja @@ -0,0 +1,17 @@ +{% from 'vars/elasticsearch.map.jinja' import ELASTICSEARCH_GLOBALS %} +{% from 'vars/logstash.map.jinja' import LOGSTASH_GLOBALS %} +{% from 'vars/sensor.map.jinja' import SENSOR_GLOBALS %} + +{% set ROLE_GLOBALS = {} %} + +{% set HEAVYNODE_GLOBALS = + [ + SENSOR_GLOBALS, + ELASTICSEARCH_GLOBALS, + LOGSTASH_GLOBALS + ] +%} + +{% for sg in HEAVYNODE_GLOBALS %} +{% do salt['defaults.merge'](ROLE_GLOBALS, sg, merge_lists=False, in_place=True) %} +{% endfor %} diff --git a/setup/so-functions b/setup/so-functions index 381c4b497..38505e784 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1704,7 +1704,7 @@ process_installtype() { elif [ "$install_type" = 'SEARCHNODE' ]; then is_searchnode=true elif [ "$install_type" = 'HEAVYNODE' ]; then - is_heavy=true + is_heavynode=true elif [ "$install_type" = 'FLEET' ]; then is_fleet=true elif [ "$install_type" = 'IDH' ]; then diff --git a/setup/so-setup b/setup/so-setup index 6825afc9d..45a124e7a 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -637,5 +637,5 @@ if ! [[ -f $install_opt_file ]]; then verify_setup fi - # Need to make sure the latest install is located on the web server of the manager to check the versions and donwload the code if required + # Need to make sure the latest install is located on the web server of the manager to check the versions and download the code if required fi