mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
SO Setup - Add new docker instlal section
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
analyst:
|
analyst:
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
beats_endpoint:
|
beats_endpoint:
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
forward_nodes:
|
forward_nodes:
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
|
|
||||||
|
|||||||
2
pillar/firewall/storage_nodes.sls
Normal file
2
pillar/firewall/storage_nodes.sls
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
storage_nodes:
|
||||||
|
- 127.0.0.1
|
||||||
@@ -423,25 +423,29 @@ saltify() {
|
|||||||
# Copy down the gpg keys and install them from the master
|
# Copy down the gpg keys and install them from the master
|
||||||
mkdir $TMP/gpg
|
mkdir $TMP/gpg
|
||||||
scp socore@$MSRV:/opt/so/gpg/* $TMP/gpg
|
scp socore@$MSRV:/opt/so/gpg/* $TMP/gpg
|
||||||
apt-key add $TMP/gpg/docker.pub
|
|
||||||
apt-key add $TMP/gpg/SALTSTACK-GPG-KEY.pub
|
apt-key add $TMP/gpg/SALTSTACK-GPG-KEY.pub
|
||||||
echo "deb http://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
|
echo "deb http://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
|
||||||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize the new repos
|
# Initialize the new repos
|
||||||
apt-get update >>~/sosetup.log 2>&1
|
apt-get update >>~/sosetup.log 2>&1
|
||||||
apt-get -y install salt-minion docker-ce python-m2crypto >>~/sosetup.log 2>&1
|
apt-get -y install salt-minion python-m2crypto >>~/sosetup.log 2>&1
|
||||||
docker_registry
|
|
||||||
echo "Restarting Docker"
|
|
||||||
systemctl restart docker
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
docker_install() {
|
||||||
|
apt-key add $TMP/gpg/docker.pub
|
||||||
|
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
|
apt-get update >>~/sosetup.log 2>&1
|
||||||
|
apt-get -y install docker-ce >>~/sosetup.log 2>&1
|
||||||
|
docker_registry
|
||||||
|
echo "Restarting Docker"
|
||||||
|
systemctl restart docker
|
||||||
|
}
|
||||||
|
|
||||||
salt_firstcheckin() {
|
salt_firstcheckin() {
|
||||||
|
|
||||||
#First Checkin
|
#First Checkin
|
||||||
@@ -542,7 +546,8 @@ set_initial_firewall_policy() {
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
|
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
|
||||||
echo "blah"
|
ssh -i ~/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
||||||
|
ssh -i ~/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh storage_nodes $MAINIP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
|
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
|
||||||
@@ -961,6 +966,7 @@ if (whiptail_you_sure); then
|
|||||||
# Install salt and dependencies
|
# Install salt and dependencies
|
||||||
echo " ** Installing Salt and Dependencies **"
|
echo " ** Installing Salt and Dependencies **"
|
||||||
saltify >>~/sosetup.log 2>&1
|
saltify >>~/sosetup.log 2>&1
|
||||||
|
docker_install
|
||||||
# Configure the Minion
|
# Configure the Minion
|
||||||
echo " ** Configuring Minion **"
|
echo " ** Configuring Minion **"
|
||||||
configure_minion master >>~/sosetup.log 2>&1
|
configure_minion master >>~/sosetup.log 2>&1
|
||||||
@@ -1017,6 +1023,7 @@ if (whiptail_you_sure); then
|
|||||||
sensor_pillar
|
sensor_pillar
|
||||||
create_bond
|
create_bond
|
||||||
saltify
|
saltify
|
||||||
|
docker_install
|
||||||
configure_minion SENSOR
|
configure_minion SENSOR
|
||||||
copy_minion_pillar sensors
|
copy_minion_pillar sensors
|
||||||
salt_firstcheckin
|
salt_firstcheckin
|
||||||
@@ -1041,6 +1048,7 @@ if (whiptail_you_sure); then
|
|||||||
copy_ssh_key
|
copy_ssh_key
|
||||||
create_bond
|
create_bond
|
||||||
saltify
|
saltify
|
||||||
|
docker_install
|
||||||
configure_minion sensor
|
configure_minion sensor
|
||||||
copy_minion_pillar sensors
|
copy_minion_pillar sensors
|
||||||
salt_firstcheckin
|
salt_firstcheckin
|
||||||
@@ -1071,7 +1079,9 @@ if (whiptail_you_sure); then
|
|||||||
LSINPUTBATCHCOUNT=125
|
LSINPUTBATCHCOUNT=125
|
||||||
fi
|
fi
|
||||||
copy_ssh_key
|
copy_ssh_key
|
||||||
|
set_initial_firewall_policy
|
||||||
saltify
|
saltify
|
||||||
|
docker_install
|
||||||
configure_minion node
|
configure_minion node
|
||||||
set_node_type
|
set_node_type
|
||||||
node_pillar
|
node_pillar
|
||||||
|
|||||||
Reference in New Issue
Block a user