IBM/blockchain-application-using-fabric-java-sdk

how to create new organization and peers?

HDBISG opened this issue · 9 comments

May I ask how to create new organization and peers?

How to create new organization and add new peer?

Can I change the pear name? like change peer0.org1.example.com to userName.projectName.myCompanyName.com?

Thank you for your help!

@HDBISG , adding more org and peers is part of setting up network. You need to update configuration files available at https://github.com/IBM/blockchain-application-using-fabric-java-sdk/tree/master/network appropriately.

Generate artifacts as per your modified config files and setup network. And yes, you can change peer name.

Hope it will help. Thanks.

Thanks reply!
let me try it this week and next week.

@maheshwarishikha
The change container name is easy, I changed the container_name at docker-compose.yml.

But when I create a new peer. I can not find the folder like peer2.org1.example.com.
How to set volumes for new peer in docker-compose.yml like - ../network_resources/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp

May I ask what is the purpose of the files under network_resources?
How to generate files at folder network_resources?

@maheshwarishikha
The change container name is easy, I changed the container_name at docker-compose.yml.

But when I create a new peer. I can not find the folder like peer2.org1.example.com.
How to set volumes for new peer in docker-compose.yml like - ../network_resources/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp

If I create new peer, I need to change DeployInstantiateChaincode.java and CreateChannel.java to join the new peer to an organization, yes?

@maheshwarishikha
The change container name is easy, I changed the container_name at docker-compose.yml.

But when I create a new peer. I can not find the folder like peer2.org1.example.com.
How to set volumes for new peer in docker-compose.yml like - ../network_resources/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp

You need to create that using utilities.

May I ask what is the purpose of the files under network_resources?
How to generate files at folder network_resources?

network_resources are the artifacts generated which has certificates and channel configuration for the network identities. This is the first step - one has to perform while setting up the network. For the ease, in this repository I have generated already and provided directly for use.
For more details, please refer https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html
you need to download and use 'cryptogen' and configtxgen' utility.

@maheshwarishikha
The change container name is easy, I changed the container_name at docker-compose.yml.
But when I create a new peer. I can not find the folder like peer2.org1.example.com.
How to set volumes for new peer in docker-compose.yml like - ../network_resources/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp

If I create new peer, I need to change DeployInstantiateChaincode.java and CreateChannel.java to join the new peer to an organization, yes?

yes, if you want that peer to join channel:)

May I ask what is the purpose of the files under network_resources?
How to generate files at folder network_resources?

network_resources are the artifacts generated which has certificates and channel configuration for the network identities. This is the first step - one has to perform while setting up the network. For the ease, in this repository I have generated already and provided directly for use.
For more details, please refer https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html
you need to download and use 'cryptogen' and configtxgen' utility.

Thanks!
Let me try it!