Install HyperLedger Fabric at Win 10
Hyperledger Fabric only runs on Unix-based operating systems. As a result, it will not be able to run on Windows without setting up a virtual machine (or via Docker at Win 10 Pro/Ent.). In this arcle I'm explaining in simple steps how to install and setup a ubuntu
virtual machine vm
at Win 10
, followed by step to install HyoerLedfer Fabric
and getting it up and running:
credit goes to medium, I used it with required modifications
Create VM
- Download VMware Player, you can use virtualbox as an alternate.
- Download Ubuntu ISO
- Install vmware player
- Create VM of Ubuntu using vmware player
Prepare the VM
$ sudo dpkg-reconfigure locales // choose en_US.UTF-8 if in doubt
$ sudo apt-get update
$ sudo apt-get upgrade
Install pre-requists
$ sudo apt-get install curl git docker.io docker-compose golang nodejs npm
Install Docker
$ sudo usermod -a -G docker $USER
$ sudo systemctl start docker
$ sudo systemctl enable docker
$ sudo chmod 666 /var/run/docker.sock
Install Hyperledger Fabric
- Check the latest version of fabric repository, at the time of writting this post, it is 1.4
- Install Fabric
$ curl -sSL http://bit.ly/2ysbOFE | bash -s 1.4.0
- Check if fabric is installed, you should see big "END" once done
$ cd fabric-samples/first-network
$ ./byfn.sh generate
$ ./byfn.sh up
- Check if fabric docker is running smoothly
$ docker ps -a
- Stop the network
$ ./byfn.sh down
Now it is time to install the composer
, you can test and lear it from here:
Install Composer
- Create new user, when asked about the full name, use something different than the full name used of the main user, to avoid confusion next time you are logging on.
Note: if you need to keep things with the same user, jump to step number 4 followed by step number 7 directly
$ sudo adduser playground
- Set permission for the new user
sudo usermod -aG sudo playground
- Login as the new user
su - playground
- Install the prerequisites by getting and running the script from github. It will ask for the password of “playground” account to proceed.
$ curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
$ chmod u+x prereqs-ubuntu.sh
$ ./prereqs-ubuntu.sh
- Logout and login with the new user to get things activated properly
$ exit
$ su - playground
- Install components needed for running Hyperledger Fabric
$ curl -sSL http://bit.ly/2ysbOFE | bash -s 1.4.0
- Install components needed for running Hyperledger Composer
$ npm install -g composer-cli composer-rest-server generator-hyperledger-composer yo composer-playground
- Start Composer
$ composer-playground
- Open your browser and check it:
http://localhost:8080