Updates for storage volumes.
This commit is contained in:
parent
1a586e2399
commit
086aee9ed4
@ -80,6 +80,9 @@ export REMOTES_DIR="$SS_ROOT_PATH/remotes"
|
||||
export PROJECTS_DIR="$SS_ROOT_PATH/projects"
|
||||
export SITES_PATH="$SS_ROOT_PATH/sites"
|
||||
|
||||
# mount into ss-mgmt/home/ubuntu/snap/lxd/common/config
|
||||
export LXD_CONFIG_PATH="$SS_ROOT_PATH/lxd"
|
||||
|
||||
# The base VM image.
|
||||
export LXD_UBUNTU_BASE_VERSION="jammy"
|
||||
export BASE_IMAGE_VM_NAME="ss-base-${LXD_UBUNTU_BASE_VERSION//./-}"
|
||||
@ -103,4 +106,4 @@ export PRIMARY_DOMAIN=
|
||||
# this is the git commit of the project/ sub git repo.
|
||||
# used in the migration script to switch into past for backup
|
||||
# then back to present (TARGET_PROJECT_GIT_COMMIT) for restore.
|
||||
export TARGET_PROJECT_GIT_COMMIT=657b68f9cb83404bd6eef7e196bbe2b7a3ba25d4
|
||||
export TARGET_PROJECT_GIT_COMMIT=06341c884240e1c64f08993f20fd031201745fbb
|
||||
|
@ -3,12 +3,11 @@ You are in the Sovereign Stack Management Environment (SSME). From here, you can
|
||||
|
||||
ss-remote - Take a remote SSH endpoint under management of Sovereign Stack.
|
||||
ss-deploy - Creates a deployment to your active LXD remote.
|
||||
ss-destroy - Destroys the active deployment (WARNING: destructive).
|
||||
ss-update - brings an existing deployment up to the newest version of Sovereign Stack.
|
||||
ss-reset - The opposite of ss-remote; deprovisions on the current remote.
|
||||
ss-show - show the lxd resources associated with the current remote.
|
||||
ss-update - brings an existing deployment up to the newest version of Sovereign Stack.
|
||||
ss-destroy - Destroys the active deployment (WARNING: destructive).
|
||||
ss-reset - The opposite of ss-remote; deprovisions on the current remote.
|
||||
|
||||
For more infomation about all these topics, consult the Sovereign Stack website starting with:
|
||||
|
||||
- https://www.sovereign-stack.org/tag/instance-management/
|
||||
|
||||
|
@ -199,7 +199,7 @@ networks:
|
||||
ipv6.address: none
|
||||
dns.mode: managed
|
||||
- name: lxdbr1
|
||||
description: "Non-natting bridge for ovn networks to connect to."
|
||||
description: "Non-natting bridge needed for ovn networks."
|
||||
type: bridge
|
||||
config:
|
||||
ipv4.address: 10.10.10.1/24
|
||||
@ -254,3 +254,12 @@ if ! lxc storage list --format csv | grep -q ss-base; then
|
||||
lxc storage create ss-base zfs
|
||||
fi
|
||||
fi
|
||||
|
||||
# create the testnet/mainnet blocks/chainstate subvolumes.
|
||||
for CHAIN in mainnet testnet; do
|
||||
for DATA in blocks chainstate; do
|
||||
if ! lxc storage volume list ss-base | grep -q "$CHAIN-$DATA"; then
|
||||
lxc storage volume create ss-base "$CHAIN-$DATA" --type=filesystem
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@ -44,10 +44,21 @@ if lxc network list --format csv | grep -q lxdbr1; then
|
||||
fi
|
||||
|
||||
|
||||
# create the testnet/mainnet blocks/chainstate subvolumes.
|
||||
for CHAIN in mainnet testnet; do
|
||||
for DATA in blocks chainstate; do
|
||||
if lxc storage volume list ss-base | grep -q "$CHAIN-$DATA"; then
|
||||
lxc storage volume delete ss-base "$CHAIN-$DATA"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
if lxc storage list --format csv | grep -q ss-base; then
|
||||
lxc storage delete ss-base
|
||||
fi
|
||||
|
||||
|
||||
CURRENT_REMOTE="$(lxc remote get-default)"
|
||||
if ! lxc remote get-default | grep -q "local"; then
|
||||
lxc remote switch local
|
||||
|
11
install.sh
11
install.sh
@ -5,6 +5,12 @@ cd "$(dirname "$0")"
|
||||
|
||||
# see https://www.sovereign-stack.org/management/
|
||||
|
||||
# this script is not meant to be executed from the SSME; Let's let's check and abort if so.
|
||||
if [ "$(hostname)" = ss-mgmt ]; then
|
||||
echo "ERROR: This command is meant to be executed from the bare metal management machine -- not the SSME."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. ./defaults.sh
|
||||
|
||||
# the DISK variable here tells us which disk (partition) the admin wants to use for
|
||||
@ -155,8 +161,7 @@ if [ ! -d "$PROJECTS_SCRIPTS_PATH" ]; then
|
||||
git clone "$PROJECTS_SCRIPTS_REPO_URL" "$PROJECTS_SCRIPTS_PATH"
|
||||
else
|
||||
cd "$PROJECTS_SCRIPTS_PATH"
|
||||
git pull origin main
|
||||
git -c advice.detachedHead=false pull origin main
|
||||
git checkout "$TARGET_PROJECT_GIT_COMMIT"
|
||||
cd -
|
||||
fi
|
||||
|
||||
fi
|
@ -5,7 +5,7 @@ cd "$(dirname "$0")"
|
||||
|
||||
# NOTE! This script MUST be executed as root.
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
sudo apt-get install -y ca-certificates curl gnupg lsb-release htop
|
||||
|
||||
sudo mkdir -m 0755 -p /etc/apt/keyrings
|
||||
|
||||
|
@ -34,7 +34,6 @@ if lxc list --format csv | grep -q "ss-mgmt"; then
|
||||
|
||||
lxc config device remove ss-mgmt sscode
|
||||
|
||||
SS_ROOT_PATH="$HOME/.ss"
|
||||
if [ -d "$SS_ROOT_PATH" ]; then
|
||||
lxc config device remove ss-mgmt ssroot
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user