Various updates.
This commit is contained in:
parent
6c4d262c43
commit
5d15d5f690
2
deployment/.gitignore
vendored
2
deployment/.gitignore
vendored
@ -1 +1 @@
|
||||
project
|
||||
#project
|
@ -137,7 +137,7 @@ EOF
|
||||
"${REGISTRY_URL}"
|
||||
],
|
||||
"labels": [
|
||||
"PROJECT_COMMIT=${PROJECT_GIT_COMMIT}"
|
||||
"PROJECT_COMMIT=${TARGET_PROJECT_GIT_COMMIT}"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -419,14 +419,10 @@ done
|
||||
# now let's run the www and btcpay-specific provisioning scripts.
|
||||
if [ "$SKIP_WWW" = false ]; then
|
||||
./project/www/go.sh
|
||||
else
|
||||
echo "INFO: Skipping www VM."
|
||||
fi
|
||||
|
||||
export DOMAIN_NAME="$PRIMARY_DOMAIN"
|
||||
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
||||
if [ "$SKIP_BTCPAY" = false ]; then
|
||||
if [ "$SKIP_BTCPAY" = false ]; then
|
||||
./project/btcpayserver/go.sh
|
||||
else
|
||||
echo "INFO: Skipping the btcpayserver VM."
|
||||
fi
|
@ -68,7 +68,7 @@ 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@$WWW_FQDN docker info | grep PROJECT_COMMIT)"
|
||||
cd project/
|
||||
echo "INFO: switch the 'project' repo to commit prior commit '$GIT_COMMIT_ON_REMOTE_HOST'"
|
||||
echo " This allows Sovereign Stack to can grab a backup using the version of the code"
|
||||
|
62
install.sh
62
install.sh
@ -124,39 +124,39 @@ if ! lxc config device show ss-mgmt | grep -q ss-root; then
|
||||
lxc config device add ss-mgmt ss-root disk source="$SS_ROOT_PATH" path=/home/ubuntu/ss
|
||||
fi
|
||||
|
||||
# # if a ~/.bitcoin/testnet3/blocks direrectory exists, mount it in.
|
||||
# BITCOIN_DIR="$HOME/.bitcoin"
|
||||
# REMOTE_BITCOIN_CACHE_PATH="/home/ubuntu/ss/cache/bitcoin"
|
||||
# BITCOIN_TESTNET_BLOCKS_PATH="$BITCOIN_DIR/testnet3/blocks"
|
||||
# if [ -d "$BITCOIN_TESTNET_BLOCKS_PATH" ]; then
|
||||
# if ! lxc config device show ss-mgmt | grep -q ss-testnet-blocks; then
|
||||
# lxc config device add ss-mgmt ss-testnet-blocks disk source="$BITCOIN_TESTNET_BLOCKS_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/testnet/blocks
|
||||
# fi
|
||||
# fi
|
||||
# if a ~/.bitcoin/testnet3/blocks direrectory exists, mount it in.
|
||||
BITCOIN_DIR="$HOME/.bitcoin"
|
||||
REMOTE_BITCOIN_CACHE_PATH="/home/ubuntu/ss/cache/bitcoin"
|
||||
BITCOIN_TESTNET_BLOCKS_PATH="$BITCOIN_DIR/testnet3/blocks"
|
||||
if [ -d "$BITCOIN_TESTNET_BLOCKS_PATH" ]; then
|
||||
if ! lxc config device show ss-mgmt | grep -q ss-testnet-blocks; then
|
||||
lxc config device add ss-mgmt ss-testnet-blocks disk source="$BITCOIN_TESTNET_BLOCKS_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/testnet/blocks
|
||||
fi
|
||||
fi
|
||||
|
||||
# # if a ~/.bitcoin/testnet3/blocks direrectory exists, mount it in.
|
||||
# BITCOIN_TESTNET_CHAINSTATE_PATH="$BITCOIN_DIR/testnet3/chainstate"
|
||||
# if [ -d "$BITCOIN_TESTNET_CHAINSTATE_PATH" ]; then
|
||||
# if ! lxc config device show ss-mgmt | grep -q ss-testnet-chainstate; then
|
||||
# lxc config device add ss-mgmt ss-testnet-chainstate disk source="$BITCOIN_TESTNET_CHAINSTATE_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/testnet/chainstate
|
||||
# fi
|
||||
# fi
|
||||
# if a ~/.bitcoin/testnet3/blocks direrectory exists, mount it in.
|
||||
BITCOIN_TESTNET_CHAINSTATE_PATH="$BITCOIN_DIR/testnet3/chainstate"
|
||||
if [ -d "$BITCOIN_TESTNET_CHAINSTATE_PATH" ]; then
|
||||
if ! lxc config device show ss-mgmt | grep -q ss-testnet-chainstate; then
|
||||
lxc config device add ss-mgmt ss-testnet-chainstate disk source="$BITCOIN_TESTNET_CHAINSTATE_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/testnet/chainstate
|
||||
fi
|
||||
fi
|
||||
|
||||
# # if a ~/.bitcoin/blocks dir exists, mount it in.
|
||||
# BITCOIN_MAINNET_BLOCKS_PATH="$BITCOIN_DIR/blocks"
|
||||
# if [ -d "$BITCOIN_MAINNET_BLOCKS_PATH" ]; then
|
||||
# if ! lxc config device show ss-mgmt | grep -q ss-mainnet-blocks; then
|
||||
# lxc config device add ss-mgmt ss-mainnet-blocks disk source="$BITCOIN_MAINNET_BLOCKS_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/mainnet/blocks
|
||||
# fi
|
||||
# fi
|
||||
# if a ~/.bitcoin/blocks dir exists, mount it in.
|
||||
BITCOIN_MAINNET_BLOCKS_PATH="$BITCOIN_DIR/blocks"
|
||||
if [ -d "$BITCOIN_MAINNET_BLOCKS_PATH" ]; then
|
||||
if ! lxc config device show ss-mgmt | grep -q ss-mainnet-blocks; then
|
||||
lxc config device add ss-mgmt ss-mainnet-blocks disk source="$BITCOIN_MAINNET_BLOCKS_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/mainnet/blocks
|
||||
fi
|
||||
fi
|
||||
|
||||
# # if a ~/.bitcoin/testnet3/blocks direrectory exists, mount it in.
|
||||
# BITCOIN_MAINNET_CHAINSTATE_PATH="$BITCOIN_DIR/chainstate"
|
||||
# if [ -d "$BITCOIN_MAINNET_CHAINSTATE_PATH" ]; then
|
||||
# if ! lxc config device show ss-mgmt | grep -q ss-mainnet-blocks; then
|
||||
# lxc config device add ss-mgmt ss-mainnet-chainstate disk source="$BITCOIN_MAINNET_CHAINSTATE_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/mainnet/chainstate
|
||||
# fi
|
||||
# fi
|
||||
# if a ~/.bitcoin/testnet3/blocks direrectory exists, mount it in.
|
||||
BITCOIN_MAINNET_CHAINSTATE_PATH="$BITCOIN_DIR/chainstate"
|
||||
if [ -d "$BITCOIN_MAINNET_CHAINSTATE_PATH" ]; then
|
||||
if ! lxc config device show ss-mgmt | grep -q ss-mainnet-blocks; then
|
||||
lxc config device add ss-mgmt ss-mainnet-chainstate disk source="$BITCOIN_MAINNET_CHAINSTATE_PATH" path=$REMOTE_BITCOIN_CACHE_PATH/mainnet/chainstate
|
||||
fi
|
||||
fi
|
||||
|
||||
# mount the ssh directory in there.
|
||||
if [ -f "$SSH_PUBKEY_PATH" ]; then
|
||||
@ -232,4 +232,4 @@ else
|
||||
git -c advice.detachedHead=false pull origin main
|
||||
git checkout "$TARGET_PROJECT_GIT_COMMIT"
|
||||
cd -
|
||||
fi
|
||||
fi
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# https://www.sovereign-stack.org/ss-manage/
|
||||
|
||||
set -eu
|
||||
set -exu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# check to ensure dependencies are met.
|
||||
|
@ -5,7 +5,7 @@ cd "$(dirname "$0")"
|
||||
|
||||
# NOTE! This script MUST be executed as root.
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg lsb-release htop
|
||||
sudo apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
|
||||
sudo mkdir -m 0755 -p /etc/apt/keyrings
|
||||
|
||||
@ -34,6 +34,7 @@ sleep 10
|
||||
|
||||
# install snap
|
||||
if ! snap list | grep -q lxd; then
|
||||
sudo snap install htop
|
||||
sudo snap install lxd --channel=latest/candidate
|
||||
sleep 6
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user