mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
if true cluster enabled allow search nodes to talk to each other https://github.com/Security-Onion-Solutions/securityonion/issues/2079
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{% set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
|
{% set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
|
||||||
{% import_yaml 'firewall/portgroups.yaml' as portgroups %}
|
{% import_yaml 'firewall/portgroups.yaml' as portgroups %}
|
||||||
{% set portgroups = portgroups.firewall.aliases.ports %}
|
{% set portgroups = portgroups.firewall.aliases.ports %}
|
||||||
|
{% set TRUE_CLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %}
|
||||||
|
|
||||||
role:
|
role:
|
||||||
eval:
|
eval:
|
||||||
@@ -42,6 +43,11 @@ role:
|
|||||||
- {{ portgroups.redis }}
|
- {{ portgroups.redis }}
|
||||||
- {{ portgroups.minio }}
|
- {{ portgroups.minio }}
|
||||||
- {{ portgroups.elasticsearch_node }}
|
- {{ portgroups.elasticsearch_node }}
|
||||||
|
heavy_node:
|
||||||
|
portgroups:
|
||||||
|
- {{ portgroups.redis }}
|
||||||
|
- {{ portgroups.minio }}
|
||||||
|
- {{ portgroups.elasticsearch_node }}
|
||||||
self:
|
self:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.syslog}}
|
- {{ portgroups.syslog}}
|
||||||
@@ -135,6 +141,12 @@ role:
|
|||||||
- {{ portgroups.minio }}
|
- {{ portgroups.minio }}
|
||||||
- {{ portgroups.elasticsearch_node }}
|
- {{ portgroups.elasticsearch_node }}
|
||||||
- {{ portgroups.beats_5644 }}
|
- {{ portgroups.beats_5644 }}
|
||||||
|
heavy_node:
|
||||||
|
portgroups:
|
||||||
|
- {{ portgroups.redis }}
|
||||||
|
- {{ portgroups.minio }}
|
||||||
|
- {{ portgroups.elasticsearch_node }}
|
||||||
|
- {{ portgroups.beats_5644 }}
|
||||||
self:
|
self:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.syslog}}
|
- {{ portgroups.syslog}}
|
||||||
@@ -219,6 +231,11 @@ role:
|
|||||||
- {{ portgroups.redis }}
|
- {{ portgroups.redis }}
|
||||||
- {{ portgroups.minio }}
|
- {{ portgroups.minio }}
|
||||||
- {{ portgroups.elasticsearch_node }}
|
- {{ portgroups.elasticsearch_node }}
|
||||||
|
heavy_node:
|
||||||
|
portgroups:
|
||||||
|
- {{ portgroups.redis }}
|
||||||
|
- {{ portgroups.minio }}
|
||||||
|
- {{ portgroups.elasticsearch_node }}
|
||||||
self:
|
self:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.syslog}}
|
- {{ portgroups.syslog}}
|
||||||
@@ -303,6 +320,11 @@ role:
|
|||||||
- {{ portgroups.redis }}
|
- {{ portgroups.redis }}
|
||||||
- {{ portgroups.minio }}
|
- {{ portgroups.minio }}
|
||||||
- {{ portgroups.elasticsearch_node }}
|
- {{ portgroups.elasticsearch_node }}
|
||||||
|
heavy_node:
|
||||||
|
portgroups:
|
||||||
|
- {{ portgroups.redis }}
|
||||||
|
- {{ portgroups.minio }}
|
||||||
|
- {{ portgroups.elasticsearch_node }}
|
||||||
self:
|
self:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.syslog}}
|
- {{ portgroups.syslog}}
|
||||||
@@ -425,6 +447,11 @@ role:
|
|||||||
elasticsearch_rest:
|
elasticsearch_rest:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.elasticsearch_rest }}
|
- {{ portgroups.elasticsearch_rest }}
|
||||||
|
{% if TRUE_CLUSTER %}
|
||||||
|
search_node:
|
||||||
|
portgroups:
|
||||||
|
- {{ portgroups.elasticsearch_node }}
|
||||||
|
{% endif %}
|
||||||
self:
|
self:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.syslog}}
|
- {{ portgroups.syslog}}
|
||||||
|
|||||||
@@ -1883,7 +1883,7 @@ set_initial_firewall_policy() {
|
|||||||
;;
|
;;
|
||||||
'HEAVYNODE')
|
'HEAVYNODE')
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall includehost sensor "$MAINIP"
|
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall includehost sensor "$MAINIP"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost search_node "$MAINIP"
|
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost heavy_node "$MAINIP"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh sensorstab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm" "$INTERFACE"
|
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh sensorstab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm" "$INTERFACE"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh nodestab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm"
|
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh nodestab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm"
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user