mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add new tabs and core count
This commit is contained in:
@@ -5,20 +5,23 @@
|
|||||||
TYPE=$1
|
TYPE=$1
|
||||||
NAME=$2
|
NAME=$2
|
||||||
IPADDRESS=$3
|
IPADDRESS=$3
|
||||||
MANINT=$4
|
CPUS=$4
|
||||||
MONINT=$5
|
MANINT=$5
|
||||||
|
MONINT=$6
|
||||||
|
|
||||||
|
|
||||||
if grep -q $IPADDRESS "/opt/so/saltstack/pillar/data/$1.sls"; then
|
if grep -q $IPADDRESS "/opt/so/saltstack/pillar/data/$1.sls"; then
|
||||||
echo "Node Already Present"
|
echo "Node Already Present"
|
||||||
else
|
else
|
||||||
echo " $NAME:" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " $NAME:" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
echo " ip: $IPADDRESS" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " ip: $IPADDRESS" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
if [ $TYPE == 'sensorstab' ]; then
|
|
||||||
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
|
echo " totalcpus: $CPUS"
|
||||||
|
if [ $TYPE == 'sensorstab' ]; then
|
||||||
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
fi
|
fi
|
||||||
if [ $TYPE == 'nodestab' ]; then
|
if [ $TYPE == 'evaltab' ]; then
|
||||||
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
fi
|
fi
|
||||||
|
|
||||||
salt-call state.apply common
|
salt-call state.apply common
|
||||||
|
|||||||
@@ -727,6 +727,7 @@ set_initial_firewall_policy() {
|
|||||||
if [ $INSTALLTYPE == 'MASTERONLY' ]; then
|
if [ $INSTALLTYPE == 'MASTERONLY' ]; then
|
||||||
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/minions.sls
|
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/minions.sls
|
||||||
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/masterfw.sls
|
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/masterfw.sls
|
||||||
|
/opt/so/saltstack/pillar/data/addtotab.sh mastertab $HOSTNAME $MAINIP $CPUCORES $MAININT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $INSTALLTYPE == 'EVALMODE' ]; then
|
if [ $INSTALLTYPE == 'EVALMODE' ]; then
|
||||||
@@ -734,18 +735,19 @@ set_initial_firewall_policy() {
|
|||||||
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/masterfw.sls
|
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/masterfw.sls
|
||||||
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/forward_nodes.sls
|
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/forward_nodes.sls
|
||||||
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/storage_nodes.sls
|
printf " - $MAINIP\n" >> /opt/so/saltstack/pillar/firewall/storage_nodes.sls
|
||||||
|
/opt/so/saltstack/pillar/data/addtotab.sh sensorstab $HOSTNAME $MAINIP $CPUCORES $MAININT bond0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $INSTALLTYPE == 'SENSORONLY' ]; then
|
if [ $INSTALLTYPE == 'SENSORONLY' ]; then
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh forward_nodes $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh forward_nodes $MAINIP
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh sensorstab $HOSTNAME $MAINIP $MAININT bond0
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh sensorstab $HOSTNAME $MAINIP $CPUCORES $MAININT bond0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
|
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh storage_nodes $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh storage_nodes $MAINIP
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh nodestab $HOSTNAME $MAINIP $MAININT
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh nodestab $HOSTNAME $MAINIP $CPUCORES $MAININT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
|
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user