1
1
Fork 1

Updat elnplayserver control.

This commit is contained in:
Derek Smith 2023-11-02 18:04:28 -04:00
parent 65400e1dbd
commit 89009e52e5
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
3 changed files with 3 additions and 8 deletions

View File

@ -7,5 +7,5 @@ export BASE_LXC_IMAGE="ubuntu/$LXD_UBUNTU_BASE_VERSION/cloud"
WEEK_NUMBER=$(date +%U)
export UBUNTU_BASE_IMAGE_NAME="ss-ubuntu-${LXD_UBUNTU_BASE_VERSION//./-}"
export DOCKER_BASE_IMAGE_NAME="ss-docker-${LXD_UBUNTU_BASE_VERSION//./-}-$WEEK_NUMBER"
export LNPLAY_BASE_IMAGE_NAME="ss-lnplay-$WEEK_NUMBER"
export LNPLAY_BASE_IMAGE_NAME="ss-lnplay"
export LNPLAY_BASE_IMAGE_VM_NAME="$LNPLAY_BASE_IMAGE_NAME"

View File

@ -91,15 +91,10 @@ if ! lxc list --format csv | grep -q "$LXD_VM_NAME"; then
# lnplayserver uses a different base image, but that's ok.
BASE_IMAGE_NAME="$DOCKER_BASE_IMAGE_NAME"
if [ "$VIRTUAL_MACHINE" = lnplayserver ]; then
if [ "$VIRTUAL_MACHINE" = lnplayserver ] && lxc image list -q --format csv | grep -q "$LNPLAY_BASE_IMAGE_NAME,"; then
BASE_IMAGE_NAME="$LNPLAY_BASE_IMAGE_NAME"
fi
if ! lxc image list -q --format csv | grep -q "$BASE_IMAGE_NAME"; then
echo "ERROR: The base image does not exist: $BASE_IMAGE_NAME"
exit 1
fi
script -q -f /tmp/ss/typescript -c "lxc init -q $BASE_IMAGE_NAME $LXD_VM_NAME --vm --profile=$LXD_VM_NAME" >> /dev/null
# let's PIN the HW address for now so we don't exhaust IP

View File

@ -486,7 +486,7 @@ EOL
bash -c "./project/lnplay/up.sh -y --env-file=$LNPLAY_ENV_FILE_PATH --no-services"
# if we've just finished provisioning the first slot, then we take it down and get snapshots.
if [[ "$LXD_VM_NAME" == "008slot0"* ]] && ! lxc image list -q --format csv | grep -q "$LNPLAY_BASE_IMAGE_NAME"; then
if ! lxc image list -q --format csv | grep -q "$LNPLAY_BASE_IMAGE_NAME"; then
# we'll stop it
lxc stop "$LXD_VM_NAME"