Rename to remote.conf

This commit is contained in:
Derek Smith 2023-03-13 13:40:47 -04:00
parent d283dfb353
commit 514ae6ce24
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
3 changed files with 13 additions and 15 deletions

View File

@ -8,10 +8,11 @@ cd "$(dirname "$0")"
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN" PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN"
export PROJECT_NAME="$PROJECT_NAME" export PROJECT_NAME="$PROJECT_NAME"
PROJECT_PATH="$PROJECTS_DIR/$PROJECT_NAME" PROJECT_PATH="$PROJECTS_DIR/$PROJECT_NAME"
PROJECT_DEFINITION_PATH="$PROJECT_PATH/project_definition" export PROJECT_PATH="$PROJECT_PATH"
PROJECT_DEFINITION_PATH="$PROJECT_PATH/project.conf"
if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then
echo "ERROR: 'project_definition' not found $PROJECT_DEFINITION_PATH not found." echo "ERROR: 'project.conf' not found $PROJECT_DEFINITION_PATH not found."
exit 1 exit 1
fi fi

View File

@ -22,28 +22,25 @@ fi
source ../defaults.sh source ../defaults.sh
export REMOTE_PATH="$REMOTES_DIR/$REMOTE_NAME" export REMOTE_PATH="$REMOTES_DIR/$REMOTE_NAME"
REMOTE_DEFINITION="$REMOTE_PATH/remote_definition" REMOTE_DEFINITION="$REMOTE_PATH/remote.conf"
export REMOTE_DEFINITION="$REMOTE_DEFINITION" export REMOTE_DEFINITION="$REMOTE_DEFINITION"
mkdir -p "$REMOTE_PATH" mkdir -p "$REMOTE_PATH"
if [ ! -f "$REMOTE_DEFINITION" ]; then if [ ! -f "$REMOTE_DEFINITION" ]; then
# stub out a remote_definition. # stub out a remote.conf.
cat >"$REMOTE_DEFINITION" <<EOL cat >"$REMOTE_DEFINITION" <<EOL
#!/bin/bash # https://www.sovereign-stack.org/ss-remote
# see https://www.sovereign-stack.org/remote for more info! LXD_REMOTE_PASSWORD="$(gpg --gen-random --armor 1 14)"
DEPLOYMENT_STRING="(dev|regtest),(staging|testnet)"
export LXD_REMOTE_PASSWORD="$(gpg --gen-random --armor 1 14)" # REGISTRY_URL=http://registry.domain.tld:5000
export BITCOIN_CHAIN="regtest"
export PROJECT_PREFIX="$REMOTE_NAME"
#export REGISTRY_URL=http://registry.domain.tld:5000
EOL EOL
chmod 0744 "$REMOTE_DEFINITION" chmod 0744 "$REMOTE_DEFINITION"
echo "We stubbed out a '$REMOTE_DEFINITION' file for you." echo "We stubbed out a '$REMOTE_DEFINITION' file for you."
echo "Use this file to customize your remote deployment;" echo "Use this file to customize your remote deployment;"
echo "Check out 'https://www.sovereign-stack.org/remote' for more information." echo "Check out 'https://www.sovereign-stack.org/ss-remote' for more information."
exit 1 exit 1
fi fi
@ -140,7 +137,7 @@ IP_OF_MGMT_MACHINE="$(echo "$IP_OF_MGMT_MACHINE" | cut -d: -f1)"
# error out if the remote password is unset. # error out if the remote password is unset.
if [ -z "$LXD_REMOTE_PASSWORD" ]; then if [ -z "$LXD_REMOTE_PASSWORD" ]; then
echo "ERROR: LXD_REMOTE_PASSWORD must be set in your remote_definition." echo "ERROR: LXD_REMOTE_PASSWORD must be set in your remote.conf file."
exit 1 exit 1
fi fi

View File

@ -27,13 +27,13 @@ if echo "$CURRENT_REMOTE" | grep -q "production"; then
fi fi
export REMOTE_PATH="$REMOTES_DIR/$CURRENT_REMOTE" export REMOTE_PATH="$REMOTES_DIR/$CURRENT_REMOTE"
REMOTE_DEFINITION="$REMOTE_PATH/remote_definition" REMOTE_DEFINITION="$REMOTE_PATH/remote.conf"
export REMOTE_DEFINITION="$REMOTE_DEFINITION" export REMOTE_DEFINITION="$REMOTE_DEFINITION"
# ensure the remote definition exists. # ensure the remote definition exists.
if [ ! -f "$REMOTE_DEFINITION" ]; then if [ ! -f "$REMOTE_DEFINITION" ]; then
echo "ERROR: The remote definition could not be found. You may need to run 'ss-remote'." echo "ERROR: The remote definition could not be found. You may need to run 'ss-remote'."
echo "INFO: Consult https://www.sovereign-stack.org/remote for more information." echo "INFO: Consult https://www.sovereign-stack.org/ss-remote for more information."
exit 1 exit 1
fi fi