orchestate searchnode deployment

This commit is contained in:
m0duspwnens
2024-05-02 16:32:43 -04:00
parent 240ffc0862
commit e9b1263249
2 changed files with 23 additions and 4 deletions

View File

@@ -613,11 +613,14 @@ function updateMineAndApplyStates() {
if [[ "$NODETYPE" == "SEARCHNODE" || "$NODETYPE" == "HEAVYNODE" ]]; then
# calls so-common and set_minionid sets MINIONID to local minion id
set_minionid
salt $MINIONID state.apply elasticsearch queue=True --async
salt $MINIONID state.apply soc queue=True --async
#salt $MINIONID state.apply elasticsearch 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
# run this async so the cli doesn't wait for a return
salt "$MINION_ID" state.highstate --async queue=True
}
function setupMinionFiles() {

View 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