From 17e9398588006c8a850c4955b943b357e22b534d Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Fri, 9 Feb 2024 11:28:29 -0500 Subject: [PATCH] Nitpicks. --- deployment/deployment_defaults.sh | 2 -- deployment/remote.sh | 2 ++ deployment/remote_env.sh | 1 - deployment/up.sh | 7 ++++++- install.sh | 1 - install_incus.sh | 1 + uninstall.sh | 3 +++ 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/deployment/deployment_defaults.sh b/deployment/deployment_defaults.sh index 4cf6e3b..1b78384 100755 --- a/deployment/deployment_defaults.sh +++ b/deployment/deployment_defaults.sh @@ -12,8 +12,6 @@ export SITES_PATH="$SS_ROOT_PATH/sites" export INCUS_CONFIG_PATH="$SS_ROOT_PATH/incus" export SS_CACHE_PATH="$SS_ROOT_PATH/cache" - - export REMOTE_HOME="/home/ubuntu" export REMOTE_DATA_PATH="$REMOTE_HOME/ss-data" export REMOTE_DATA_PATH_LETSENCRYPT="$REMOTE_DATA_PATH/letsencrypt" diff --git a/deployment/remote.sh b/deployment/remote.sh index a81cfde..61bbd99 100755 --- a/deployment/remote.sh +++ b/deployment/remote.sh @@ -237,3 +237,5 @@ if ! incus storage list --format csv | grep -q ss-base; then # done fi + +echo "INFO: completed remote.sh." diff --git a/deployment/remote_env.sh b/deployment/remote_env.sh index 10cf969..873a36c 100755 --- a/deployment/remote_env.sh +++ b/deployment/remote_env.sh @@ -5,7 +5,6 @@ set -eu CURRENT_REMOTE="$(incus remote get-default)" DEPLOYMENT_STRING= - SS_ROOT_PATH="$HOME/ss" REMOTES_PATH="$SS_ROOT_PATH/remotes" PROJECTS_PATH="$SS_ROOT_PATH/projects" diff --git a/deployment/up.sh b/deployment/up.sh index 9571373..db20a7d 100755 --- a/deployment/up.sh +++ b/deployment/up.sh @@ -111,6 +111,7 @@ for i in "$@"; do esac done + if [ "$RESTORE_BTCPAY" = true ] && [ -z "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then echo "ERROR: Use the '--backup-archive-path=/path/to/btcpay/archive.tar.gz' option when restoring btcpay server." exit 1 @@ -153,6 +154,7 @@ source "$REMOTE_DEFINITION" # this is our password generation mechanism. Relying on GPG for secure password generation +# TODO see if this is a secure way to do it. function new_pass { gpg --gen-random --armor 1 25 } @@ -441,6 +443,7 @@ EOL INCUS_VM_NAME="${LNPLAY_SERVER_FQDN//./-}" if ! incus image list -q --format csv | grep -q "$INCUS_VM_NAME"; then + # do all the docker image creation steps, but don't run services. bash -c "./project/lnplay/up.sh -y --no-services" @@ -455,7 +458,9 @@ EOL bash -c "./wait_for_ip.sh --incus-name=$INCUS_VM_NAME" fi - + + + # bring up lnplay services. bash -c "./project/lnplay/up.sh -y" fi diff --git a/install.sh b/install.sh index 603c4b2..9fe5b9a 100755 --- a/install.sh +++ b/install.sh @@ -221,7 +221,6 @@ ssh-keyscan -H "$IP_V4_ADDRESS" >> "$SSH_HOME/known_hosts" ssh "ubuntu@$IP_V4_ADDRESS" sudo chown -R ubuntu:ubuntu /home/ubuntu - if [ "$FROM_BUILT_IMAGE" = false ]; then ssh "ubuntu@$IP_V4_ADDRESS" /home/ubuntu/sovereign-stack/management/provision.sh diff --git a/install_incus.sh b/install_incus.sh index d9ef603..7dfa411 100755 --- a/install_incus.sh +++ b/install_incus.sh @@ -72,3 +72,4 @@ apt-get update # TODO see if this can be fixed by installing JUST the incus client. # none of the systemd/daemon stuff is needed necessarily. apt-get install incus -y + diff --git a/uninstall.sh b/uninstall.sh index b12b7e4..1d23fe8 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,6 +2,9 @@ set -exu +# this script uninstalls incus from the MANAGEMENT MACHINE +# if you want to remove incus from remote cluster hosts, run ss-reset. + PURGE_INCUS=false # grab any modifications from the command line.