ooibc88 / blockbench

BLOCKBENCH: A Framework for Analyzing Private Blockchains. Blockbench contains workloads for measuring the data processing performance, and workloads for understanding the performance of different layers of Blockchain systems.
https://www.comp.nus.edu.sg/~dbsystem/fabricsharp/#/blockbench
Apache License 2.0
392 stars 174 forks source link

Stepwise help for running blockbench on Ubuntu 16.04 #21

Closed AUQIB92 closed 6 years ago

AUQIB92 commented 6 years ago

Please provide the step by step procedure and resources required to run Blockbench on Ubuntu 16.04

ArnChe commented 6 years ago

Hi, I made a little shell script working for me on Ubuntu 16.04. After that, you have to make sure to set your env.sh and if you are running on machines with different hostnames, you have to pass the pathes to the servers during tests. And please see the sections and comments, when it comes to the profile, bashrac and library configs. Just some hints, because I made myself directories with the right files and copying them to the right place.

!/usr/bin/env bash

Install Blockbench Framework, Ehereum, HL_Preq

export $USER set -e

cd $HOME if [ ! -d ~/install/path ]; then mkdir -p ~/install/path/ fi

Just if you are using Agent Forwarding for SSH, please write hosts in your config file

if [ ! -f .ssh/config ]; then sudo cp ~/your/path/to/config/file/config $HOME/.ssh/ fi

if [ ! -d $HOME/Dokumente/blockbench ]; then git clone https://github.com/ooibc88/blockbench.git f

modify yout ~/.profile with

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/include:/usr/lib export LD_LIBRARY_PATH

For go extend .bashrc with GOPATH AND GOROOT

Install packages

sudo apt-get update sudo apt-get -y dist-upgrade sudo apt-get -y install g++ curl sudo apt-get -y install autoconf sudo apt-get -y install autogen sudo apt-get -y install libtool sudo apt-get -y install libcurl4-openssl-dev sudo apt-get -y install build-essential

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" chmod a+rxw $HOME/.bashrc chmod a+rxw $HOME/.profile source $HOME/.bashrc source $HOME/.profile

nvm install --lts npm install npm@latest -g sudo apt-get -y install cmake

Restclient-cpp install

if [ ! -d $HOME/restclient-cpp/ ]; then git clone https://github.com/mrtazz/restclient-cpp fi

cd restclient-cpp ./autogen.sh ./configure sudo make install

Extend /etc/ld.so.conf with

include /usr/local/lib

cd $HOME/

Golang install

if [ ! -d ~/go ]; then wget https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz sudo tar xpzf go1.9.1.linux-amd64.tar.gz #-C /usr/local/ fi

rm -f go1.9.1.linux-amd64.tar.gz

Library for Micro Benchmarks

cd ~/pat/to/micro/in/blockbench/ npm install web3 npm install zipfian npm install bignumber.js

When npm problem occurs

npm cache clean

npm cache verify

npm install --safe

npm install npm@next -g

Build Drivers

cd ~/Blockbench/source/src/macro/kvstore make clean make cd ../smallbank make clean make

Ethereum install

sudo apt-get -y install software-properties-common sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get install apt-transport-https ca-certificates sudo apt-get update sudo apt-get -y install ethereum

sudo apt-get update

Hyperledger Preqs

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' sudo apt-get update apt-cache policy docker-engine sudo apt-get install -y docker-engine sudo apt-get install -y libltdl3-dev

sudo apt-get -y install python-pip

cd $HOME

sudo apt-get update wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_18.03.0~ce-0~ubuntu_amd64.deb sudo dpkg -i docker-ce_18.03.0~ce-0~ubuntu_amd64.deb rm docker-ce_18.03.0~ce-0~ubuntu_amd64.deb set +e sudo groupadd docker set -e sudo usermod -aG docker $USER sudo systemctl enable docker

pip install docker-compose

sudo chown -R $(whoami):$(whoami) /opt/ sudo chown -R $(whoami):$(whoami) /var/ mkdir -p /opt/gopath/{src,pkg,bin} mkdir -p /opt/gopath/src/github.com/ mkdir -p /opt/gopath/src/github.com/hyperledger/

echo -n 'Node: ' node --version echo -n 'npm: ' npm --version echo -n 'Docker: ' docker --version echo -n 'Docker Compose: ' docker-compose --version echo -n 'Python: ' python -V

echo "Reboot necessary"

yolo-612 commented 5 years ago

@ArnChe hi,If I only do macro benchmark, which packages do I need to install? I hope to get your reply

agui009 commented 4 years ago

The installation process is too complicated