mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Added fab task to run monitor
Updated documentation
This commit is contained in:
parent
b82e60f074
commit
389319e497
@ -17,7 +17,7 @@ def install_docker_engine():
|
||||
Example:
|
||||
fab --fabfile=fabfile-monitor.py \
|
||||
--hosts=ec2-52-58-106-17.eu-central-1.compute.amazonaws.com \
|
||||
install_docker
|
||||
install_docker_engine
|
||||
"""
|
||||
|
||||
# install prerequisites
|
||||
@ -40,13 +40,40 @@ def install_docker_engine():
|
||||
|
||||
@task
|
||||
def install_docker_compose():
|
||||
"""Install docker-compose on an ec2 ubuntu 14.04 instance
|
||||
|
||||
Example:
|
||||
fab --fabfile=fabfile-monitor.py \
|
||||
--hosts=ec2-52-58-106-17.eu-central-1.compute.amazonaws.com \
|
||||
install_docker_compose
|
||||
"""
|
||||
sudo('curl -L https://github.com/docker/compose/releases/download/1.7.0/docker-compose-`uname \
|
||||
-s`-`uname -m` > /usr/local/bin/docker-compose')
|
||||
sudo('chmod +x /usr/local/bin/docker-compose')
|
||||
|
||||
|
||||
@task
|
||||
def install_docker():
|
||||
"""Install docker and docker-compose on an ec2 ubuntu 14.04 instance
|
||||
|
||||
Example:
|
||||
fab --fabfile=fabfile-monitor.py \
|
||||
--hosts=ec2-52-58-106-17.eu-central-1.compute.amazonaws.com \
|
||||
install_docker
|
||||
"""
|
||||
install_docker_engine()
|
||||
install_docker_compose()
|
||||
|
||||
|
||||
@task
|
||||
def run_monitor():
|
||||
"""Run bigchaindb monitor on an ec2 ubuntu 14.04 instance
|
||||
|
||||
Example:
|
||||
fab --fabfile=fabfile-monitor.py \
|
||||
--hosts=ec2-52-58-106-17.eu-central-1.compute.amazonaws.com \
|
||||
run_monitor
|
||||
"""
|
||||
# copy docker-compose-monitor to the ec2 instance
|
||||
put('../docker-compose-monitor.yml')
|
||||
run('docker-compose -f docker-compose-monitor.yml up -d')
|
||||
run('INFLUXDB_DATA=/influxdb-data docker-compose -f docker-compose-monitor.yml up -d')
|
||||
|
@ -149,6 +149,28 @@ You have 2 allocated elactic IPs which are not associated with instances
|
||||
(It has Domain = vpc.)
|
||||
```
|
||||
|
||||
## BigchainDB Monitor Deployment
|
||||
|
||||
The deployment for the monitor requires an aws ec2 instance running Ubuntu 14.04 with a system folder `/influxdb-data`.
|
||||
This folder can be a [mount point of an EBS volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html)
|
||||
for data persistence.
|
||||
|
||||
With the instance setup we first need to install `docker` and `docker-compose`:
|
||||
```text
|
||||
$ fab --fabfile=fabfile-monitor.py --hosts=<ec2 host name> install_docker
|
||||
```
|
||||
|
||||
After docker is installed run the monitor with:
|
||||
```text
|
||||
$ fab --fabfile=fabfile-monitor.py --hosts=<ec2 host name> run_monitor
|
||||
```
|
||||
|
||||
To access the monitor follow the instructions on [Monitoring](monitoring.html) replacing `localhost` with the
|
||||
hostname of the ec2 instance running the monitor.
|
||||
|
||||
To configure bigchaindb to start sending statistics to the monitor change statsd host in the configuration file
|
||||
(in `$HOME/.bigchaindb` by default) to the hostname of the ec2 instance running the monitor.
|
||||
|
||||
## Known Deployment Issues
|
||||
|
||||
### NetworkError
|
||||
|
@ -16,7 +16,12 @@ $ docker-compose -f docker-compose-monitor.yml build
|
||||
$ docker-compose -f docker-compose-monitor.yml up
|
||||
```
|
||||
|
||||
then point a browser tab to:
|
||||
It is also possible to mount a host directory as a data volume for influxdb by settings the `INFLUXDB_DATA` env.
|
||||
```text
|
||||
$ INFLUXDB_DATA=/data docker-compose -f docker-compose-monitor up
|
||||
```
|
||||
|
||||
After starting docker-compose point a browser tab to:
|
||||
|
||||
[http://localhost:3000/dashboard/script/bigchaindb_dashboard.js](http://localhost:3000/dashboard/script/bigchaindb_dashboard.js)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user