File tree 5 files changed +64
-3
lines changed
5 files changed +64
-3
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
2
+ # or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
3
+ # https://securityonion.net/license; you may not use this file except in compliance with the
4
+ # Elastic License 2.0.
5
+
6
+ {% from ' allowed_states.map.jinja' import allowed_states % }
7
+ {% if sls.split(' .' )[0 ] in allowed_states % }
8
+ {% from ' vars/globals.map.jinja' import GLOBALS % }
9
+
10
+ so- elasticsearch_image:
11
+ docker_image.present:
12
+ - name: {{ GLOBALS .registry_host }}:5000 / {{ GLOBALS .image_repo }}/ so- elasticsearch:{{ GLOBALS .so_version }}
13
+
14
+ {% else % }
15
+
16
+ {{sls}}_state_not_allowed:
17
+ test.fail_without_changes:
18
+ - name: {{sls}}_state_not_allowed
19
+
20
+ {% endif % }
Original file line number Diff line number Diff line change
1
+ # Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
2
+ # or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
3
+ # https://securityonion.net/license; you may not use this file except in compliance with the
4
+ # Elastic License 2.0.
5
+
6
+ {% from ' allowed_states.map.jinja' import allowed_states % }
7
+ {% if sls.split(' .' )[0 ] in allowed_states % }
8
+ {% from ' vars/globals.map.jinja' import GLOBALS % }
9
+
10
+ so- logstash_image:
11
+ docker_image.present:
12
+ - name: {{ GLOBALS .registry_host }}:5000 / {{ GLOBALS .image_repo }}/ so- logstash:{{ GLOBALS .so_version }}
13
+
14
+ {% else % }
15
+
16
+ {{sls}}_state_not_allowed:
17
+ test.fail_without_changes:
18
+ - name: {{sls}}_state_not_allowed
19
+
20
+ {% endif % }
Original file line number Diff line number Diff line change @@ -604,6 +604,10 @@ function updateMineAndApplyStates() {
604
604
# checkMine "network.ip_addrs"
605
605
# calls so-common and set_minionid sets MINIONID to local minion id
606
606
set_minionid
607
+ # if this is a searchnode or heavynode, start downloading logstash and elasticsearch containers while the manager prepares for the new node
608
+ if [[ " $NODETYPE " == " SEARCHNODE" || " $NODETYPE " == " HEAVYNODE" ]]; then
609
+ salt-run state.orch orch.container_download pillar=" {'setup': {'newnode': $MINION_ID }}" > /dev/null 2>&1 &
610
+ fi
607
611
# $MINIONID is the minion id of the manager and $MINION_ID is the target node or the node being configured
608
612
salt-run state.orch orch.deploy_newnode pillar=" {'setup': {'manager': $MINIONID , 'newnode': $MINION_ID }}" > /dev/null 2>&1 &
609
613
}
Original file line number Diff line number Diff line change
1
+ # Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
2
+ # or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
3
+ # https://securityonion.net/license; you may not use this file except in compliance with the
4
+ # Elastic License 2.0.
5
+
6
+ {% set NEWNODE = salt[' pillar.get' ](' setup:newnode' ) %}
7
+
8
+ {% if NEWNODE .split(' _' )| last in [' searchnode' , ' heavynode' ] %}
9
+ {{NEWNODE }}_download_logstash_elasticsearch:
10
+ salt.state :
11
+ - tgt: {{ NEWNODE }}
12
+ - sls:
13
+ - repo.client
14
+ - docker
15
+ - logstash.download
16
+ - elasticsearch.download
17
+ {% endif %}
Original file line number Diff line number Diff line change @@ -144,13 +144,13 @@ base:
144
144
145
145
' *_searchnode and G@saltversion:{{saltversion }}' :
146
146
- match: compound
147
+ - firewall
147
148
- ssl
149
+ - elasticsearch
150
+ - logstash
148
151
- sensoroni
149
152
- telegraf
150
153
- nginx
151
- - firewall
152
- - elasticsearch
153
- - logstash
154
154
- elasticfleet.install_agent_grid
155
155
- stig
156
156
You can’t perform that action at this time.
0 commit comments