Compare commits
3 Commits
7512cbfd90
...
9d7d08b0ed
Author | SHA1 | Date |
---|---|---|
Derek Smith | 9d7d08b0ed | |
Derek Smith | 1eff32efed | |
Derek Smith | 3f30fa11e2 |
|
@ -80,7 +80,7 @@ else
|
|||
incus stop "$BASE_IMAGE_VM_NAME" --project default
|
||||
fi
|
||||
|
||||
incus snapshot "$BASE_IMAGE_VM_NAME" "$UBUNTU_BASE_IMAGE_NAME" --project default
|
||||
incus snapshot create "$BASE_IMAGE_VM_NAME" "$UBUNTU_BASE_IMAGE_NAME" --project default
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then
|
|||
DOCKER_DISK_SIZE_GB="$BTCPAYSERVER_DOCKER_DISK_SIZE_GB"
|
||||
fi
|
||||
|
||||
DOCKER_VOLUME_NAME="$PRIMARY_DOMAIN_IDENTIFIER-$VM_ID""d"
|
||||
DOCKER_VOLUME_NAME="$VIRTUAL_MACHINE-docker"
|
||||
if ! incus storage volume list ss-base | grep -q "$DOCKER_VOLUME_NAME"; then
|
||||
incus storage volume create ss-base "$DOCKER_VOLUME_NAME" --type=block
|
||||
fi
|
||||
|
@ -76,7 +76,7 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then
|
|||
# TODO ensure we are only GROWING the volume--never shrinking
|
||||
incus storage volume set ss-base "$DOCKER_VOLUME_NAME" size="${DOCKER_DISK_SIZE_GB}GB"
|
||||
|
||||
SSDATA_VOLUME_NAME="$PRIMARY_DOMAIN_IDENTIFIER-$VM_ID""s"
|
||||
SSDATA_VOLUME_NAME="$VIRTUAL_MACHINE-ss-data"
|
||||
if ! incus storage volume list ss-base | grep -q "$SSDATA_VOLUME_NAME"; then
|
||||
incus storage volume create ss-base "$SSDATA_VOLUME_NAME" --type=filesystem
|
||||
fi
|
||||
|
@ -85,7 +85,7 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then
|
|||
incus storage volume set ss-base "$SSDATA_VOLUME_NAME" size="${SSDATA_DISK_SIZE_GB}GB"
|
||||
|
||||
|
||||
BACKUP_VOLUME_NAME="$PRIMARY_DOMAIN_IDENTIFIER-$VM_ID""b"
|
||||
BACKUP_VOLUME_NAME="$VIRTUAL_MACHINE-backup"
|
||||
if ! incus storage volume list ss-base | grep -q "$BACKUP_VOLUME_NAME"; then
|
||||
incus storage volume create ss-base "$BACKUP_VOLUME_NAME" --type=filesystem
|
||||
fi
|
||||
|
|
|
@ -99,17 +99,10 @@ for VIRTUAL_MACHINE in $SERVERS; do
|
|||
fi
|
||||
|
||||
if [ "$KEEP_DOCKER_VOLUME" = false ]; then
|
||||
# destroy the docker volume
|
||||
VM_ID=w
|
||||
if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
|
||||
VM_ID="b"
|
||||
elif [ "$VIRTUAL_MACHINE" = lnplayserver ]; then
|
||||
VM_ID="c"
|
||||
fi
|
||||
|
||||
# d for docker; b for backup; s for ss-data
|
||||
for DATA in d b s; do
|
||||
VOLUME_NAME="$PRIMARY_DOMAIN_IDENTIFIER-$VM_ID""$DATA"
|
||||
for DATA in docker backup ss-data; do
|
||||
VOLUME_NAME="$VIRTUAL_MACHINE-$DATA"
|
||||
if incus storage volume list ss-base -q | grep -q "$VOLUME_NAME"; then
|
||||
RESPONSE=
|
||||
read -r -p "Are you sure you want to delete the '$VOLUME_NAME' volume intended for '$INCUS_VM_NAME'?": RESPONSE
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0f9f564b82862982d2726c8e8b016274e53e30aa
|
||||
Subproject commit 318e89afe5d6ba506cf97c719537d1ecb3583c46
|
Loading…
Reference in New Issue