Merge pull request 'Use config file in all scripts' (#1) from dboreham/fix-lib-use into main

Reviewed-on: #1
This commit is contained in:
David Boreham 2024-07-12 15:39:13 +00:00
commit 9bf0e4bbde
7 changed files with 19 additions and 18 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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