Hyperledger Fabric Network for file sharing using Multi-Authority Attribute Based Encryption as the encryption scheme and IPFS as the decentralised storage network
Check this to get the updated list of pre-requisites. They are :-
- Docker Engine and Docker Compose
- Nodejs and NPM
- Git
- Python 2.7.x
For ubuntu you can use:-
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
./prereqs-ubuntu.sh###Dev-Tools Run the following commands to setup dev-tools:-
npm install -g composer-cli
npm install -g composer-rest-server
npm install -g composer-playground
npm install -g yo generator-hyperledger-composer###Fabric-Runtime Run the following commands to Setup Local Hyperledger fabric Runtime:-
mkdir ~/fabric-dev-servers
cd ~/fabric-dev-servers
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
tar -xvf fabric-dev-servers.tar.gz
export FABRIC_VERSION=hlfv12
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh##Setup
- Generating a Business Network Archive (BNA)
composer archive create --sourceType dir --sourceName .- Install and Deploy the BNA file To install execute:-
composer network install --archiveFile [email protected] --card PeerAdmin@hlfv1To deploy:-
composer network start --networkName file-sharing-system --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file file-sharing-admin.cardIt then needs to be imported using:-
composer card import --file file-sharing-admin.cardYou can check whether the network has been setup using:-
composer network ping --card admin@file-sharing-system3.Setting up a Composer-Rest-Server To setup a composer rest server run:-
composer-rest-serverspecify admin@file-sharing-system , select never use namespaces, and continue with the default options for the rest.
The File-Sharing-System network and rest server are up and running.
###References