forked from ss/sovereign-stack
Added initial Umbrel support.
Signed-off-by: Derek Smith <derek@farscapian.com>
This commit is contained in:
parent
cec37b19d3
commit
782d4d9dc5
@ -4,6 +4,7 @@ set -eu
|
|||||||
|
|
||||||
export DEPLOY_WWW_SERVER=true
|
export DEPLOY_WWW_SERVER=true
|
||||||
export DEPLOY_BTCPPAY_SERVER=false
|
export DEPLOY_BTCPPAY_SERVER=false
|
||||||
|
export DEPLOY_UMBREL_VPS=false
|
||||||
|
|
||||||
# if true, then we deploy a VPS with Jitsi/Matrix
|
# if true, then we deploy a VPS with Jitsi/Matrix
|
||||||
export DEPLOY_GHOST=true
|
export DEPLOY_GHOST=true
|
||||||
@ -14,6 +15,7 @@ export DEPLOY_GITEA=false
|
|||||||
|
|
||||||
export WWW_HOSTNAME="www"
|
export WWW_HOSTNAME="www"
|
||||||
export BTCPAY_HOSTNAME="btcpay"
|
export BTCPAY_HOSTNAME="btcpay"
|
||||||
|
export UMBREL_HOSTNAME="umbrel"
|
||||||
export NEXTCLOUD_HOSTNAME="nextcloud"
|
export NEXTCLOUD_HOSTNAME="nextcloud"
|
||||||
export MATRIX_HOSTNAME="chat"
|
export MATRIX_HOSTNAME="chat"
|
||||||
export GITEA_HOSTNAME="git"
|
export GITEA_HOSTNAME="git"
|
||||||
|
13
deploy.sh
13
deploy.sh
@ -91,7 +91,8 @@ source ./defaults.sh
|
|||||||
|
|
||||||
# iterate over all our server endpoints and provision them if needed.
|
# iterate over all our server endpoints and provision them if needed.
|
||||||
# www
|
# www
|
||||||
for APP_TO_DEPLOY in btcpay www; do
|
VPS_HOSTNAME=
|
||||||
|
for APP_TO_DEPLOY in btcpay www umbrel; do
|
||||||
FQDN=
|
FQDN=
|
||||||
export APP_TO_DEPLOY="$APP_TO_DEPLOY"
|
export APP_TO_DEPLOY="$APP_TO_DEPLOY"
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
@ -113,7 +114,15 @@ for APP_TO_DEPLOY in btcpay www; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export FQDN="$FQDN"
|
# skip umbrel if
|
||||||
|
if [ "$APP_TO_DEPLOY" = umbrel ]; then
|
||||||
|
VPS_HOSTNAME="$UMBREL_HOSTNAME"
|
||||||
|
MAC_ADDRESS_TO_PROVISION="$UMBREL_MAC_ADDRESS"
|
||||||
|
if [ "$DEPLOY_UMBREL_VPS" = false ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# generate the docker yaml and nginx configs.
|
# generate the docker yaml and nginx configs.
|
||||||
./stub_docker_yml.sh
|
./stub_docker_yml.sh
|
||||||
|
@ -77,6 +77,8 @@ if [ "$APP_TO_DEPLOY" = www ]; then
|
|||||||
./go_www.sh
|
./go_www.sh
|
||||||
elif [ "$APP_TO_DEPLOY" = btcpay ]; then
|
elif [ "$APP_TO_DEPLOY" = btcpay ]; then
|
||||||
./go_btcpay.sh
|
./go_btcpay.sh
|
||||||
|
elif [ "$APP_TO_DEPLOY" = umbrel ]; then
|
||||||
|
./go_umbrel.sh
|
||||||
elif [ "$APP_TO_DEPLOY" = certonly ]; then
|
elif [ "$APP_TO_DEPLOY" = certonly ]; then
|
||||||
# renew the certs; certbot takes care of seeing if we need to actually renew.
|
# renew the certs; certbot takes care of seeing if we need to actually renew.
|
||||||
if [ "$RUN_CERT_RENEWAL" = true ]; then
|
if [ "$RUN_CERT_RENEWAL" = true ]; then
|
||||||
|
51
go_umbrel.sh
Executable file
51
go_umbrel.sh
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -exu
|
||||||
|
|
||||||
|
ssh "$FQDN" "
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd /home/ubuntu
|
||||||
|
|
||||||
|
# first, lets make sure we have the latest code. We use git over HTTPS and store it in ~/umbrel
|
||||||
|
# ~/umbrel is the only folder we need to backup
|
||||||
|
if [ ! -d ./umbrel ]; then
|
||||||
|
git clone https://github.com/getumbrel/umbrel.git ./umbrel
|
||||||
|
else
|
||||||
|
|
||||||
|
if [ -f ./umbrel/scripts/stop ]; then
|
||||||
|
sudo ./umbrel/scripts/stop
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
"
|
||||||
|
|
||||||
|
# # DO SOME BACKUP OPERATION
|
||||||
|
|
||||||
|
# ssh "$FQDN" "
|
||||||
|
# set -x
|
||||||
|
|
||||||
|
# mkdir -p /home/ubuntu/backup
|
||||||
|
|
||||||
|
# sudo PASSPHRASE=${DUPLICITY_BACKUP_PASSPHRASE} duplicity --exclude ${REMOTE_HOME}/umbrel/bitcoin/blocks ${REMOTE_HOME}/umbrel file://${REMOTE_BACKUP_PATH}
|
||||||
|
# sudo chown -R ubuntu:ubuntu ${REMOTE_BACKUP_PATH}
|
||||||
|
# "
|
||||||
|
|
||||||
|
# Start services back up.
|
||||||
|
ssh "$FQDN" "
|
||||||
|
set -ex
|
||||||
|
cd /home/ubuntu/umbrel
|
||||||
|
|
||||||
|
git config pull.rebase true
|
||||||
|
git fetch --all --tags
|
||||||
|
git checkout master
|
||||||
|
git pull
|
||||||
|
git checkout tags/v0.4.17
|
||||||
|
|
||||||
|
# To use Umbrel on mainnet, run:
|
||||||
|
sudo NETWORK=$BTC_CHAIN /home/ubuntu/umbrel/scripts/start
|
||||||
|
"
|
||||||
|
|
||||||
|
# we wait for lightning to comone line too.
|
||||||
|
wait-for-it -t -60 "$FQDN:80"
|
||||||
|
|
||||||
|
xdg-open "http://$FQDN"
|
@ -25,6 +25,10 @@ config:
|
|||||||
- rsync
|
- rsync
|
||||||
- duplicity
|
- duplicity
|
||||||
- sshfs
|
- sshfs
|
||||||
|
- fswatch
|
||||||
|
- jq
|
||||||
|
- git
|
||||||
|
- nano
|
||||||
|
|
||||||
groups:
|
groups:
|
||||||
- docker
|
- docker
|
||||||
@ -124,6 +128,8 @@ config:
|
|||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
||||||
- echo "alias ll='ls -lah'" >> ${REMOTE_HOME}/.bash_profile
|
- echo "alias ll='ls -lah'" >> ${REMOTE_HOME}/.bash_profile
|
||||||
|
- sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||||
|
- sudo chmod +x /usr/local/bin/docker-compose
|
||||||
- sudo apt-get install -y openssh-server
|
- sudo apt-get install -y openssh-server
|
||||||
|
|
||||||
description: Default LXD profile for ${DOMAIN_NAME}
|
description: Default LXD profile for ${DOMAIN_NAME}
|
||||||
|
@ -35,11 +35,13 @@ export MATRIX_DB_PASSWORD="$(new_pass)"
|
|||||||
export MATRIX_SHARED_SECRET="$(new_pass)"
|
export MATRIX_SHARED_SECRET="$(new_pass)"
|
||||||
export MATRIX_ADMIN_PASSWORD="$(new_pass)"
|
export MATRIX_ADMIN_PASSWORD="$(new_pass)"
|
||||||
export DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)"
|
export DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)"
|
||||||
|
#export DEPLOY_UMBREL_VPS=false
|
||||||
export DEPLOY_GHOST=true
|
export DEPLOY_GHOST=true
|
||||||
export DEPLOY_MATRIX=true
|
export DEPLOY_MATRIX=true
|
||||||
export DEPLOY_NEXTCLOUD=true
|
export DEPLOY_NEXTCLOUD=true
|
||||||
export DEPLOY_ONION_SITE=false
|
export DEPLOY_ONION_SITE=false
|
||||||
#export DEPLOY_BTCPAY_SERVER=true
|
# valid options: 'testnet' and 'mainnet'
|
||||||
|
#export BTC_CHAIN=testnet
|
||||||
#export WWW_INSTANCE_TYPE="t2.medium"
|
#export WWW_INSTANCE_TYPE="t2.medium"
|
||||||
#export BTCPAY_ADDITIONAL_HOSTNAMES="pay.domain.tld"
|
#export BTCPAY_ADDITIONAL_HOSTNAMES="pay.domain.tld"
|
||||||
#export DEV_WWW_MAC_ADDRESS="00:16:3E:AD:25:2C"
|
#export DEV_WWW_MAC_ADDRESS="00:16:3E:AD:25:2C"
|
||||||
|
Loading…
Reference in New Issue
Block a user