From 4d965a8b3451a17d304603f150ae2f50579c2eba Mon Sep 17 00:00:00 2001 From: troymc Date: Tue, 26 Apr 2016 16:49:50 +0200 Subject: [PATCH] Renumbered confiles to start at 0 --- deploy-cluster-aws/fabfile.py | 7 +++---- deploy-cluster-aws/make_confiles.sh | 2 +- deploy-cluster-aws/startup.sh | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/deploy-cluster-aws/fabfile.py b/deploy-cluster-aws/fabfile.py index c0c2181c..e2e99e8d 100644 --- a/deploy-cluster-aws/fabfile.py +++ b/deploy-cluster-aws/fabfile.py @@ -38,14 +38,13 @@ def set_host(host_index): of the fab command that called it. Args: - host_index (int): 1, 2, 3, etc. + host_index (int): 0, 1, 2, 3, etc. Example: fab set_host:4 fab_task_A fab_task_B - will set env.hosts = [public_dns_names[3]] + will set env.hosts = [public_dns_names[4]] but only for doing fab_task_A and fab_task_B """ - env.hosts = [public_dns_names[int(host_index) - 1]] - print('Set env.hosts = {}'.format(env.hosts)) + env.hosts = [public_dns_names[int(host_index)]] # Install base software diff --git a/deploy-cluster-aws/make_confiles.sh b/deploy-cluster-aws/make_confiles.sh index 91f4d1fa..72735cb3 100755 --- a/deploy-cluster-aws/make_confiles.sh +++ b/deploy-cluster-aws/make_confiles.sh @@ -33,7 +33,7 @@ mkdir $CONFDIR # Use the bigchaindb configure command to create # $NUMFILES BigchainDB config files in $CONFDIR -for (( i=1; i<=$NUMFILES; i++ )); do +for (( i=0; i<$NUMFILES; i++ )); do CONPATH=$CONFDIR"/bcdb_conf"$i echo "Writing "$CONPATH bigchaindb -y -c $CONPATH configure diff --git a/deploy-cluster-aws/startup.sh b/deploy-cluster-aws/startup.sh index 923eb7af..f9ccbbe7 100755 --- a/deploy-cluster-aws/startup.sh +++ b/deploy-cluster-aws/startup.sh @@ -110,7 +110,7 @@ fi python clusterize_confiles.py confiles $NUM_NODES # Send one of the config files to each instance -for (( HOST=1 ; HOST<=$NUM_NODES ; HOST++ )); do +for (( HOST=0 ; HOST<$NUM_NODES ; HOST++ )); do CONFILE="bcdb_conf"$HOST echo "Sending "$CONFILE fab set_host:$HOST send_confile:$CONFILE