diff --git a/.gitignore b/.gitignore index ae5d85fa..d94467b1 100644 --- a/.gitignore +++ b/.gitignore @@ -69,5 +69,5 @@ target/ *.pem # Some files created when deploying a cluster on AWS -deploy-cluster-aws/conf/bigchaindb.conf +deploy-cluster-aws/conf/rethinkdb.conf deploy-cluster-aws/hostlist.py diff --git a/deploy-cluster-aws/conf/bigchaindb.conf.template b/deploy-cluster-aws/conf/rethinkdb.conf.template similarity index 100% rename from deploy-cluster-aws/conf/bigchaindb.conf.template rename to deploy-cluster-aws/conf/rethinkdb.conf.template diff --git a/deploy-cluster-aws/create_bigchaindb_conf.py b/deploy-cluster-aws/create_rethinkdb_conf.py similarity index 74% rename from deploy-cluster-aws/create_bigchaindb_conf.py rename to deploy-cluster-aws/create_rethinkdb_conf.py index 4ac5a73e..268dd710 100644 --- a/deploy-cluster-aws/create_bigchaindb_conf.py +++ b/deploy-cluster-aws/create_rethinkdb_conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -"""(Re)create the RethinkDB configuration file conf/bigchaindb.conf. -Start with conf/bigchaindb.conf.template +"""(Re)create the RethinkDB configuration file conf/rethinkdb.conf. +Start with conf/rethinkdb.conf.template then append additional configuration settings (lines). """ @@ -13,14 +13,14 @@ from hostlist import hosts_dev # cwd = current working directory old_cwd = os.getcwd() os.chdir('conf') -if os.path.isfile('bigchaindb.conf'): - os.remove('bigchaindb.conf') +if os.path.isfile('rethinkdb.conf'): + os.remove('rethinkdb.conf') -# Create the initial bigchaindb.conf using bigchaindb.conf.template -shutil.copy2('bigchaindb.conf.template', 'bigchaindb.conf') +# Create the initial rethinkdb.conf using rethinkdb.conf.template +shutil.copy2('rethinkdb.conf.template', 'rethinkdb.conf') -# Append additional lines to bigchaindb.conf -with open('bigchaindb.conf', 'a') as f: +# Append additional lines to rethinkdb.conf +with open('rethinkdb.conf', 'a') as f: f.write('## The host:port of a node that RethinkDB will connect to\n') for public_dns_name in hosts_dev: f.write('join=' + public_dns_name + ':29015\n') diff --git a/deploy-cluster-aws/fabfile.py b/deploy-cluster-aws/fabfile.py index 1fc64184..705c1b37 100644 --- a/deploy-cluster-aws/fabfile.py +++ b/deploy-cluster-aws/fabfile.py @@ -86,7 +86,7 @@ def install_rethinkdb(): # change fs to user sudo('chown -R rethinkdb:rethinkdb /data') # copy config file to target system - put('conf/bigchaindb.conf', + put('conf/rethinkdb.conf', '/etc/rethinkdb/instances.d/instance1.conf', mode=0600, use_sudo=True) # initialize data-dir sudo('rm -rf /data/*') diff --git a/deploy-cluster-aws/startup.sh b/deploy-cluster-aws/startup.sh index 3374052e..4d3b69c1 100755 --- a/deploy-cluster-aws/startup.sh +++ b/deploy-cluster-aws/startup.sh @@ -65,8 +65,8 @@ python launch_ec2_nodes.py --tag $TAG --nodes $NODES chmod +x add2known_hosts.sh ./add2known_hosts.sh -# (Re)create the RethinkDB configuration file conf/bigchaindb.conf -python create_bigchaindb_conf.py +# (Re)create the RethinkDB configuration file conf/rethinkdb.conf +python create_rethinkdb_conf.py # rollout base packages (dependencies) needed before # storage backend (rethinkdb) and bigchaindb can be rolled out @@ -79,10 +79,10 @@ fab install_rethinkdb fab install_bigchaindb # generate genesis block -# HORST is the last public_dns_name listed in conf/bigchaindb.conf +# HORST is the last public_dns_name listed in conf/rethinkdb.conf # For example: # ec2-52-58-86-145.eu-central-1.compute.amazonaws.com -HORST=`tail -1 conf/bigchaindb.conf|cut -d: -f1|cut -d= -f2` +HORST=`tail -1 conf/rethinkdb.conf|cut -d: -f1|cut -d= -f2` fab -H $HORST -f fab_prepare_chain.py init_bigchaindb # initiate sharding