Compare commits
5 Commits
f06a3545d2
...
9723474b7b
Author | SHA1 | Date | |
---|---|---|---|
9723474b7b | |||
a595491ee6 | |||
46dedcf6b2 | |||
d5c2d67562 | |||
b5c2b0ef81 |
@ -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=4fb926a8cfc75055d579fdcabebe0a20b3916963
|
export TARGET_PROJECT_GIT_COMMIT=0ede72d5566ebc9c7a1b67110f50a758cc85999c
|
||||||
|
|
||||||
#
|
#
|
||||||
export TESTNET_BLOCK_HASH=00000000d8277ba1ca66b40b3e3476629e6f0f97c5b8cfaeabfe402e55db223a
|
export TESTNET_BLOCK_HASH=00000000d8277ba1ca66b40b3e3476629e6f0f97c5b8cfaeabfe402e55db223a
|
||||||
|
@ -50,11 +50,6 @@ 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
|
||||||
|
@ -11,4 +11,5 @@ 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/instance-management/
|
- https://www.sovereign-stack.org/tag/deployment-management/
|
||||||
|
|
||||||
|
10
install.sh
10
install.sh
@ -72,10 +72,11 @@ 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
|
||||||
if [ -d "$SS_JAMMY_PATH" ]; then
|
IMAGE_IDENTIFIER=$(find "$SS_JAMMY_PATH" | grep ".qcow2" | head -n1 | cut -d "." -f1)
|
||||||
lxc image import "$SS_JAMMY_PATH/meta-bf1a2627bdddbfb0a9bf1f8ae146fa794800c6c91281d3db88c8d762f58bd057.tar.xz" \
|
METADATA_FILE="$SS_JAMMY_PATH/meta-$IMAGE_IDENTIFIER.tar.xz"
|
||||||
"$SS_JAMMY_PATH/bf1a2627bdddbfb0a9bf1f8ae146fa794800c6c91281d3db88c8d762f58bd057.qcow2" \
|
IMAGE_FILE="$SS_JAMMY_PATH/$IMAGE_IDENTIFIER.qcow2"
|
||||||
--alias "$UBUNTU_BASE_IMAGE_NAME"
|
if [ -d "$SS_JAMMY_PATH" ] && [ -f "$METADATA_FILE" ] && [ -f "$IMAGE_FILE" ]; then
|
||||||
|
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
|
||||||
@ -150,6 +151,7 @@ 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
|
||||||
|
11
management/bash_aliases
Executable file
11
management/bash_aliases
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/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
Normal file → Executable file
13
management/bash_profile
Normal file → Executable file
@ -1,11 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
alias ss-deploy='/home/ubuntu/sovereign-stack/deployment/project/deploy.sh $@'
|
# this wires up the aliases for remote ssh sessions.
|
||||||
alias ss-remote='/home/ubuntu/sovereign-stack/deployment/remote.sh $@'
|
if [ -f ~/.bashrc ]; then
|
||||||
alias ss-show='/home/ubuntu/sovereign-stack/deployment/show.sh $@'
|
. ~/.bashrc
|
||||||
alias ss-reset='/home/ubuntu/sovereign-stack/deployment/reset.sh $@'
|
fi
|
||||||
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'
|
|
Loading…
Reference in New Issue
Block a user