From d786227a5fc4c571200226764172c52eeb5cbbad Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Thu, 30 Mar 2023 11:10:42 -0400 Subject: [PATCH] undo --- defaults.sh | 2 +- deployment/project_env.sh | 6 ++++-- deployment/remote.sh | 2 +- deployment/update.sh | 12 ++++++------ install.sh | 7 ------- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/defaults.sh b/defaults.sh index b0f7278..44b45f6 100755 --- a/defaults.sh +++ b/defaults.sh @@ -90,7 +90,7 @@ 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 DOCKER_BASE_IMAGE_NAME="ss-docker-${LXD_UBUNTU_BASE_VERSION//./-}-$WEEK_NUMBER-A" export OTHER_SITES_LIST= export BTCPAY_ALT_NAMES= diff --git a/deployment/project_env.sh b/deployment/project_env.sh index 70b809d..2d4fcbf 100755 --- a/deployment/project_env.sh +++ b/deployment/project_env.sh @@ -3,7 +3,6 @@ set -eu cd "$(dirname "$0")" - PROJECT_DEFINITION_PATH="$PROJECT_PATH/project.conf" if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then @@ -31,4 +30,7 @@ if ! lxc info | grep "project:" | grep -q "$PROJECT_NAME"; then if lxc project list | grep -q "$PROJECT_NAME"; then lxc project switch "$PROJECT_NAME" fi -fi \ No newline at end of file +fi + +SHASUM_OF_PRIMARY_DOMAIN="$(echo -n "$PRIMARY_DOMAIN" | sha256sum | awk '{print $1;}' )" +export PRIMARY_DOMAIN_IDENTIFIER="${SHASUM_OF_PRIMARY_DOMAIN: -6}" diff --git a/deployment/remote.sh b/deployment/remote.sh index f38856d..65f5b5c 100755 --- a/deployment/remote.sh +++ b/deployment/remote.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex cd "$(dirname "$0")" # This script is meant to be executed on the management machine. diff --git a/deployment/update.sh b/deployment/update.sh index 4fc21ed..0cbdb23 100755 --- a/deployment/update.sh +++ b/deployment/update.sh @@ -1,14 +1,14 @@ #!/bin/bash -set -eu +set -exu cd "$(dirname "$0")" # check if there are any uncommited changes. It's dangerous to # alter production systems when you have commits to make or changes to stash. -if git update-index --refresh | grep -q "needs update"; then - echo "ERROR: You have uncommited changes! You MUST commit or stash all changes to continue." - exit 1 -fi +# if git update-index --refresh | grep -q "needs update"; then +# echo "ERROR: You have uncommited changes! You MUST commit or stash all changes to continue." +# exit 1 +# fi echo "WARNING: this script backs up your existing remote and saves all data locally in the SSME." echo " Then, all your VMs are destroyed on the remote resulting is destruction of user data." @@ -63,7 +63,7 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do fi if [ "$PROJECT_NAME" != "$USER_TARGET_PROJECT" ]; then - exit + continue fi fi diff --git a/install.sh b/install.sh index b43e255..221bab4 100755 --- a/install.sh +++ b/install.sh @@ -19,13 +19,6 @@ fi DISK="rpool/lxd" export DISK="$DISK" -# let's check to ensure the management machine is on the Baseline ubuntu -# TODO maybe remove this check; this theoretically should work on anything that support bash and lxd? -if ! lsb_release -d | grep -q "Ubuntu 22.04"; then - echo "ERROR: Your machine is not running the Ubuntu 22.04 LTS baseline OS on your management machine." - exit 1 -fi - # install lxd snap and initialize it if ! snap list | grep -q lxd; then sudo snap install lxd --channel=latest/candidate