Update Registry to unpack new repo

This commit is contained in:
Mike Reeves
2020-01-23 10:45:08 -05:00
parent 71edddd846
commit 2c619db6ad
3 changed files with 32 additions and 16 deletions

View File

@@ -7,7 +7,6 @@ TARBALL=/nsm/docker-registry/docker/so-dockers-$VERSION.tar
if [ -f "$TARBALL" ]; then if [ -f "$TARBALL" ]; then
cd /nsm/docker-registry/docker cd /nsm/docker-registry/docker
tar xvf so-dockers-$VERSION.tar tar xvf so-dockers-$VERSION.tar
rm $TARBALL
else else
exit exit
fi fi

View File

@@ -26,6 +26,16 @@ 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
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:

View File

@@ -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-1.1.4.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
} }