Merge pull request #870 from bigchaindb/bugfix-in-create-rethinkdb-conf

Fixed bug in create_rethinkdb_conf.py
This commit is contained in:
Troy McConaghy 2016-11-29 09:17:01 +01:00 committed by GitHub
commit 8d69418429
2 changed files with 12 additions and 7 deletions

View File

@ -44,7 +44,8 @@ echo "IMAGE_ID = "$IMAGE_ID
echo "INSTANCE_TYPE = "$INSTANCE_TYPE echo "INSTANCE_TYPE = "$INSTANCE_TYPE
echo "SECURITY_GROUP = "$SECURITY_GROUP echo "SECURITY_GROUP = "$SECURITY_GROUP
echo "USING_EBS = "$USING_EBS echo "USING_EBS = "$USING_EBS
if [ "$USING_EBS" = True ]; then # Treat booleans as strings which must be either "True" or "False"
if [ "$USING_EBS" == "True" ]; then
echo "EBS_VOLUME_SIZE = "$EBS_VOLUME_SIZE echo "EBS_VOLUME_SIZE = "$EBS_VOLUME_SIZE
echo "EBS_OPTIMIZED = "$EBS_OPTIMIZED echo "EBS_OPTIMIZED = "$EBS_OPTIMIZED
fi fi
@ -117,7 +118,11 @@ fab upgrade_setuptools
if [ "$WHAT_TO_DEPLOY" == "servers" ]; then if [ "$WHAT_TO_DEPLOY" == "servers" ]; then
# (Re)create the RethinkDB configuration file conf/rethinkdb.conf # (Re)create the RethinkDB configuration file conf/rethinkdb.conf
python create_rethinkdb_conf.py --bind-http-to-localhost $BIND_HTTP_TO_LOCALHOST if [ "$BIND_HTTP_TO_LOCALHOST" == "True" ]; then
python create_rethinkdb_conf.py --bind-http-to-localhost
else
python create_rethinkdb_conf.py
fi
# Rollout RethinkDB and start it # Rollout RethinkDB and start it
fab prep_rethinkdb_storage:$USING_EBS fab prep_rethinkdb_storage:$USING_EBS
fab install_rethinkdb fab install_rethinkdb

View File

@ -13,14 +13,14 @@ from hostlist import public_dns_names
# Parse the command-line arguments # Parse the command-line arguments
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--bind-http-to-localhost", # The next line isn't strictly necessary, but it clarifies the default case:
help="should RethinkDB web interface be bound to localhost?", parser.set_defaults(bind_http_to_localhost=False)
required=True) parser.add_argument('--bind-http-to-localhost',
action='store_true',
help='should RethinkDB web interface be bound to localhost?')
args = parser.parse_args() args = parser.parse_args()
bind_http_to_localhost = args.bind_http_to_localhost bind_http_to_localhost = args.bind_http_to_localhost
print('bind_http_to_localhost = {}'.format(bind_http_to_localhost))
# cwd = current working directory # cwd = current working directory
old_cwd = os.getcwd() old_cwd = os.getcwd()
os.chdir('conf') os.chdir('conf')