Use config file in all scripts #1

Merged
dboreham merged 1 commits from dboreham/fix-lib-use into main 2024-07-12 15:39:14 +00:00
7 changed files with 19 additions and 18 deletions

View File

@ -4,6 +4,9 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/lib.sh
if [[ -n "$1" ]]; then
machine_name_prefix=$1
else
@ -11,11 +14,6 @@ else
exit 1
fi
machine_domain=borgboxes.network
node_count=4
node_network_dir=testnet-dir
chain_id=laconic_81337-6
echo "Initializing network dirs on all nodes"
for (( i=1 ; i<=$node_count ; i++ ));
do

View File

@ -4,6 +4,9 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/lib.sh
if [[ -n "$1" ]]; then
machine_name_prefix=$1
else
@ -11,10 +14,6 @@ else
exit 1
fi
machine_domain=borgboxes.network
node_count=4
node_network_dir=testnet-dir
chain_id=laconic_81337-6a
p2p_port="26656"
so_command=/home/laconic/bin/laconic-so

View File

@ -4,6 +4,9 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/lib.sh
usage="Usage: $0 <machine-name-prefix> <peers>"
if [[ -n "$1" ]]; then
@ -20,9 +23,6 @@ else
exit 1
fi
machine_domain=borgboxes.network
node_count=4
node_network_dir=testnet-dir
so_command=/home/laconic/bin/laconic-so
echo "Run deploy init on all nodes"

View File

@ -4,6 +4,9 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/lib.sh
if [[ -n "$1" ]]; then
machine_name_prefix=$1
else
@ -11,9 +14,6 @@ else
exit 1
fi
machine_domain=borgboxes.network
node_count=4
node_network_dir=testnet-dir
so_command=/home/laconic/bin/laconic-so
echo "Delete deployment dirs on all nodes"

View File

@ -4,6 +4,9 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/lib.sh
if [[ -n "$1" ]]; then
machine_name_prefix=$1
else
@ -11,9 +14,6 @@ else
exit 1
fi
machine_domain=borgboxes.network
node_count=4
node_network_dir=testnet-dir
local_gentx_dir=gentx-${machine_name_prefix}
echo "Deleting network dirs on all nodes"

View File

@ -21,6 +21,8 @@ source ${network_config_file}
assert_defined "machine_domain"
assert_defined "node_count"
assert_defined "ssh_user"
assert_defined "node_network_dir"
assert_defined "chain_id"
# Hack until we fix PATH for remote sessions
so_command=/home/laconic/bin/laconic-so

View File

@ -1,3 +1,5 @@
machine_domain=borgboxes.network
node_count=4
ssh_user=laconic
node_network_dir=testnet-dir
chain_id=laconic_81337-6