laconic-network-bootstrap/scripts/01-pull-stack-images.sh
2024-07-08 06:22:16 -06:00

33 lines
864 B
Bash
Executable File

#!/usr/bin/env bash
# Pull stack images for mainnet-laconic
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/lib.sh
usage="Usage: $0 <machine-name-prefix> <image-registry-user> <image-registry-token>"
if [[ -n "$1" ]]; then
machine_name_prefix=$1
else
echo ${usage}
exit 1
fi
if [[ -n "$2" ]]; then
image_registry_user=$2
else
echo ${usage}
exit 1
fi
if [[ -n "$3" ]]; then
image_registry_token=$3
else
echo ${usage}
exit 1
fi
registry_info="--image-registry git.vdb.to/cerc-io --registry-username ${image_registry_user} --registry-token ${image_registry_token}"
fetch_command="${so_command} --stack mainnet-laconic fetch-containers ${registry_info} --force-local-overwrite"
run_on_all_nodes ${machine_name_prefix} "${fetch_command}"