Merge remote-tracking branch 'remotes/origin/master' into feat/128/multiple-input-output

Conflicts:
	bigchaindb/crypto.py
	bigchaindb/util.py
	docs/source/python-server-api-examples.md
	setup.py
This commit is contained in:
diminator 2016-04-26 17:45:26 +02:00
commit e3774bae82
No known key found for this signature in database
GPG Key ID: C3D8590E6D0D439A
8 changed files with 115 additions and 39 deletions

View File

@ -11,27 +11,60 @@ For reference, the possible headings are:
* **Removed** for deprecated features removed in this release.
* **Fixed** for any bug fixes.
* **Security** to invite users to upgrade in case of vulnerabilities.
* **External Contributors** to list contributors outside of ascribe GmbH.
## [Unreleased] - YYYY-MM-DD
Tag name: TBD
= commit: TBD
committed: TBD
## [0.2.0] - 2016-04-26
Tag name: v0.2.0
= commit: 0c4a2b380aabdcf50fa2d7fb351c290aaedc3db7
committed: April 26, 2016, 11:09 AM GMT+2
### Added
- AWS deployment scripts: [Issue #151](https://github.com/bigchaindb/bigchaindb/issues/151)
- `CHANGELOG.md` (this file)
- Ability to use environment variables to set (or partially set) configuration settings: [Pull Request #153](https://github.com/bigchaindb/bigchaindb/pull/153)
- `bigchaindb --export-my-pubkey`: [Pull Request #186](https://github.com/bigchaindb/bigchaindb/pull/186)
- `bigchaindb --version`, and one central source for the current version (`version.py`): [Pull Request #208](https://github.com/bigchaindb/bigchaindb/pull/208)
- AWS deployment scripts: Pull Requests
[#160](https://github.com/bigchaindb/bigchaindb/pull/160),
[#166](https://github.com/bigchaindb/bigchaindb/pull/166),
[#172](https://github.com/bigchaindb/bigchaindb/pull/172),
[#203](https://github.com/bigchaindb/bigchaindb/pull/203)
- `codecov.yml`: [Pull Request #161](https://github.com/bigchaindb/bigchaindb/pull/161)
- `CHANGELOG.md` (this file): [Pull Request #117](https://github.com/bigchaindb/bigchaindb/pull/117)
- Signatures using Ed25519: Pull Requests
[#138](https://github.com/bigchaindb/bigchaindb/pull/138),
[#152](https://github.com/bigchaindb/bigchaindb/pull/152)
- Multisig support: [Pull Request #107](https://github.com/bigchaindb/bigchaindb/pull/107)
- API/Wire protocol (RESTful HTTP API): [Pull Request #102](https://github.com/bigchaindb/bigchaindb/pull/102)
- HTTP Server & Web API: Pull Requests
[#102](https://github.com/bigchaindb/bigchaindb/pull/102),
[#150](https://github.com/bigchaindb/bigchaindb/pull/150),
[#155](https://github.com/bigchaindb/bigchaindb/pull/155),
[#183](https://github.com/bigchaindb/bigchaindb/pull/183)
- Python driver/SDK/API: [Pull Request #102](https://github.com/bigchaindb/bigchaindb/pull/102)
- Python Style Guide: [Pull Request #89](https://github.com/bigchaindb/bigchaindb/pull/89)
- Monitoring & dashboard tools: [Pull Request #72](https://github.com/bigchaindb/bigchaindb/pull/72)
- Monitoring & dashboard tools: Pull Requests
[#72](https://github.com/bigchaindb/bigchaindb/pull/72),
[#181](https://github.com/bigchaindb/bigchaindb/pull/181)
### Changed
- Rewrote [`README.md`](https://github.com/bigchaindb/bigchaindb/blob/develop/README.md) into four sets of links: Pull Requests [#80](https://github.com/bigchaindb/bigchaindb/pull/80) and [#115](https://github.com/bigchaindb/bigchaindb/pull/115)
- Rewrote [`README.md`](README.md) into four sets of links: Pull Requests [#80](https://github.com/bigchaindb/bigchaindb/pull/80) and [#115](https://github.com/bigchaindb/bigchaindb/pull/115)
### Fixed
- Bug related to config overwrite: [Pull Request #97](https://github.com/bigchaindb/bigchaindb/pull/97)
- Bug related to running the `bigchaindb-benchmark load` on docker [Pull Request #225](https://github.com/bigchaindb/bigchaindb/pull/225)
## External Contributors
- [@thedoctor](https://github.com/thedoctor): Pull Requests
[#99](https://github.com/bigchaindb/bigchaindb/pull/99),
[#136](https://github.com/bigchaindb/bigchaindb/pull/136)
- [@roderik](https://github.com/roderik): [Pull Request #162](https://github.com/bigchaindb/bigchaindb/pull/162)
## [0.1.5] - 2016-04-20
Tag name: v0.1.5
= commit: 9f62cddbaf44167692cfee71db707bce93e3395f
committed: April 20, 2016, 3:31 PM GMT+2
### Fixed
- [Issue #71](https://github.com/bigchaindb/bigchaindb/issues/71) (Voter is not validating blocks correctly when checking for double spends) in [Pull Request #76](https://github.com/bigchaindb/bigchaindb/pull/76)

View File

@ -171,7 +171,7 @@ class Bigchain(object):
Returns:
A list of transactions containing that payload. If no transaction exists with that payload it
returns `None`
returns an empty list `[]`
"""
cursor = r.table('bigchain') \

View File

@ -1,2 +1,2 @@
__version__ = '0.1.5'
__short_version__ = '0.1'
__version__ = '0.2.0'
__short_version__ = '0.2'

View File

@ -64,10 +64,12 @@ def install_base_software():
sudo('dpkg --configure -a')
sudo('apt-get -y -f install')
sudo('apt-get -y install build-essential wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 libssl-dev \
git gcc g++ python-dev libboost-python-dev libffi-dev \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git gcc g++ python3-dev libboost-python-dev \
software-properties-common python-software-properties \
python3-pip ipython3 sysstat s3cmd')
python3-setuptools ipython3 sysstat s3cmd')
sudo('easy_install3 pip')
sudo('pip install -U pip wheel setuptools')
# Install RethinkDB
@ -111,11 +113,22 @@ def install_rethinkdb():
sudo('/etc/init.d/rethinkdb restart')
# Install BigchainDB (from PyPI)
# Install BigchainDB from PyPI
@task
@parallel
def install_bigchaindb():
sudo('python3 -m pip install bigchaindb')
def install_bigchaindb_from_pypi():
sudo('pip3 install bigchaindb')
# Install BigchainDB from a Git archive file
# named bigchaindb-archive.tar.gz
@task
@parallel
def install_bigchaindb_from_git_archive():
put('bigchaindb-archive.tar.gz')
run('tar xvfz bigchaindb-archive.tar.gz')
sudo('pip3 install .')
# sudo('python3 setup.py install')
# Configure BigchainDB

View File

@ -1,22 +1,21 @@
#! /bin/bash
# The set -e option instructs bash to immediately exit if any command has a non-zero exit status
# The set -e option instructs bash to immediately exit
# if any command has a non-zero exit status
set -e
function printErr()
{
echo "usage: ./startup.sh <tag> <number_of_nodes_in_cluster>"
echo "usage: ./startup.sh <tag> <number_of_nodes_in_cluster> <pypi_or_branch>"
echo "No argument $1 supplied"
}
if [ -z "$1" ]
then
if [ -z "$1" ]; then
printErr "<tag>"
exit 1
fi
if [ -z "$2" ]
then
if [ -z "$2" ]; then
printErr "<number_of_nodes_in_cluster>"
exit 1
fi
@ -24,11 +23,19 @@ fi
TAG=$1
NODES=$2
# If they don't include a third argument (<pypi_or_branch>)
# then assume BRANCH = "pypi" by default
if [ -z "$3" ]; then
echo "No third argument was specified, so BigchainDB will be installed from PyPI"
BRANCH="pypi"
else
BRANCH=$3
fi
# Check for AWS private key file (.pem file)
if [ ! -f "pem/bigchaindb.pem" ]
then
echo "File pem/bigchaindb.pem (AWS private key) is missing"
exit 1
if [ ! -f "pem/bigchaindb.pem" ]; then
echo "File pem/bigchaindb.pem (AWS private key) is missing"
exit 1
fi
# Change the file permissions on pem/bigchaindb.pem
@ -63,16 +70,29 @@ fab install_base_software
fab install_rethinkdb
# Rollout BigchainDB (but don't start it yet)
fab install_bigchaindb
if [ "$BRANCH" == "pypi" ]; then
fab install_bigchaindb_from_pypi
else
cd ..
rm -f bigchaindb-archive.tar.gz
git archive $BRANCH --format=tar --output=bigchaindb-archive.tar
# TODO: the archive could exclude more files besides the .gitignore ones
# such as the docs. See http://tinyurl.com/zo6fxeg
gzip bigchaindb-archive.tar
mv bigchaindb-archive.tar.gz deploy-cluster-aws
cd deploy-cluster-aws
fab install_bigchaindb_from_git_archive
rm bigchaindb-archive.tar.gz
fi
# Configure BigchainDB on all nodes
fab configure_bigchaindb
# TODO Get public keys from all nodes
# using e.g. bigchaindb export-pubkey
# TODO: Get public keys from all nodes
# TODO: Add list of public keys to keyring of all nodes
# TODO Add list of public keys to keyring of all nodes
# using e.g. bigchaindb import-pubkey
# Send a "bigchaindb init" command to one node
# to initialize the BigchainDB database

View File

@ -14,6 +14,7 @@ rethinkdb-data:
bigchaindb:
build: .
container_name: docker-bigchaindb
volumes:
- ./bigchaindb:/usr/src/app/bigchaindb
- ./tests:/usr/src/app/tests

View File

@ -85,14 +85,23 @@ Add some rules for Inbound traffic:
## Deployment
Here's an example of how one could launch a BigchainDB cluster of 4 nodes tagged `wrigley` on AWS:
Here's an example of how one could launch a BigchainDB cluster of four nodes tagged `wrigley` on AWS:
```text
cd bigchaindb
cd deploy-cluster-aws
./startup.sh wrigley 4
./startup.sh wrigley 4 pypi
```
`startup.sh` is a Bash script which calls some Python 2 and Fabric scripts. Here's what it does:
The `pypi` on the end means that it will install the latest (stable) `bigchaindb` package from the [Python Package Index (PyPI)](https://pypi.python.org/pypi). That is, on each instance, BigchainDB is installed using `pip install bigchaindb`.
`startup.sh` is a Bash script which calls some Python and Fabric scripts. The usage is:
```text
./startup.sh <tag> <number_of_nodes_in_cluster> <pypi_or_branch>
```
The first two arguments are self-explanatory. The third argument can be `pypi` or the name of a local Git branch (e.g. `master` or `feat/3752/quote-asimov-on-tuesdays`). If you don't include a third argument, then `pypi` will be assumed by default.
Here's what the `startup.sh` script does; it:
0. allocates more elastic IP addresses if necessary,
1. launches the specified number of nodes (instances) on Amazon EC2,
@ -104,7 +113,7 @@ cd deploy-cluster-aws
7. installs base (prerequisite) software on all instances,
8. installs RethinkDB on all instances,
9. installs BigchainDB on all instances,
10. generates the genesis block,
10. initializes the BigchainDB database,
11. starts BigchainDB on all instances.
It should take a few minutes for the deployment to finish. If you run into problems, see the section on Known Deployment Issues below.

View File

@ -135,7 +135,7 @@ API Server bind? (default `localhost:9984`):
Database host? (default `localhost`): rethinkdb
Database port? (default `28015`):
Database name? (default `bigchain`):
Statsd host? (default `localhost`): statsd
Statsd host? (default `localhost`):
Statsd port? (default `8125`):
Statsd rate? (default `0.01`):
Ready to go!
@ -152,7 +152,7 @@ $ docker-compose up -d
then you can load test transactions via:
```text
$ docker-compose run --rm bigchaindb bigchaindb-benchmark load
$ docker exec -it docker-bigchaindb bigchaindb-benchmark load -m
```
If you're on Linux, you can probably view the RethinkDB dashboard at: