Reputation: 55
I'm using VSCode editor to develop a HF network using the IBM blockchain platform extension. I have written the chain code in golang and packaged it so that it's ready for deployed to each peer. However, the IBM blockchain platform provides users with the default fabric environment with 1 org, 1 peer and 1 CA. My problem is here. I want to be able to create a custom fabric environment on IBM blockchain platform with more orgs and peers (for ex 3 orgs with one peer each) but I couldn't find resources on how to do that. There is an option to add a fabric environment (which consumes a JSON file) but i can find resources on how to write that.
Help on how to create a custom fabric environment with three orgs with on peer each on IBM blockchain platform (VScode).
Upvotes: 1
Views: 1043
Reputation: 678
Currently, you can't set up a custom fabric network using vscode extension. What you can do is, run a custom fabric network in your system and connect to it through the vscode extension.
For that, first create a json node file. You can create json file something like this:
[
{
"name": "ca.org1.example.com",
"api_url": "http://localhost:17054",
"type": "fabric-ca",
"ca_name": "ca.org1.example.com"
},
{
"name": "peer0.org1.example.com",
"api_url": "grpc://localhost:17051",
"type": "fabric-peer",
"msp_id": "Org1MSP"
},
{
"name": "orderer.example.com",
"api_url": "grpc://localhost:17050",
"type": "fabric-orderer",
"msp_id": "OrdererMSP"
}
]
You can find detailed explanations from their official git repository here.
Upvotes: 1
Reputation: 5570
At the moment you can't use the VS Code extension to create a custom fabric, but it is on the roadmap as you can see from this github issue.
You can create your own custom fabric and then connect to it with VS Code by creating a simple JSON file which describes the fabric.
Many people use the "First Network" from the fabric samples and fabric tutorials Build Your First Network (BYFN). This is a 2 Org network and if you want 3 Orgs you can use the Extend Your First Network (EYFN) tutorial.
Upvotes: 0