Вы находитесь на странице: 1из 34

Which course will fulfil my needs?

Link – 75% discount

https://www.udemy.com/tutorial-hyperledger-setup/?couponCode=HLFTUTDCK

Link – 50% discount

https://courses.pragmaticpaths.com/p/hyperledger-fabric/?coupon_code=HALFOFF
Local Workbench Setup

Setup the virtual machine

Install the workbench components


raj@acloudfan.com

@acloudfan

http://ACloudFan.com
Course Project Repository

http://acloudfan.com/download-files

HLF-Workbench-v1.3-1.zip

PS: Version will change over a period of time


Course Project Repository

HLF-Workbench-v1.x-y.zip

Extract the files in a local folder

File is PASSWORD Protected

Password is in Lecture#3
Course Project Repository

Right click on zip file and select extract

<<Double Click>> sometimes does not work on password protected files !!!
Course Project Repository

• Repository updated from time to time

• Re-installation of the tools/binaries may be required for


certain type of changes

• Code in the scripts are subject to change without notice


Workbench tool setup

1 Setup the Virtual Machine

2 Install the software/HLF


1 Setup the Virtual Machine

vagrant up

vagrant ssh

Password: vagrant
cd /vagrant/setup

chmod 755 *.sh


cd /vagrant/setup

chmod 755 *.sh

1. Install sudo ./docker.sh

Log out & Log in

docker version
cd /vagrant/setup

2. Install sudo ./fabric-setup.sh

orderer version

peer version
cd /vagrant/setup

3. Install sudo ./caserver-setup.sh

fabric-ca-server version

fabric-ca-client version
Workbench Walkthrough

Workbench folders overview

Launch test setup

raj@acloudfan.com
Cleanup of test set ups
@acloudfan

http://ACloudFan.com

Intent is just to give a feel of the workbench!!!


Fabric binaries

Scripts & config files for Fabric on cloud

Managing composer apps

Identity management scripts

Chaincode used for testing

Orderer utilities

Peer utilities
Demonstrate the working

• Launch the multi-org setup

• Cleanup the setup

Intent is just to give a feel | Details of scripts covered in lectures


Orderer Organization Acme Organization

Peer Peer
localhost:7050 Orderer
Solo localhost:7051 localhost:8051

Budget Organization

localhost:7054 Peer
airlinechannel
localhost:9051
Demo: Launch the multi-org setup

1. Setup CA server & setup all of the identities

2. Generate configuration & Launch Orderer

3. Create the airlinechannel and launch peers

• Test the setup


1. Setup CA server & setup all of the identities

fabric-ca cd fabric-ca/bins

bins
./run-all-caserver.sh

run-all-caserver.sh
2. Generate configuration & Launch Orderer

orderer cd orderer/bins

bins
./run-all-orderer.sh

run-all-orderer.sh
3. Create the airlinechannel and launch peers

peers cd peers/bins

bins
./run-all-peers.sh

run-all-peers.sh
Test the setup

cd peers/bins
peers

bins
. set-env acme 7050 admin

chain-test.sh
./chain-test.sh install
| instantiate
| query
| invoke
Test the setup

• First time call to instantiate may time out


peers
• Because has to get Runtime Docker images
bins
• Just re-execute the instantiate command if it
fails
chain-test.sh
Cleanup At component level

fabric-ca orderer peers

bins bins bins

clean.sh clean.sh clean.sh


Cleanup At workbench level

setup ./clean.sh

clean.sh • Cleans up all components

./clean.sh all

• Cleans up all components

• Removes fabric binaries


Hands On Exercise

Familiarize with

raj@acloudfan.com

Pause the video on each page – try out the exercise & then proceed @acloudfan

http://ACloudFan.com
Download the PDF version of this exercise from link in resources
1 Create the Multi-Org Fabric setup

2 Test the Multi-Org Fabric setup

3 Clean up the setup


1 Create the Multi-Org Fabric setup

If you have already done that then skip this part ☺


1 Create the Multi-Org Fabric setup

Check out the orderer & peer logs

orderer peers

orderer.log acme-peer1.log
acme-peer2.log
budget-peer1.log
2 Test the Multi-Org Fabric setup

. set-env acme 7050 admin

Port for acme-peer1

./chain-test.sh install

./chain-test.sh instantiate

./chain-test.sh query Note down the value of a & b

If you have already installed & instantiated on acme-peer then skip this step ☺
2 Test the Multi-Org Fabric setup

. set-env acme 8050 admin

Port for acme-peer2

./chain-test.sh install

./chain-test.sh query Value of a & b consistent?


./chain-test.sh invoke
./chain-test.sh query Note down the value of a & b
2 Test the Multi-Org Fabric setup

. set-env budget 9050 admin

Port for budget-peer1

./chain-test.sh install

./chain-test.sh query Value of a & b consistent?


./chain-test.sh invoke
./chain-test.sh query Note down the value of a & b
3 Clean up the setup
1. Check out the contents of the following folders

fabric-ca

client

server

2. Clean up the fabric-ca server

cd fabric-ca/bins ./clean.sh

3. Check the content of above folder again


3 Clean up the setup

1. Execute the scripts to cleanup the setup at component level

Вам также может понравиться