In this Blog ,We are going to discuss how to Create Hyperledger Fabric consortium using Azure Kubernetes Service (AKS) template . In part-1 we have seen how we will setup Hyperledger Fabric Blockchain network and deployed the orderer/peer organization.
To build the blockchain consortium post deploying the ordering service and peer nodes, you need to carry out the below steps in sequence. Azure HLF script (azhlf), which helps you with setting up the consortium, creating channel, and chaincode operations.
Step-1 Launch Azure Cloud Shell.
It will ask to choose cloud storage account to launch cloud shell . If already existing cloud storage account available you may choose or you may choose to create new cloud storage account to launch cloud shell.
You may choose option to choose bash shell also .Below diagram show step by step process to build consortium (reference image from azure docs .)
For the initial setup of the client application:
Download client application files
Setup environment variables
Import organization connection profile, admin user, and MSP
After setting up storage environment variable to store files , we need create storage account . If you have any existing storage account which you have mentioned while setting up storage environment variable then skip below step otherwise create Storage account with storage account environment variables setup above.
az account set --subscription $STORAGE_SUBSCRIPTION az group create -l $STORAGE_LOCATION -n $STORAGE_RESOURCE_GROUP az storage account create -n $STORAGE_ACCOUNT -g $STORAGE_RESOURCE_GROUP -l $STORAGE_LOCATION --sku Standard_LRS
Step-6 Generate storage key and create file share
If you already have a file share created in existing storage account, you may skip step-5 ,step6 eg. below pic
Execute below commands to fetch organization’s connection profile, admin user identity, and MSP from Azure Kubernetes Cluster and store these identities in client application local store i.e. in “azhlfTool/stores” directory.
Now we need to create channel and set anchor peers (A peer node on a channel that all other peers can discover and communicate with.) Execute below command to create channel.
2- From orderer organization client, download peer organization MSP from Azure Storage and then issue command to add peer organization in channel/consortium.
3-From orderer organization client, upload orderer connection profile on Azure Storage so that peer organization can connect to orderer nodes using this connection profile
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Connect with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.