Last active
October 12, 2020 20:17
-
-
Save arsulegai/281476cdf983159d05a431cf554263c0 to your computer and use it in GitHub Desktop.
Steps to run multi node Hyperledger Sawtooth-Raft setup on single machine, with grafana statistics enabled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clone the https://github.com/hyperledger/sawtooth-core and https://github.com/hyperledger/sawtooth-raft repositories. | |
Step 1: Bring up admin service | |
$ cd sawtooth-raft/adhoc | |
$ docker-compose -f admin.yaml up -d | |
Step 2: Bring up grafana and influxdb services | |
$ cd sawtooth-raft/tests | |
$ SAWTOOTH_CORE=/path/to/repository/sawtooth-core docker-compose -f grafana.yaml up -d | |
Step 3: Bring up nodes as stated in sawtooth-raft documentation, | |
a. For example if it's non-genesis node | |
$ SAWTOOTH_CORE=/path/to/repository/sawtooth-core docker-compose -f node-with-stats.yaml -p nongenesis up | |
b. For example if it's genesis node | |
$ SAWTOOTH_CORE=/path/to/repository/sawtooth-core GENESIS=1 docker-compose -f node-with-stats.yaml -p genesis up | |
Step 4: To access grafana, go to browser and the link http://[IP-of-the-machine]:3000 | |
Troubleshooting: | |
1. For issues with proxy network builds add "--keyserver-options http-proxy=http://proxy-network-host:port" in add apt-key. | |
2. Follow recommended configuration for running sawtooth-raft on multi node setup. | |
sawtooth.consensus.algorithm.name=raft | |
sawtooth.consensus.algorithm.version=0.1 | |
sawtooth.gossip.time_to_live=0 | |
sawtooth.consensus.raft.period=6000 | |
sawtooth.consensus.raft.heartbeat_tick=40 | |
sawtooth.consensus.raft.election_tick=200 | |
sawtooth.publisher.max_batches_per_block=70 | |
3. Make sure for every code change, the sawtooth-raft is built again. It's advised to clean the target folder and bin directory. | |
4. For building sawtooth-raft | |
docker run -v /full/path/to/sawtooth-raft:/project/sawtooth-raft sawtooth-raft-local-engine | |
5. For creating a debian package | |
a. First create a docker image with the latest code. | |
docker-compose -f docker-compose-installed.yaml build | |
b. Copy the created debian from the docker image created. | |
docker-compose -f ci/copy-debs.yaml up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment