Renumbered confiles to start at 0

This commit is contained in:
troymc 2016-04-26 16:49:50 +02:00
parent 653a6a231c
commit 4d965a8b34
3 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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