forked from ss/sovereign-stack
Creating commit on Sun Jan 2 10:34:53 AM EST 2022.
Signed-off-by: Derek Smith <derek@farscapian.com>
This commit is contained in:
parent
c761bd1a84
commit
29b079a2c6
23
env
23
env
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
###########
|
|
||||||
# ######
|
|
||||||
export DEV_MEMORY_MB="4096"
|
|
||||||
export DEV_CPU_COUNT="4"
|
|
||||||
export DEV_WWW_MAC_ADDRESS="00:16:3E:AD:25:2C"
|
|
||||||
export DEV_BTCPAY_MAC_ADDRESS="00:16:3E:AD:25:2D"
|
|
||||||
|
|
||||||
LXD_DISK_TO_USE=
|
|
||||||
|
|
||||||
if [ "$(lxc remote get-default)" = "antsle" ]; then
|
|
||||||
DEV_MACVLAN_INTERFACE="eno3"
|
|
||||||
LXD_DISK_TO_USE="/dev/sda"
|
|
||||||
elif [ "$(lxc remote get-default)" = "local" ]; then
|
|
||||||
DEV_MACVLAN_INTERFACE="enp5s0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export DEV_MACVLAN_INTERFACE="$DEV_MACVLAN_INTERFACE"
|
|
||||||
export DEV_WWW_MAC_ADDRESS="$DEV_WWW_MAC_ADDRESS"
|
|
||||||
export DEV_BTCPAY_MAC_ADDRESS="$DEV_BTCPAY_MAC_ADDRESS"
|
|
||||||
export LXD_DISK_TO_USE="$LXD_DISK_TO_USE"
|
|
||||||
######
|
|
@ -131,6 +131,6 @@ if [ "$RUN_SERVICES" = true ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DEPLOY_GITEA" = true ]; then
|
if [ "$DEPLOY_GITEA" = true ]; then
|
||||||
xdg-open "http://$GITTEA_FQDN"
|
xdg-open "http://$GITEA_FQDN"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
@ -80,7 +80,7 @@ if ! lxc image list --format csv "$VM_NAME" | grep -q "$VM_NAME"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
lxc init \
|
lxc init \
|
||||||
--profile="sovereign-stack" \
|
--profile="$LXD_VM_NAME" \
|
||||||
"ubuntu-21-04" \
|
"ubuntu-21-04" \
|
||||||
"$VM_NAME" --vm
|
"$VM_NAME" --vm
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ if ! lxc image list --format csv "$VM_NAME" | grep -q "$VM_NAME"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# now let's create a new VM to work with.
|
# now let's create a new VM to work with.
|
||||||
lxc init --profile="sovereign-stack" "$VM_NAME" "$LXD_VM_NAME" --vm
|
lxc init --profile="$LXD_VM_NAME" "$VM_NAME" "$LXD_VM_NAME" --vm
|
||||||
|
|
||||||
# let's PIN the HW address for now so we don't exhaust IP
|
# let's PIN the HW address for now so we don't exhaust IP
|
||||||
# and so we can set DNS internally.
|
# and so we can set DNS internally.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# this script will tag the repo then push it to origin
|
# this script will tag the repo then push it to origin
|
||||||
TAG_NAME=v0.0.14
|
TAG_NAME=v0.0.18
|
||||||
COMIT_MESSAGE="Creating commit on $(date)."
|
COMIT_MESSAGE="Creating commit on $(date)."
|
||||||
TAG_MESSAGE="Creating tag $TAG_NAME on $(date)."
|
TAG_MESSAGE="Creating tag $TAG_NAME on $(date)."
|
||||||
|
|
||||||
|
@ -3,11 +3,6 @@
|
|||||||
set -exuo nounset
|
set -exuo nounset
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# the user can specify an env which sets some environment variables. See the default content of env.
|
|
||||||
if [ -f "$(pwd)/env" ]; then
|
|
||||||
source "$(pwd)/env"
|
|
||||||
fi
|
|
||||||
|
|
||||||
USER_DELETE_MACHINE=false
|
USER_DELETE_MACHINE=false
|
||||||
DOMAIN_NAME=
|
DOMAIN_NAME=
|
||||||
VPS_HOSTING_TARGET=lxd
|
VPS_HOSTING_TARGET=lxd
|
||||||
@ -19,6 +14,8 @@ UPDATE_BTCPAY=false
|
|||||||
MIGRATE_BTCPAY_SERVER=false
|
MIGRATE_BTCPAY_SERVER=false
|
||||||
RECONFIGURE_BTCPAY_SERVER=false
|
RECONFIGURE_BTCPAY_SERVER=false
|
||||||
BTCPAY_ADDITIONAL_HOSTNAMES=
|
BTCPAY_ADDITIONAL_HOSTNAMES=
|
||||||
|
LXD_DISK_TO_USE=
|
||||||
|
DEV_BTCPAY_MAC_ADDRESS=
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
case $i in
|
case $i in
|
||||||
@ -75,6 +72,7 @@ done
|
|||||||
export DOMAIN_NAME="$DOMAIN_NAME"
|
export DOMAIN_NAME="$DOMAIN_NAME"
|
||||||
export VPS_HOSTING_TARGET="$VPS_HOSTING_TARGET"
|
export VPS_HOSTING_TARGET="$VPS_HOSTING_TARGET"
|
||||||
export LXD_DISK_TO_USE="$LXD_DISK_TO_USE"
|
export LXD_DISK_TO_USE="$LXD_DISK_TO_USE"
|
||||||
|
export DEV_BTCPAY_MAC_ADDRESS="$DEV_BTCPAY_MAC_ADDRESS"
|
||||||
export RUN_CERT_RENEWAL="$RUN_CERT_RENEWAL"
|
export RUN_CERT_RENEWAL="$RUN_CERT_RENEWAL"
|
||||||
|
|
||||||
export BTC_CHAIN="$BTC_CHAIN"
|
export BTC_CHAIN="$BTC_CHAIN"
|
||||||
|
68
shared.sh
68
shared.sh
@ -132,38 +132,51 @@ export WWW_INSTANCE_TYPE="$WWW_INSTANCE_TYPE"
|
|||||||
export REMOTE_BACKUP_PATH="$REMOTE_BACKUP_PATH"
|
export REMOTE_BACKUP_PATH="$REMOTE_BACKUP_PATH"
|
||||||
export BTCPAY_ADDITIONAL_HOSTNAMES="$BTCPAY_ADDITIONAL_HOSTNAMES"
|
export BTCPAY_ADDITIONAL_HOSTNAMES="$BTCPAY_ADDITIONAL_HOSTNAMES"
|
||||||
|
|
||||||
if [ -z "$GHOST_MYSQL_PASSWORD" ]; then
|
if [ "$DEPLOY_GHOST" = true ]; then
|
||||||
echo "ERROR: Ensure GHOST_MYSQL_PASSWORD is configured in your site_definition."
|
if [ -z "$GHOST_MYSQL_PASSWORD" ]; then
|
||||||
exit 1
|
echo "ERROR: Ensure GHOST_MYSQL_PASSWORD is configured in your site_definition."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$GHOST_MYSQL_ROOT_PASSWORD" ]; then
|
||||||
|
echo "ERROR: Ensure GHOST_MYSQL_ROOT_PASSWORD is configured in your site_definition."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$GHOST_MYSQL_ROOT_PASSWORD" ]; then
|
if [ "$DEPLOY_GITEA" = true ]; then
|
||||||
echo "ERROR: Ensure GHOST_MYSQL_ROOT_PASSWORD is configured in your site_definition."
|
if [ -z "$GITEA_MYSQL_PASSWORD" ]; then
|
||||||
exit 1
|
echo "ERROR: Ensure GITEA_MYSQL_PASSWORD is configured in your site_definition."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -z "$GITEA_MYSQL_ROOT_PASSWORD" ]; then
|
||||||
|
echo "ERROR: Ensure GITEA_MYSQL_ROOT_PASSWORD is configured in your site_definition."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$NEXTCLOUD_MYSQL_PASSWORD" ]; then
|
if [ "$DEPLOY_NEXTCLOUD" = true ]; then
|
||||||
echo "ERROR: Ensure NEXTCLOUD_MYSQL_PASSWORD is configured in your site_definition."
|
if [ -z "$NEXTCLOUD_MYSQL_ROOT_PASSWORD" ]; then
|
||||||
exit 1
|
echo "ERROR: Ensure NEXTCLOUD_MYSQL_ROOT_PASSWORD is configured in your site_definition."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$NEXTCLOUD_MYSQL_PASSWORD" ]; then
|
||||||
|
echo "ERROR: Ensure NEXTCLOUD_MYSQL_PASSWORD is configured in your site_definition."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$GITEA_MYSQL_PASSWORD" ]; then
|
if [ "$DEPLOY_MATRIX" = true ]; then
|
||||||
echo "ERROR: Ensure GITEA_MYSQL_PASSWORD is configured in your site_definition."
|
if [ -z "$MATRIX_ADMIN_PASSWORD" ]; then
|
||||||
exit 1
|
echo "ERROR: Ensure MATRIX_ADMIN_PASSWORD is configured in your site_definition."
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$NEXTCLOUD_MYSQL_ROOT_PASSWORD" ]; then
|
if [ -z "$MATRIX_DB_PASSWORD" ]; then
|
||||||
echo "ERROR: Ensure NEXTCLOUD_MYSQL_ROOT_PASSWORD is configured in your site_definition."
|
echo "ERROR: Ensure MATRIX_DB_PASSWORD is configured in your site_definition."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$GITEA_MYSQL_ROOT_PASSWORD" ]; then
|
|
||||||
echo "ERROR: Ensure GITEA_MYSQL_ROOT_PASSWORD is configured in your site_definition."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ -z "$MATRIX_ADMIN_PASSWORD" ]; then
|
|
||||||
echo "ERROR: Ensure MATRIX_ADMIN_PASSWORD is configured in your site_definition."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then
|
if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then
|
||||||
@ -191,11 +204,6 @@ if [ -z "$SITE_TITLE" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$MATRIX_DB_PASSWORD" ]; then
|
|
||||||
echo "ERROR: Ensure MATRIX_DB_PASSWORD is configured in your site_definition."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DEPLOY_BTCPPAY_SERVER" ]; then
|
if [ -z "$DEPLOY_BTCPPAY_SERVER" ]; then
|
||||||
echo "ERROR: Ensure DEPLOY_BTCPPAY_SERVER is configured in your site_definition."
|
echo "ERROR: Ensure DEPLOY_BTCPPAY_SERVER is configured in your site_definition."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user