forked from ss/sovereign-stack
Simplify and refactor.
This commit is contained in:
parent
610946e357
commit
8caae387b6
@ -397,10 +397,6 @@ export DOMAIN_COUNT=$(("$(echo "$DOMAIN_LIST" | tr -cd , | wc -c)"+1))
|
|||||||
# let's provision our primary domain first.
|
# let's provision our primary domain first.
|
||||||
export DOMAIN_NAME="$PRIMARY_DOMAIN"
|
export DOMAIN_NAME="$PRIMARY_DOMAIN"
|
||||||
|
|
||||||
# we deploy the WWW and btcpay server under the PRIMARY_DOMAIN.
|
|
||||||
export DEPLOY_WWW_SERVER=true
|
|
||||||
export DEPLOY_BTCPAY_SERVER=true
|
|
||||||
|
|
||||||
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
||||||
export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME"
|
export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME"
|
||||||
|
|
||||||
@ -409,7 +405,6 @@ stub_site_definition
|
|||||||
# bring the VMs up under the primary domain name.
|
# bring the VMs up under the primary domain name.
|
||||||
instantiate_vms
|
instantiate_vms
|
||||||
|
|
||||||
|
|
||||||
# let's stub out the rest of our site definitions, if any.
|
# let's stub out the rest of our site definitions, if any.
|
||||||
for DOMAIN_NAME in ${OTHER_SITES_LIST//,/ }; do
|
for DOMAIN_NAME in ${OTHER_SITES_LIST//,/ }; do
|
||||||
export DOMAIN_NAME="$DOMAIN_NAME"
|
export DOMAIN_NAME="$DOMAIN_NAME"
|
||||||
@ -421,14 +416,14 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# now let's run the www and btcpay-specific provisioning scripts.
|
# now let's run the www and btcpay-specific provisioning scripts.
|
||||||
if [ "$SKIP_WWW" = false ] && [ "$DEPLOY_BTCPAY_SERVER" = true ]; then
|
if [ "$SKIP_WWW" = false ]; then
|
||||||
bash -c "./www/go.sh"
|
bash -c "./www/go.sh"
|
||||||
ssh ubuntu@"$PRIMARY_WWW_FQDN" "echo $LATEST_GIT_COMMIT > /home/ubuntu/.ss-githead"
|
ssh ubuntu@"$PRIMARY_WWW_FQDN" "echo $LATEST_GIT_COMMIT > /home/ubuntu/.ss-githead"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export DOMAIN_NAME="$PRIMARY_DOMAIN"
|
export DOMAIN_NAME="$PRIMARY_DOMAIN"
|
||||||
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
||||||
if [ "$SKIP_BTCPAY" = false ] && [ "$DEPLOY_BTCPAY_SERVER" = true ]; then
|
if [ "$SKIP_BTCPAY" = false ]; then
|
||||||
./btcpayserver/go.sh
|
./btcpayserver/go.sh
|
||||||
|
|
||||||
ssh ubuntu@"$BTCPAY_FQDN" "echo $LATEST_GIT_COMMIT > /home/ubuntu/.ss-githead"
|
ssh ubuntu@"$BTCPAY_FQDN" "echo $LATEST_GIT_COMMIT > /home/ubuntu/.ss-githead"
|
||||||
|
@ -22,6 +22,8 @@ fi
|
|||||||
|
|
||||||
. ./cluster_env.sh
|
. ./cluster_env.sh
|
||||||
|
|
||||||
|
. ./project_env.sh
|
||||||
|
|
||||||
for VM in www btcpayserver; do
|
for VM in www btcpayserver; do
|
||||||
LXD_NAME="$VM-${DOMAIN_NAME//./-}"
|
LXD_NAME="$VM-${DOMAIN_NAME//./-}"
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ done
|
|||||||
|
|
||||||
. ./cluster_env.sh
|
. ./cluster_env.sh
|
||||||
|
|
||||||
|
. ./project_env.sh
|
||||||
|
|
||||||
# Check to see if any of the VMs actually don't exist.
|
# Check to see if any of the VMs actually don't exist.
|
||||||
# (we only migrate instantiated vms)
|
# (we only migrate instantiated vms)
|
||||||
for VM in www btcpayserver; do
|
for VM in www btcpayserver; do
|
||||||
|
@ -159,6 +159,3 @@ fi
|
|||||||
# xdg-open "http://$GITEA_FQDN" > /dev/null 2>&1
|
# xdg-open "http://$GITEA_FQDN" > /dev/null 2>&1
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
# if [ "$DEPLOY_BTCPAY_SERVER" = true ]; then
|
|
||||||
# xdg-open "http://$BTCPAY_USER_FQDN" > /dev/null 2>&1
|
|
||||||
# fi
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -exu
|
set -eu
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# see https://www.sovereign-stack.org/management/
|
# see https://www.sovereign-stack.org/management/
|
||||||
@ -25,7 +25,7 @@ fi
|
|||||||
# install snap
|
# install snap
|
||||||
if ! snap list | grep -q lxd; then
|
if ! snap list | grep -q lxd; then
|
||||||
sudo snap install lxd --channel=5.10/stable
|
sudo snap install lxd --channel=5.10/stable
|
||||||
sleep 3
|
sleep 5
|
||||||
|
|
||||||
# run lxd init on the remote server./dev/nvme1n1
|
# run lxd init on the remote server./dev/nvme1n1
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -e
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# NOTE! This script MUST be executed as root.
|
# NOTE! This script MUST be executed as root.
|
||||||
|
Loading…
Reference in New Issue
Block a user