Sylvain Bellemare 9b662ff199 Add test for monitor
2016-02-23 09:39:56 +01:00
2016-02-22 16:20:20 +01:00
2016-02-22 11:27:18 +01:00
2016-02-23 09:39:56 +01:00
2016-02-10 19:55:33 +01:00
2016-02-19 00:26:38 +01:00
2016-02-10 19:55:33 +01:00
2016-02-22 14:17:06 +01:00
2016-02-10 19:55:33 +01:00
2016-02-22 16:20:20 +01:00
2016-02-10 15:48:31 +01:00
2016-02-10 19:55:33 +01:00
2016-02-19 00:26:38 +01:00

BigchainDB

Join the chat at https://gitter.im/bigchaindb/bigchaindb PyPI Travis branch Codecov branch Documentation Status

Documentation

Documentation is available at https://bigchaindb.readthedocs.org/

Getting started

Install RethinkDB

On Ubuntu

# install rethinkdb https://rethinkdb.com/docs/install/ubuntu/
$ source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
$ wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install rethinkdb

# start rethinkdb
$ rethinkdb

On other platforms

To install RethinkDB on other platform, please refer to the official documentation.

Install BigchainDB

$ pip install bigchaindb

Running BigchainDB

Currently BigchainDB only supports Python 3.4+

Start the main process. If it's the first time bigchaindb will generate a default configuration file for you.

$ bigchaindb start

Generate some tests transactions:

$ bigchaindb-benchmark load # add '-m' if you want to use all your cores

To know more about the bigchain command run

$ bigchaindb -h

Importing BigchainDB from the interpreter (python/ipython)

Make sure your rethinkdb process is running.

>>> from bigchaindb import Bigchain
>>> b = Bigchain()
>>> b.me
'2B8C8PJxhycFzn4wncRhBNmMWwE5Frr9nLBUa1dGGxj5W'

Configuration

BigchainDB creates a default configuration file on $HOME/.bigchaindb on the first run.

$ bigchaindb show-config

Testing

$ py.test -v

Monitoring

BigchainDB uses statsd for monitoring. To fully take advantage of this functionality requires some additional infrastructure: an agent to listen for metrics (e.g. telegraf), a time-series database (e.g. influxdb, and a frontend to display analytics (e.g. Grafana).

For ease of use, we've provided a docker compose file that sets up all these services for testing. Simply run in the BigchainDB directory:

$ docker-compose -f docker-compose-monitor.yml build
$ docker-compose -f docker-compose-monitor.yml up

and point a browser tab to http://localhost:3000/dashboard/script/bigchaindb_dashboard.js. Login and password are admin by default. If BigchainDB is running and processing transactions, you should see analytics—if not, start BigchainDB as above, and refresh the page after a few seconds.

If you're not interested in monitoring, don't worry: BigchainDB will function just fine without any monitoring setup.

Feel free to modify the custom Grafana dashboard to your liking!

Description
Meet BigchainDB. The blockchain database.
Readme 15 MiB
Languages
Python 83.6%
Shell 12.5%
Lua 1.6%
Dockerfile 0.8%
Jinja 0.7%
Other 0.8%