mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #243 from Security-Onion-Solutions/feature/isoregistry
Feature/isoregistry
This commit is contained in:
12
salt/registry/bin/so-buildregistry
Normal file
12
salt/registry/bin/so-buildregistry
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION=HH1.1.4
|
||||||
|
TARBALL=/nsm/docker-registry/docker/so-dockers-$VERSION.tar
|
||||||
|
|
||||||
|
# See if the tarball is there. If so do soemthing otherwise peace out.
|
||||||
|
if [ -f "$TARBALL" ]; then
|
||||||
|
cd /nsm/docker-registry/docker
|
||||||
|
tar xvf so-dockers-$VERSION.tar
|
||||||
|
else
|
||||||
|
exit
|
||||||
|
fi
|
||||||
@@ -26,6 +26,17 @@ dockerregistryconf:
|
|||||||
- name: /opt/so/conf/docker-registry/etc/config.yml
|
- name: /opt/so/conf/docker-registry/etc/config.yml
|
||||||
- source: salt://registry/etc/config.yml
|
- source: salt://registry/etc/config.yml
|
||||||
|
|
||||||
|
# Copy the registry script
|
||||||
|
dockerregistrybuild:
|
||||||
|
file.managed:
|
||||||
|
- name: /opt/so/conf/docker-registry/so-buildregistry
|
||||||
|
- source: salt://registry/bin/so-buildregistry
|
||||||
|
- mode: 755
|
||||||
|
|
||||||
|
dockerexpandregistry:
|
||||||
|
cmd.run:
|
||||||
|
- name: /opt/so/conf/docker-registry/so-buildregistry
|
||||||
|
|
||||||
# Install the registry container
|
# Install the registry container
|
||||||
so-dockerregistry:
|
so-dockerregistry:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
|
|||||||
@@ -457,6 +457,7 @@ docker_registry() {
|
|||||||
docker_seed_registry() {
|
docker_seed_registry() {
|
||||||
VERSION="HH1.1.4"
|
VERSION="HH1.1.4"
|
||||||
TRUSTED_CONTAINERS=( \
|
TRUSTED_CONTAINERS=( \
|
||||||
|
"so-acng:$VERSION" \
|
||||||
"so-auth-api:$VERSION" \
|
"so-auth-api:$VERSION" \
|
||||||
"so-auth-ui:$VERSION" \
|
"so-auth-ui:$VERSION" \
|
||||||
"so-core:$VERSION" \
|
"so-core:$VERSION" \
|
||||||
@@ -489,6 +490,8 @@ docker_seed_registry() {
|
|||||||
"so-wazuh:$VERSION" \
|
"so-wazuh:$VERSION" \
|
||||||
"so-zeek:$VERSION" )
|
"so-zeek:$VERSION" )
|
||||||
|
|
||||||
|
if [ ! -f /nsm/docker-registry/docker/so-dockers-$VERSION.tar ]; then
|
||||||
|
# Download the container from the interwebs
|
||||||
for i in "${TRUSTED_CONTAINERS[@]}"
|
for i in "${TRUSTED_CONTAINERS[@]}"
|
||||||
do
|
do
|
||||||
# Pull down the trusted docker image
|
# Pull down the trusted docker image
|
||||||
@@ -504,6 +507,10 @@ docker_seed_registry() {
|
|||||||
echo "Removing $i locally"
|
echo "Removing $i locally"
|
||||||
docker rmi soshybridhunter/$i
|
docker rmi soshybridhunter/$i
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
# We already have the goods son
|
||||||
|
rm /nsm/docker-registry/docker/so-dockers-$VERSION.tar
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user