IBM Blockchain Fabric
Table of Contents
This instruction set closely reproduce the one published under the following IBM GitHub repo.
The intent is to create a network that tracks the production of coffee from the beginning to the end.
Necessary Configuration
Install docker and docker-compose following this link.
Check upon the successful installation of docker. I am running this demo with the following docker configuration.
docker --version docker-compose --version
Docker version 19.03.5, build 633a0ea docker-compose version 1.24.1, build 4667896b
Moreover you will need to install the Visual Code IDE. In the latter there is a IBM Blockchain extension that will allow you to promptly get an hyperledger network up and running by deploying the necessary docker images and will allow to interfere with your network through a beginner friendly GUI.
Notice that due to some dependency issues arising with a recent upgrade you should download VS code version 1.39 at the following link.
Should you have issues on Catalina Mac OS to open visual studio follow this instructions.
Once you download it, you can download the IBM Blockchain extension by following the steps in this video:
Install nvm to select the node version you want to work with
Install node
brew update brew install node
Install nvm
to handle specific node versions and use the desired
version under which this tutorial was developed.
This is necessary as some of the demo available were developed in the past and requires older versions of node. You can easily switch back to your favorite node version once your done with the demo using nvm
## install nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12819 100 12819 0 0 2542 0 0:00:05 0:00:05 --:--:-- 2806 => Downloading nvm from git to '/Users/marcohassan/.nvm' => Cloning into '/Users/marcohassan/.nvm'... remote: Enumerating objects: 267, done. remote: Counting objects: 100% (267/267), done. remote: Compressing objects: 100% (242/242), done. remote: Total 267 (delta 31), reused 80 (delta 15), pack-reused 0 Receiving objects: 100% (267/267), 119.47 KiB | 365.00 KiB/s, done. Resolving deltas: 100% (31/31), done. => Compressing and cleaning up git repository => Appending nvm source string to /Users/marcohassan/.bashrc => Appending bash_completion source string to /Users/marcohassan/.bashrc => Close and reopen your terminal to start using nvm or run the following to use it now:
## add the necessary nvm configuration to your bash configuration file. ## notice that Mac OSX users might need to switch from ~/.bashrc to ~/.bash_profile echo "export NVM_DIR='$HOME/.nvm'" >> ~/.bashrc echo "[ -s '$NVM_DIR/nvm.sh' ] && \. '$NVM_DIR/nvm.sh' # This loads nvm" >> ~/.bashrc echo "[ -s '$NVM_DIR/bash_completion' ] && \. '$NVM_DIR/bash_completion' # This loads nvm bash_completion" >> ~/.bashrc
Check what Node.js versions are installed on your machine
nvm ls
-> v8.9.0 * system default -> v8.9.0 * node -> stable (-> v8.9.0 *) (default) stable -> 8.9 (-> v8.9.0 *) (default) iojs -> N/A (default) lts/* -> lts/erbium (-> N/A) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.17.1 (-> N/A) lts/carbon -> v8.17.0 (-> N/A) lts/dubnium -> v10.19.0 (-> N/A) lts/erbium -> v12.16.1 (-> N/A)
If you do not have v8.9.0, install the specific node version for this tutorial.
nvm install v8.9.0
Change your node version to the desired version
nvm use v8.9.0
In the same way you can easily switch back to your favorite Node.js version after this tutorial.
Update your npm
to use a specific version.
npm install -g npm@6.0.0
Copy the blockchainbean2 Demo
git clone https://github.com/IBM/blockchainbean2.git
cd ./blockchainbean2/ pwd echo "" ls
/Users/marcohassan/Desktop/IBM_projects/minor_tasks/BlockChainTutorials/BlockchainTutorial.github.io CONTRIBUTING.md MAINTAINERS.md README.md commands.txt docs lib manifest.yml package.json server test web-app
You are ready to go
From here on you are ready to go. We expect you on Wednesday for a nice hands-on lab, where we will deploy the permissioned Blockchain Network.