predownload logstash and elastic for new searchnode and heavynode

This commit is contained in:
m0duspwnens
2024-05-07 10:13:51 -04:00
parent bdf1b45a07
commit dcc1f656ee
6 changed files with 86 additions and 3 deletions

View File

@@ -604,6 +604,10 @@ function updateMineAndApplyStates() {
#checkMine "network.ip_addrs"
# calls so-common and set_minionid sets MINIONID to local minion id
set_minionid
# if this is a searchnode or heavynode, start downloading logstash and elasticsearch containers while the manager prepares for the new node
if [[ "$NODETYPE" == "SEARCHNODE" || "$NODETYPE" == "HEAVYNODE" ]]; then
salt-run state.orch orch.container_download pillar="{'setup': {'newnode': $MINION_ID }}" > /dev/null 2>&1 &
fi
# $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_newnode pillar="{'setup': {'manager': $MINIONID, 'newnode': $MINION_ID }}" > /dev/null 2>&1 &
}