33 lines
864 B
Bash
33 lines
864 B
Bash
|
#!/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}"
|