mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
orchit
This commit is contained in:
@@ -426,10 +426,6 @@ function checkMine() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateMine() {
|
|
||||||
retry 20 1 "salt '$MINION_ID' mine.update" True
|
|
||||||
}
|
|
||||||
|
|
||||||
function createEVAL() {
|
function createEVAL() {
|
||||||
is_pcaplimit=true
|
is_pcaplimit=true
|
||||||
pcapspace
|
pcapspace
|
||||||
@@ -604,23 +600,12 @@ function addMinion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateMineAndApplyStates() {
|
function updateMineAndApplyStates() {
|
||||||
# tell the minion to populate the mine with data from mine_functions which is populated during setup
|
|
||||||
# this only needs to happen on non managers since they handle this during setup
|
|
||||||
# and they need to wait for ca creation to update the mine
|
|
||||||
#updateMine
|
|
||||||
#checkMine "network.ip_addrs"
|
#checkMine "network.ip_addrs"
|
||||||
# apply the elasticsearch state to the manager if a new searchnode was added
|
# calls so-common and set_minionid sets MINIONID to local minion id
|
||||||
#if [[ "$NODETYPE" == "SEARCHNODE" || "$NODETYPE" == "HEAVYNODE" ]]; then
|
|
||||||
# calls so-common and set_minionid sets MINIONID to local minion id
|
|
||||||
set_minionid
|
set_minionid
|
||||||
#salt $MINIONID state.apply elasticsearch queue=True --async
|
# $MINIONID is the minion id of the manager and $MINION_ID is the target node or the node being configured
|
||||||
# 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_newnode pillar="{'setup': {'manager': $MINIONID, 'newnode': $MINION_ID }}"
|
salt-run state.orch orch.deploy_newnode pillar="{'setup': {'manager': $MINIONID, 'newnode': $MINION_ID }}"
|
||||||
#else
|
|
||||||
# run this async so the cli doesn't wait for a return
|
|
||||||
# salt "$MINION_ID" state.highstate --async queue=True
|
|
||||||
#fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupMinionFiles() {
|
function setupMinionFiles() {
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
{% set MANAGER = salt['pillar.get']('setup:manager') %}
|
{% set MANAGER = salt['pillar.get']('setup:manager') %}
|
||||||
{% set NEWNODE = salt['pillar.get']('setup:newnode') %}
|
{% set NEWNODE = salt['pillar.get']('setup:newnode') %}
|
||||||
|
|
||||||
|
# tell the minion to populate the mine with data from mine_functions which is populated during setup
|
||||||
|
# this only needs to happen on non managers since they handle this during setup
|
||||||
|
# and they need to wait for ca creation to update the mine
|
||||||
{{NEWNODE}}_update_mine:
|
{{NEWNODE}}_update_mine:
|
||||||
salt.function:
|
salt.function:
|
||||||
- name: mine.update
|
- name: mine.update
|
||||||
- tgt: {{ NEWNODE }}
|
- tgt: {{ NEWNODE }}
|
||||||
- retry:
|
- retry:
|
||||||
attempts: 24
|
attempts: 36
|
||||||
interval: 5
|
interval: 5
|
||||||
|
|
||||||
|
# we need to prepare the manager for a new searchnode or heavynode
|
||||||
{% if NEWNODE.split('_')|last in ['searchnode', 'heavynode'] %}
|
{% if NEWNODE.split('_')|last in ['searchnode', 'heavynode'] %}
|
||||||
manager_run_es_soc:
|
manager_run_es_soc:
|
||||||
salt.state:
|
salt.state:
|
||||||
|
|||||||
Reference in New Issue
Block a user