1
1

Compare commits

..

No commits in common. "9723474b7b5e2d90ab00f5b16019fb76bb64a91c" and "f06a3545d24bcd81ac5a61ba73019ca65147730c" have entirely different histories.

6 changed files with 20 additions and 24 deletions

View File

@ -106,7 +106,7 @@ export PRIMARY_DOMAIN=
# this is the git commit of the project/ sub git repo. # this is the git commit of the project/ sub git repo.
# used in the migration script to switch into past for backup # used in the migration script to switch into past for backup
# then back to present (TARGET_PROJECT_GIT_COMMIT) for restore. # then back to present (TARGET_PROJECT_GIT_COMMIT) for restore.
export TARGET_PROJECT_GIT_COMMIT=0ede72d5566ebc9c7a1b67110f50a758cc85999c export TARGET_PROJECT_GIT_COMMIT=4fb926a8cfc75055d579fdcabebe0a20b3916963
# #
export TESTNET_BLOCK_HASH=00000000d8277ba1ca66b40b3e3476629e6f0f97c5b8cfaeabfe402e55db223a export TESTNET_BLOCK_HASH=00000000d8277ba1ca66b40b3e3476629e6f0f97c5b8cfaeabfe402e55db223a

View File

@ -50,6 +50,11 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
# if the user sets USER_TARGET_PROJECT, let's ensure the project exists. # if the user sets USER_TARGET_PROJECT, let's ensure the project exists.
if [ -n "$USER_TARGET_PROJECT" ]; then if [ -n "$USER_TARGET_PROJECT" ]; then
if ! lxc project list | grep -q "$USER_TARGET_PROJECT"; then
echo "ERROR: the project does not exist! Nothing to destroy."
exit 1
fi
if [ "$PROJECT_NAME" != "$USER_TARGET_PROJECT" ]; then if [ "$PROJECT_NAME" != "$USER_TARGET_PROJECT" ]; then
echo "INFO: Skipping project '$PROJECT_NAME' since the system owner has used the --project= switch." echo "INFO: Skipping project '$PROJECT_NAME' since the system owner has used the --project= switch."
exit exit

View File

@ -11,5 +11,4 @@ You are in the Sovereign Stack Management Environment (SSME). From here, you can
For more infomation about all these topics, consult the Sovereign Stack website starting with: For more infomation about all these topics, consult the Sovereign Stack website starting with:
- https://www.sovereign-stack.org/tag/deployment-management/ - https://www.sovereign-stack.org/tag/instance-management/

View File

@ -72,11 +72,10 @@ fi
# we need to get the base image. IMport it if it's cached, else download it then cache it. # we need to get the base image. IMport it if it's cached, else download it then cache it.
if ! lxc image list | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then if ! lxc image list | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then
# if the image if cached locally, import it from disk, otherwise download it from ubuntu # if the image if cached locally, import it from disk, otherwise download it from ubuntu
IMAGE_IDENTIFIER=$(find "$SS_JAMMY_PATH" | grep ".qcow2" | head -n1 | cut -d "." -f1) if [ -d "$SS_JAMMY_PATH" ]; then
METADATA_FILE="$SS_JAMMY_PATH/meta-$IMAGE_IDENTIFIER.tar.xz" lxc image import "$SS_JAMMY_PATH/meta-bf1a2627bdddbfb0a9bf1f8ae146fa794800c6c91281d3db88c8d762f58bd057.tar.xz" \
IMAGE_FILE="$SS_JAMMY_PATH/$IMAGE_IDENTIFIER.qcow2" "$SS_JAMMY_PATH/bf1a2627bdddbfb0a9bf1f8ae146fa794800c6c91281d3db88c8d762f58bd057.qcow2" \
if [ -d "$SS_JAMMY_PATH" ] && [ -f "$METADATA_FILE" ] && [ -f "$IMAGE_FILE" ]; then --alias "$UBUNTU_BASE_IMAGE_NAME"
lxc image import "$METADATA_FILE" "$IMAGE_FILE" --alias "$UBUNTU_BASE_IMAGE_NAME"
else else
lxc image copy "images:$BASE_LXC_IMAGE" local: --alias "$UBUNTU_BASE_IMAGE_NAME" --vm --auto-update lxc image copy "images:$BASE_LXC_IMAGE" local: --alias "$UBUNTU_BASE_IMAGE_NAME" --vm --auto-update
fi fi
@ -151,7 +150,6 @@ while lxc exec ss-mgmt -- [ ! -f /var/lib/cloud/instance/boot-finished ]; do
done done
# do some other preparations for user experience # do some other preparations for user experience
lxc file push ./management/bash_aliases ss-mgmt/home/ubuntu/.bash_aliases
lxc file push ./management/bash_profile ss-mgmt/home/ubuntu/.bash_profile lxc file push ./management/bash_profile ss-mgmt/home/ubuntu/.bash_profile
lxc file push ./management/bashrc ss-mgmt/home/ubuntu/.bashrc lxc file push ./management/bashrc ss-mgmt/home/ubuntu/.bashrc
lxc file push ./management/motd ss-mgmt/etc/update-motd.d/sovereign-stack lxc file push ./management/motd ss-mgmt/etc/update-motd.d/sovereign-stack

View File

@ -1,11 +0,0 @@
#!/bin/bash
alias ss-deploy='/home/ubuntu/sovereign-stack/deployment/project/deploy.sh $@'
alias ss-remote='/home/ubuntu/sovereign-stack/deployment/remote.sh $@'
alias ss-show='/home/ubuntu/sovereign-stack/deployment/show.sh $@'
alias ss-reset='/home/ubuntu/sovereign-stack/deployment/reset.sh $@'
alias ss-update='/home/ubuntu/sovereign-stack/deployment/update.sh $@'
alias ss-destroy='/home/ubuntu/sovereign-stack/deployment/destroy.sh $@'
alias ss-help='cat /home/ubuntu/sovereign-stack/deployment/help.txt'
alias ll='ls -lah'

13
management/bash_profile Executable file → Normal file
View File

@ -1,6 +1,11 @@
#!/bin/bash #!/bin/bash
# this wires up the aliases for remote ssh sessions. alias ss-deploy='/home/ubuntu/sovereign-stack/deployment/project/deploy.sh $@'
if [ -f ~/.bashrc ]; then alias ss-remote='/home/ubuntu/sovereign-stack/deployment/remote.sh $@'
. ~/.bashrc alias ss-show='/home/ubuntu/sovereign-stack/deployment/show.sh $@'
fi alias ss-reset='/home/ubuntu/sovereign-stack/deployment/reset.sh $@'
alias ss-update='/home/ubuntu/sovereign-stack/deployment/update.sh $@'
alias ss-destroy='/home/ubuntu/sovereign-stack/deployment/destroy.sh $@'
alias ss-help='cat /home/ubuntu/sovereign-stack/deployment/help.txt'
alias ll='ls -lah'