1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-17 18:13:22 +02:00
bigchaindb/.ci/travis-before-script.sh
Rodolphe Marques e7ffcf5705 Added replicaset name to bigchaindb config (#1063)
* Added replicaset name to bigchaindb config

* changed travis replSet to match bigchaindb default

* Updated initialize_replica_set

It now initializes the replica set with the name provided by the
bigchaindb config file.


* initialize_replica_set is now called when creating a mongodb connection.

This way we are sure that a replica set exists when we return a
connection.

* Moved the initialize replica set logic to the connection.

* update the config documentation
2017-01-20 14:05:28 +01:00

13 lines
413 B
Bash
Executable File

#!/bin/bash
set -e -x
if [[ "${TOXENV}" == *-rdb ]]; then
rethinkdb --daemon
elif [[ "${BIGCHAINDB_DATABASE_BACKEND}" == mongodb ]]; then
wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-3.4.1.tgz -O /tmp/mongodb.tgz
tar -xvf /tmp/mongodb.tgz
mkdir /tmp/mongodb-data
${PWD}/mongodb-linux-x86_64-3.4.1/bin/mongod --dbpath=/tmp/mongodb-data --replSet=bigchain-rs &> /dev/null &
fi