1
1

Compare commits

...

3 Commits

Author SHA1 Message Date
870d0b685c
Update project ref. 2023-03-10 21:13:40 -05:00
6884154c04
Update documentation and links. 2023-03-10 21:12:39 -05:00
8590e82411
Simplifiey and add comments. 2023-03-10 21:12:24 -05:00
3 changed files with 13 additions and 24 deletions

View File

@ -100,4 +100,7 @@ export ROOT_DISK_SIZE_GB=20
export REGISTRY_URL="https://index.docker.io/v1/" export REGISTRY_URL="https://index.docker.io/v1/"
export PRIMARY_DOMAIN= export PRIMARY_DOMAIN=
export TARGET_PROJECT_GIT_COMMIT=df205cfabf3f2bee31561af1c8b6e036280829e6 # 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=bdd80779227775ad64c761a9f2deed2e878e76d1

View File

@ -1,15 +1,12 @@
Sovereign Stack Help.
You are in the Sovereign Stack management environment. From here, you can issue several commands: You are in the Sovereign Stack management environment. From here, you can issue several commands:
ss-remote - Take a remote SSH endpoint under management of Sovereign Stack. ss-remote - Take a remote SSH endpoint under management of Sovereign Stack.
ss-deploy - Creates an deployment to your active LXD remote (lxc remote get-default). ss-deploy - Creates a deployment to your active LXD remote.
ss-destroy - Destroys the active deployment (Warning: this action is DESTRUCTUVE of user data). ss-destroy - Destroys the active deployment (WARNING: destructive).
ss-migrate - migrates an existing deployment to the newest version of Sovereign Stack. ss-update - brings an existing deployment up to the newest version of Sovereign Stack.
ss-show - show the lxd resources associated with the current remote. ss-show - show the lxd resources associated with the current remote.
For more infomation about all these topics, consult the Sovereign Stack website. Relevant posts include: For more infomation about all these topics, consult the Sovereign Stack website. Relevant posts include:
- https://www.sovereign-stack.org/commands - https://www.sovereign-stack.org/tag/instance-management/

View File

@ -12,20 +12,6 @@ if git update-index --refresh | grep -q "needs update"; then
fi fi
USER_SAYS_YES=false
for i in "$@"; do
case $i in
-y)
USER_SAYS_YES=true
shift
;;
*)
echo "Unexpected option: $1"
;;
esac
done
. ../defaults.sh . ../defaults.sh
. ./remote_env.sh . ./remote_env.sh
@ -63,6 +49,9 @@ source ../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site_definition"
source ./project/domain_env.sh source ./project/domain_env.sh
# now we want to switch the git HEAD of the project subdirectory to the
# version of code that was last used
GIT_COMMIT_ON_REMOTE_HOST="$(ssh ubuntu@$BTCPAY_FQDN cat /home/ubuntu/.ss-githead)" GIT_COMMIT_ON_REMOTE_HOST="$(ssh ubuntu@$BTCPAY_FQDN cat /home/ubuntu/.ss-githead)"
cd project/ cd project/
git checkout "$GIT_COMMIT_ON_REMOTE_HOST" git checkout "$GIT_COMMIT_ON_REMOTE_HOST"
@ -73,7 +62,7 @@ sleep 5
bash -c "./project/deploy.sh --stop --no-cert-renew --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH" bash -c "./project/deploy.sh --stop --no-cert-renew --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH"
# call the destroy script. If user proceed, then user data is DESTROYED! # call the destroy script. If user proceed, then user data is DESTROYED!
USER_SAYS_YES="$USER_SAYS_YES" ./destroy.sh ./destroy.sh
cd project/ cd project/
git checkout "$TARGET_PROJECT_GIT_COMMIT" git checkout "$TARGET_PROJECT_GIT_COMMIT"