SKIP proj provis if is DEPLOYMENT_STRING is null
This commit is contained in:
parent
f8d6d2acfc
commit
8780f9e908
@ -40,57 +40,60 @@ fi
|
|||||||
|
|
||||||
source "$REMOTE_DEFINITION"
|
source "$REMOTE_DEFINITION"
|
||||||
|
|
||||||
# ensure our projects are provisioned according to DEPLOYMENT_STRING
|
# let's provision the projects if specified in the remote.conf file.
|
||||||
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
# we assume projects are created EXTERNALLY to sovereign-stack when DEPLOYMENT_STRING is null.
|
||||||
NO_PARENS="${PROJECT_CHAIN:1:${#PROJECT_CHAIN}-2}"
|
if [ -n "$DEPLOYMENT_STRING" ]; then
|
||||||
PROJECT_PREFIX=$(echo "$NO_PARENS" | cut -d'|' -f1)
|
# ensure our projects are provisioned according to DEPLOYMENT_STRING
|
||||||
BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
|
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
||||||
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN"
|
NO_PARENS="${PROJECT_CHAIN:1:${#PROJECT_CHAIN}-2}"
|
||||||
|
PROJECT_PREFIX=$(echo "$NO_PARENS" | cut -d'|' -f1)
|
||||||
|
BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
|
||||||
|
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN"
|
||||||
|
|
||||||
# create the lxc project as specified by PROJECT_NAME
|
# create the lxc project as specified by PROJECT_NAME
|
||||||
if ! lxc project list | grep -q "$PROJECT_NAME"; then
|
if ! lxc project list | grep -q "$PROJECT_NAME"; then
|
||||||
lxc project create "$PROJECT_NAME"
|
lxc project create "$PROJECT_NAME"
|
||||||
lxc project set "$PROJECT_NAME" features.networks=true features.images=false features.storage.volumes=true
|
lxc project set "$PROJECT_NAME" features.networks=true features.images=false features.storage.volumes=true
|
||||||
lxc project switch "$PROJECT_NAME"
|
lxc project switch "$PROJECT_NAME"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# default values are already at regtest mode.
|
# default values are already at regtest mode.
|
||||||
if [ "$BITCOIN_CHAIN" = testnet ]; then
|
if [ "$BITCOIN_CHAIN" = testnet ]; then
|
||||||
|
|
||||||
WWW_SSDATA_DISK_SIZE_GB=30
|
WWW_SSDATA_DISK_SIZE_GB=30
|
||||||
WWW_BACKUP_DISK_SIZE_GB=30
|
WWW_BACKUP_DISK_SIZE_GB=30
|
||||||
WWW_DOCKER_DISK_SIZE_GB=50
|
WWW_DOCKER_DISK_SIZE_GB=50
|
||||||
|
|
||||||
BTCPAYSERVER_SSDATA_DISK_SIZE_GB=30
|
BTCPAYSERVER_SSDATA_DISK_SIZE_GB=30
|
||||||
BTCPAYSERVER_BACKUP_DISK_SIZE_GB=30
|
BTCPAYSERVER_BACKUP_DISK_SIZE_GB=30
|
||||||
BTCPAYSERVER_DOCKER_DISK_SIZE_GB=100
|
BTCPAYSERVER_DOCKER_DISK_SIZE_GB=100
|
||||||
|
|
||||||
LNPLAY_SERVER_SSDATA_DISK_SIZE_GB=20
|
LNPLAY_SERVER_SSDATA_DISK_SIZE_GB=20
|
||||||
LNPLAY_SERVER_BACKUP_DISK_SIZE_GB=20
|
LNPLAY_SERVER_BACKUP_DISK_SIZE_GB=20
|
||||||
LNPLAY_SSERVER_DOCKER_DISK_SIZE_GB=20
|
LNPLAY_SSERVER_DOCKER_DISK_SIZE_GB=20
|
||||||
|
|
||||||
elif [ "$BITCOIN_CHAIN" = mainnet ]; then
|
elif [ "$BITCOIN_CHAIN" = mainnet ]; then
|
||||||
|
|
||||||
WWW_SSDATA_DISK_SIZE_GB=40
|
WWW_SSDATA_DISK_SIZE_GB=40
|
||||||
WWW_BACKUP_DISK_SIZE_GB=40
|
WWW_BACKUP_DISK_SIZE_GB=40
|
||||||
WWW_DOCKER_DISK_SIZE_GB=1000
|
WWW_DOCKER_DISK_SIZE_GB=1000
|
||||||
|
|
||||||
BTCPAYSERVER_SSDATA_DISK_SIZE_GB=30
|
BTCPAYSERVER_SSDATA_DISK_SIZE_GB=30
|
||||||
BTCPAYSERVER_BACKUP_DISK_SIZE_GB=30
|
BTCPAYSERVER_BACKUP_DISK_SIZE_GB=30
|
||||||
BTCPAYSERVER_DOCKER_DISK_SIZE_GB=500
|
BTCPAYSERVER_DOCKER_DISK_SIZE_GB=500
|
||||||
|
|
||||||
LNPLAY_SERVER_SSDATA_DISK_SIZE_GB=20
|
LNPLAY_SERVER_SSDATA_DISK_SIZE_GB=20
|
||||||
LNPLAY_SERVER_BACKUP_DISK_SIZE_GB=20
|
LNPLAY_SERVER_BACKUP_DISK_SIZE_GB=20
|
||||||
LNPLAY_SSERVER_DOCKER_DISK_SIZE_GB=400
|
LNPLAY_SSERVER_DOCKER_DISK_SIZE_GB=400
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export WWW_SSDATA_DISK_SIZE_GB="$WWW_SSDATA_DISK_SIZE_GB"
|
export WWW_SSDATA_DISK_SIZE_GB="$WWW_SSDATA_DISK_SIZE_GB"
|
||||||
export WWW_BACKUP_DISK_SIZE_GB="$WWW_BACKUP_DISK_SIZE_GB"
|
export WWW_BACKUP_DISK_SIZE_GB="$WWW_BACKUP_DISK_SIZE_GB"
|
||||||
export WWW_DOCKER_DISK_SIZE_GB="$WWW_DOCKER_DISK_SIZE_GB"
|
export WWW_DOCKER_DISK_SIZE_GB="$WWW_DOCKER_DISK_SIZE_GB"
|
||||||
|
|
||||||
export BTCPAYSERVER_SSDATA_DISK_SIZE_GB="$BTCPAYSERVER_SSDATA_DISK_SIZE_GB"
|
export BTCPAYSERVER_SSDATA_DISK_SIZE_GB="$BTCPAYSERVER_SSDATA_DISK_SIZE_GB"
|
||||||
export BTCPAYSERVER_BACKUP_DISK_SIZE_GB="$BTCPAYSERVER_BACKUP_DISK_SIZE_GB"
|
export BTCPAYSERVER_BACKUP_DISK_SIZE_GB="$BTCPAYSERVER_BACKUP_DISK_SIZE_GB"
|
||||||
export BTCPAYSERVER_DOCKER_DISK_SIZE_GB="$BTCPAYSERVER_DOCKER_DISK_SIZE_GB"
|
export BTCPAYSERVER_DOCKER_DISK_SIZE_GB="$BTCPAYSERVER_DOCKER_DISK_SIZE_GB"
|
||||||
|
|
||||||
done
|
|
||||||
|
@ -153,7 +153,7 @@ fi
|
|||||||
export REMOTE_DEFINITION="$REMOTE_DEFINITION"
|
export REMOTE_DEFINITION="$REMOTE_DEFINITION"
|
||||||
source "$REMOTE_DEFINITION"
|
source "$REMOTE_DEFINITION"
|
||||||
export LXD_REMOTE_PASSWORD="$LXD_REMOTE_PASSWORD"
|
export LXD_REMOTE_PASSWORD="$LXD_REMOTE_PASSWORD"
|
||||||
export DEPLOYMENT_STRING="$DEPLOYMENT_STRING"
|
|
||||||
|
|
||||||
# this is our password generation mechanism. Relying on GPG for secure password generation
|
# this is our password generation mechanism. Relying on GPG for secure password generation
|
||||||
function new_pass {
|
function new_pass {
|
||||||
|
Loading…
Reference in New Issue
Block a user