mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
orchestate searchnode deployment
This commit is contained in:
@@ -613,11 +613,14 @@ function updateMineAndApplyStates() {
|
|||||||
if [[ "$NODETYPE" == "SEARCHNODE" || "$NODETYPE" == "HEAVYNODE" ]]; then
|
if [[ "$NODETYPE" == "SEARCHNODE" || "$NODETYPE" == "HEAVYNODE" ]]; then
|
||||||
# calls so-common and set_minionid sets MINIONID to local minion id
|
# calls so-common and set_minionid sets MINIONID to local minion id
|
||||||
set_minionid
|
set_minionid
|
||||||
salt $MINIONID state.apply elasticsearch queue=True --async
|
#salt $MINIONID state.apply elasticsearch queue=True --async
|
||||||
salt $MINIONID state.apply soc queue=True --async
|
# salt $MINIONID state.apply soc queue=True --async
|
||||||
|
# $MINIONID is the minion id of the manager and $MINION_ID is the target node or the node being configured
|
||||||
|
salt-run state.orch orch.deploy_searchnode pillar="{'setup': {'manager': $MINIONID, 'searchnode': $MINION_ID }}"
|
||||||
|
else
|
||||||
|
# run this async so the cli doesn't wait for a return
|
||||||
|
salt "$MINION_ID" state.highstate --async queue=True
|
||||||
fi
|
fi
|
||||||
# run this async so the cli doesn't wait for a return
|
|
||||||
salt "$MINION_ID" state.highstate --async queue=True
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupMinionFiles() {
|
function setupMinionFiles() {
|
||||||
|
|||||||
16
salt/orch/deploy_searchnode.sls
Normal file
16
salt/orch/deploy_searchnode.sls
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{% set MANAGER = salt['pillar.get']('setup:manager') %}
|
||||||
|
{% set SEARCHNODE = salt['pillar.get']('setup:searchnode') %}
|
||||||
|
|
||||||
|
manager_run_es_soc:
|
||||||
|
salt.state:
|
||||||
|
- tgt: {{ MANAGER }}
|
||||||
|
- sls:
|
||||||
|
- elasticsearch
|
||||||
|
- soc
|
||||||
|
|
||||||
|
searchnode_run_highstate:
|
||||||
|
salt.state:
|
||||||
|
- tgt: {{ TARGET }}
|
||||||
|
- highstate: True
|
||||||
|
- require:
|
||||||
|
- salt: manager_run_es_soc
|
||||||
Reference in New Issue
Block a user