1
1

Compare commits

...

3 Commits

Author SHA1 Message Date
f3137873f0
Update project head. 2024-02-11 20:31:35 -05:00
afcc6b5fec
Make LNPLAY server updates. 2024-02-11 20:31:27 -05:00
01c86c6ed0
Switch to using loop device instead of partition. 2024-02-11 20:14:38 -05:00
4 changed files with 10 additions and 34 deletions

View File

@ -80,10 +80,11 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then
bash -c "./stub_profile.sh --vm=$VIRTUAL_MACHINE --incus-hostname=$INCUS_VM_NAME --ss-volume-name=$SSDATA_VOLUME_NAME --backup-volume-name=$BACKUP_VOLUME_NAME"
if ! incus image list -q --format csv | grep -q "$INCUS_VM_NAME"; then
INCUS_LNPLAYSERVER_IMAGE_NAME="lnplayserver-$DOMAIN_NAME"
if ! incus image list -q --format csv | grep -q "$INCUS_LNPLAYSERVER_IMAGE_NAME"; then
script -q -c "incus init -q $DOCKER_BASE_IMAGE_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
elif [ "$VIRTUAL_MACHINE" = lnplayserver ]; then
script -q -c "incus init -q $INCUS_VM_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
script -q -c "incus init -q $INCUS_LNPLAYSERVER_IMAGE_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
fi
# let's PIN the HW address for now so we don't exhaust IP

@ -1 +1 @@
Subproject commit c07682def000091c3bf30704d07f4c77ff36755d
Subproject commit aff363b897fc7a66adebf07016a7033dfee73c2d

View File

@ -451,17 +451,19 @@ EOL
fi
INCUS_VM_NAME="${LNPLAY_SERVER_FQDN//./-}"
if ! incus image list -q --format csv | grep -q "$INCUS_VM_NAME"; then
INCUS_LNPLAYSERVER_IMAGE_NAME="lnplayserver-$DOMAIN_NAME"
if ! incus image list -q --format csv | grep -q "$INCUS_LNPLAYSERVER_IMAGE_NAME"; then
# do all the docker image creation steps, but don't run services.
bash -c "./project/lnplay/up.sh -y --no-services --lnplay-conf-path=$LNPLAY_ENV_FILE"
# stop the instance so we can get an image yo
INCUS_VM_NAME="${LNPLAY_SERVER_FQDN//./-}"
incus stop "$INCUS_VM_NAME"
# create the incus image.
incus publish -q --public "$INCUS_VM_NAME" --alias="$INCUS_VM_NAME" --compression none
incus publish -q --public "$INCUS_VM_NAME" --alias="$INCUS_LNPLAYSERVER_IMAGE_NAME" --compression none
incus start "$INCUS_VM_NAME"
sleep 10
@ -470,8 +472,6 @@ EOL
sleep 3
fi
# bring up lnplay services.
bash -c "./project/lnplay/up.sh -y --lnplay-conf-path=$LNPLAY_ENV_FILE"
fi

View File

@ -11,37 +11,12 @@ if [ "$(hostname)" = ss-mgmt ]; then
exit 1
fi
DISK_OR_PARTITION=
# grab any modifications from the command line.
for i in "$@"; do
case $i in
--disk=*)
DISK_OR_PARTITION="${i#*=}"
shift
;;
*)
echo "Unexpected option: $1"
exit 1
;;
esac
done
# ensure the iptables forward policy is set to ACCEPT so your host can act as a router
# Note this is necessary if docker is running (or has been previuosly installed) on the
# same host running incus.
sudo iptables -F FORWARD
sudo iptables -P FORWARD ACCEPT
# if the user didn't specify the disk or partition, we create a loop device under
# the user's home directory. If the user does specify a disk or partition, we will
# create the ZFS pool there.
if [ -z "$DISK_OR_PARTITION" ]; then
echo "ERROR: You MUST set DISK_OR_PARTITION"
exit 1
fi
# run the incus install script.
sudo bash -c ./install_incus.sh
@ -59,7 +34,7 @@ networks:
project: default
storage_pools:
- config:
source: ${DISK_OR_PARTITION}
size: 30GiB
description: ""
name: sovereign-stack
driver: zfs