Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 04_setup_ironic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ for IMAGE_VAR in $(env | grep "_LOCAL_IMAGE=" | grep -o "^[^=]*") ; do
[ -e "$REPOPATH" ] || git clone $IMAGE $REPOPATH
cd $REPOPATH
export $IMAGE_VAR=${IMAGE##*/}:latest
export $IMAGE_VAR=192.168.111.1:5000/localimages/${!IMAGE_VAR}
export $IMAGE_VAR=$LOCAL_REGISTRY_ADDRESS/localimages/${!IMAGE_VAR}
sudo podman build -t ${!IMAGE_VAR} .
cd -
sudo podman push --tls-verify=false ${!IMAGE_VAR} ${!IMAGE_VAR}
fi

# Update the bootstrap and master nodes to treat 192.168.111.1:5000 as insecure
# Update the bootstrap and master nodes to treat LOCAL_REGISTRY_ADDRESS as insecure
mkdir -p $OPENSHIFT_INSTALL_PATH/data/data/bootstrap/baremetal/files/etc/containers
echo -e "[registries.insecure]\nregistries = ['192.168.111.1:5000']" > $OPENSHIFT_INSTALL_PATH/data/data/bootstrap/baremetal/files/etc/containers/registries.conf
echo -e "[registries.insecure]\nregistries = ['${LOCAL_REGISTRY_ADDRESS}']" > $OPENSHIFT_INSTALL_PATH/data/data/bootstrap/baremetal/files/etc/containers/registries.conf
cp assets/templates/99_local-registry.yaml.optional assets/templates/99_local-registry.yaml

IMAGE_NAME=$(echo ${IMAGE_VAR/_LOCAL_IMAGE} | tr '[:upper:]_' '[:lower:]-')
Expand Down Expand Up @@ -78,7 +78,7 @@ IRONIC_IPA_DOWNLOADER_IMAGE=${IRONIC_IPA_DOWNLOADER_LOCAL_IMAGE:-$IRONIC_IPA_DOW
IRONIC_RHCOS_DOWNLOADER_IMAGE=${IRONIC_RHCOS_DOWNLOADER_LOCAL_IMAGE:-$IRONIC_RHCOS_DOWNLOADER_IMAGE}

for IMAGE in ${IRONIC_IMAGE} ${IRONIC_IPA_DOWNLOADER_IMAGE} ${IRONIC_RHCOS_DOWNLOADER_IMAGE} ${VBMC_IMAGE} ${SUSHY_TOOLS_IMAGE} ; do
sudo -E podman pull $([[ $IMAGE =~ 192.168.111.1:5000.* ]] && echo "--tls-verify=false" ) $IMAGE
sudo -E podman pull $([[ $IMAGE =~ $LOCAL_REGISTRY_ADDRESS.* ]] && echo "--tls-verify=false" ) $IMAGE
done

rm -rf $REGISTRY_AUTH_FILE
Expand Down
4 changes: 3 additions & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ if [ -z "${CONFIG:-}" ]; then
fi
source $CONFIG

export LOCAL_REGISTRY_ADDRESS=${LOCAL_REGISTRY_ADDRESS:-"192.168.111.1:5000"}

#
# See https://openshift-release.svc.ci.openshift.org for release details
#
Expand Down Expand Up @@ -78,7 +80,7 @@ fi

if env | grep -q "_LOCAL_IMAGE=" ; then
# We're going to be using a locally modified release image
export OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE="192.168.111.1:5000/localimages/local-release-image:latest"
export OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE="${LOCAL_REGISTRY_ADDRESS}/localimages/local-release-image:latest"
fi

# Set variables
Expand Down
2 changes: 2 additions & 0 deletions config_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ set -x

# Name of branch in the above repo which contains the custom MAO changes
#export MAO_BRANCH="mao-fix"

#export LOCAL_REGISTRY_ADDRESS="192.168.111.1:5000"