mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
update so-functions to handle STANDALONE mode - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/140
This commit is contained in:
@@ -408,7 +408,7 @@ copy_master_config() {
|
|||||||
|
|
||||||
copy_minion_tmp_files() {
|
copy_minion_tmp_files() {
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'MASTER' | 'EVAL' | 'HELIXSENSOR' | 'MASTERSEARCH')
|
'MASTER' | 'EVAL' | 'HELIXSENSOR' | 'MASTERSEARCH' | 'STANDALONE')
|
||||||
echo "Copying pillar and salt files in $temp_install_dir to /opt/so/saltstack"
|
echo "Copying pillar and salt files in $temp_install_dir to /opt/so/saltstack"
|
||||||
cp -Rv "$temp_install_dir"/pillar/ /opt/so/saltstack/ >> "$setup_log" 2>&1
|
cp -Rv "$temp_install_dir"/pillar/ /opt/so/saltstack/ >> "$setup_log" 2>&1
|
||||||
if [ -d "$temp_install_dir"/salt ] ; then
|
if [ -d "$temp_install_dir"/salt ] ; then
|
||||||
@@ -767,7 +767,7 @@ got_root() {
|
|||||||
get_minion_type() {
|
get_minion_type() {
|
||||||
local minion_type
|
local minion_type
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'EVAL' | 'MASTERSEARCH' | 'MASTER' | 'SENSOR' | 'HEAVYNODE' | 'FLEET')
|
'EVAL' | 'MASTERSEARCH' | 'MASTER' | 'SENSOR' | 'HEAVYNODE' | 'FLEET' | 'STANDALONE')
|
||||||
minion_type=$(echo "$install_type" | tr '[:upper:]' '[:lower:]')
|
minion_type=$(echo "$install_type" | tr '[:upper:]' '[:lower:]')
|
||||||
;;
|
;;
|
||||||
'HELIXSENSOR')
|
'HELIXSENSOR')
|
||||||
@@ -803,7 +803,7 @@ master_pillar() {
|
|||||||
" freq: 0"\
|
" freq: 0"\
|
||||||
" domainstats: 0" >> "$pillar_file"
|
" domainstats: 0" >> "$pillar_file"
|
||||||
|
|
||||||
if [ "$install_type" = 'EVAL' ] || [ "$install_type" = 'HELIXSENSOR' ] || [ "$install_type" = 'MASTERSEARCH' ]; then
|
if [ "$install_type" = 'EVAL' ] || [ "$install_type" = 'HELIXSENSOR' ] || [ "$install_type" = 'MASTERSEARCH' ] || [ "$install_type" = 'STANDALONE' ]; then
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
" ls_pipeline_batch_size: 125"\
|
" ls_pipeline_batch_size: 125"\
|
||||||
" ls_input_threads: 1"\
|
" ls_input_threads: 1"\
|
||||||
@@ -1093,7 +1093,7 @@ saltify() {
|
|||||||
'FLEET')
|
'FLEET')
|
||||||
if [ "$OSVER" != 'xenial' ]; then apt-get -y install python3-mysqldb >> "$setup_log" 2>&1; else apt-get -y install python-mysqldb >> "$setup_log" 2>&1; fi
|
if [ "$OSVER" != 'xenial' ]; then apt-get -y install python3-mysqldb >> "$setup_log" 2>&1; else apt-get -y install python-mysqldb >> "$setup_log" 2>&1; fi
|
||||||
;;
|
;;
|
||||||
'MASTER' | 'EVAL' | 'MASTERSEARCH') # TODO: should this also be HELIXSENSOR?
|
'MASTER' | 'EVAL' | 'MASTERSEARCH' | 'STANDALONE') # TODO: should this also be HELIXSENSOR?
|
||||||
if [ "$OSVER" != "xenial" ]; then local py_ver_url_path="/py3"; else local py_ver_url_path="/apt"; fi
|
if [ "$OSVER" != "xenial" ]; then local py_ver_url_path="/py3"; else local py_ver_url_path="/apt"; fi
|
||||||
|
|
||||||
# Add saltstack repo(s)
|
# Add saltstack repo(s)
|
||||||
@@ -1151,7 +1151,7 @@ saltify() {
|
|||||||
salt_checkin() {
|
salt_checkin() {
|
||||||
|
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'MASTER' | 'EVAL' | 'HELIXSENSOR' | 'MASTERSEARCH') # Fix Mine usage
|
'MASTER' | 'EVAL' | 'HELIXSENSOR' | 'MASTERSEARCH' | 'STANDALONE') # Fix Mine usage
|
||||||
{
|
{
|
||||||
echo "Building Certificate Authority";
|
echo "Building Certificate Authority";
|
||||||
salt-call state.apply ca;
|
salt-call state.apply ca;
|
||||||
@@ -1282,7 +1282,7 @@ set_hostname() {
|
|||||||
|
|
||||||
set_hostname_iso
|
set_hostname_iso
|
||||||
|
|
||||||
if [[ ! $install_type =~ ^(MASTER|EVAL|HELIXSENSOR|MASTERSEARCH)$ ]]; then
|
if [[ ! $install_type =~ ^(MASTER|EVAL|HELIXSENSOR|MASTERSEARCH|STANDALONE)$ ]]; then
|
||||||
if ! getent hosts "$MSRV"; then
|
if ! getent hosts "$MSRV"; then
|
||||||
echo "$MSRVIP $MSRV" >> /etc/hosts
|
echo "$MSRVIP $MSRV" >> /etc/hosts
|
||||||
fi
|
fi
|
||||||
@@ -1384,7 +1384,7 @@ set_management_interface() {
|
|||||||
set_node_type() {
|
set_node_type() {
|
||||||
|
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'SEARCHNODE' | 'EVAL' | 'MASTERSEARCH' | 'HEAVYNODE')
|
'SEARCHNODE' | 'EVAL' | 'MASTERSEARCH' | 'HEAVYNODE' | 'STANDALONE')
|
||||||
NODETYPE='search'
|
NODETYPE='search'
|
||||||
;;
|
;;
|
||||||
'PARSINGNODE')
|
'PARSINGNODE')
|
||||||
@@ -1450,7 +1450,7 @@ ls_heapsize() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'MASTERSEARCH' | 'HEAVYNODE' | 'HELIXSENSOR')
|
'MASTERSEARCH' | 'HEAVYNODE' | 'HELIXSENSOR' | 'STANDALONE')
|
||||||
LS_HEAP_SIZE='1000m'
|
LS_HEAP_SIZE='1000m'
|
||||||
;;
|
;;
|
||||||
'EVAL')
|
'EVAL')
|
||||||
@@ -1462,7 +1462,7 @@ ls_heapsize() {
|
|||||||
esac
|
esac
|
||||||
export LS_HEAP_SIZE
|
export LS_HEAP_SIZE
|
||||||
|
|
||||||
if [[ "$install_type" =~ ^(EVAL|MASTERSEARCH)$ ]]; then
|
if [[ "$install_type" =~ ^(EVAL|MASTERSEARCH|STANDALONE)$ ]]; then
|
||||||
NODE_LS_HEAP_SIZE=LS_HEAP_SIZE
|
NODE_LS_HEAP_SIZE=LS_HEAP_SIZE
|
||||||
export NODE_LS_HEAP_SIZE
|
export NODE_LS_HEAP_SIZE
|
||||||
fi
|
fi
|
||||||
@@ -1484,7 +1484,7 @@ es_heapsize() {
|
|||||||
fi
|
fi
|
||||||
export ES_HEAP_SIZE
|
export ES_HEAP_SIZE
|
||||||
|
|
||||||
if [[ "$install_type" =~ ^(EVAL|MASTERSEARCH)$ ]]; then
|
if [[ "$install_type" =~ ^(EVAL|MASTERSEARCH|STANDALONE)$ ]]; then
|
||||||
NODE_ES_HEAP_SIZE=ES_HEAP_SIZE
|
NODE_ES_HEAP_SIZE=ES_HEAP_SIZE
|
||||||
export NODE_ES_HEAP_SIZE
|
export NODE_ES_HEAP_SIZE
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user