From 0f65419d555f9d0ddbd2201984582e6c6b382ff1 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Tue, 4 Apr 2023 16:24:39 -0400 Subject: [PATCH] Make volumes project-specific. --- deployment/remote_env.sh | 4 ++-- deployment/show.sh | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/deployment/remote_env.sh b/deployment/remote_env.sh index a3da4ae..9608094 100755 --- a/deployment/remote_env.sh +++ b/deployment/remote_env.sh @@ -48,10 +48,10 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do # create the lxc project as specified by PROJECT_NAME if ! lxc project list | grep -q "$PROJECT_NAME"; then lxc project create "$PROJECT_NAME" - lxc project set "$PROJECT_NAME" features.networks=true features.images=false features.storage.volumes=false + lxc project set "$PROJECT_NAME" features.networks=true features.images=false features.storage.volumes=true + lxc project switch "$PROJECT_NAME" fi - # default values are already at regtest mode. if [ "$BITCOIN_CHAIN" = testnet ]; then diff --git a/deployment/show.sh b/deployment/show.sh index af01de6..891711d 100755 --- a/deployment/show.sh +++ b/deployment/show.sh @@ -11,27 +11,32 @@ echo "Global Settings:" lxc image list lxc storage list -lxc storage volume list ss-base + echo echo -export PROJECT_NAME="$(lxc info | grep "project:" | awk '{print $2}')" +PROJECT_NAME="$(lxc info | grep "project:" | awk '{print $2}')" +export export="$PROJECT_NAME" export PROJECT_PATH="$PROJECTS_PATH/$PROJECT_NAME" - - echo echo -echo "Project: $PROJECT_NAME" +echo "Active project: $PROJECT_NAME" echo "----------------------------------------------------------" echo " Networks:" lxc network list + +echo +echo " Storage Volumes:" +lxc storage volume list ss-base + echo echo " Profiles:" lxc profile list + + echo echo " Instances (VMs):" lxc list -echo "----------------------------------------------------------"