This series of articles:
Chapter one: nine analyze with you after blasting hyperledger fabric - Quick Start basic-network Sample
Chapter II: nine analyze with you after blasting hyperledger fabric - to quickly build environment GO
Chapter 3: nine analyze with you after blasting hyperledger fabric - Quick Start Sample first-network
Chapter 4: nine analyze with you after blasting hyperledger fabric - system logic architecture articles
Chapter V: nine analyze with you after blasting hyperledger fabirc - Network Node Introduction
Chapter 8: nine analyze with you easily complete explosion hyperledger fabric - Couchdb installation
Chapter 9: nine analyze with you easily complete explosion hyperledger fabric - NVM installation and Nodejs
Chapter 11: nine analyze with you easily complete explosion hyperledger fabric - to create alliances
table of Contents
1 Introduction
2 alliance, channels and organizational relationships
2.1 Viewing Union, the Organization Information
3 Create Alliance
1 Introduction
As we all know, the European Union was born in December 1991, the original six member countries: Germany, France, Italy, the Netherlands, Belgium and Luxembourg. At present, the Member State already has 27 Member States, usually those Member States for consultations by the EU Council to address the political and economic issues.
In the fabric, one block chain network is a Union (EU), the coalition of multiple organizations (27 Member States) composed, organizations are restricted communication channel between Union (EU Council), which is the reason why the fabric alliance chain often called.
In the fabric, the more blocks can coexist chain network, just like a corporate network can consist of multiple different subnet (network segment), and each block chain network (subnet) is a coalition.
2 alliance, channels and organizational relationships
Union relations with the organization that many, namely: a coalition formed by one or more organizations.
Relations with the alliance channel is one to one, namely: a coalition has only one channel. Alliances and channels that you have me, I have you in coexistence, all configuration Union are also recorded in the arrangement area of the channel.
So when you want to create a block chain with a network fabric, which will need to include the following: Create alliances, create an organization, the organization to join the alliance, create a channel, channel organizations and other operations.
2.1 Viewing Union, the Organization Information
Into the fabric-sample first-network following examples, open configtx.yaml file, as follows:
Consortiums that coalition statement declares a SampleConsortium coalition, the Alliance has the following Org1 and Org2 two organizations:
Organizational information includes the name of the master node information organization, the organization ID, MSPDir and tissues (Host and Port). It should be noted that an organization can have multiple nodes (ie: multiple docker containers), just as a company has multiple departments.
3 Create Alliance
Into the fabric-sample embodiment with the first-network, and execute the following statements:
configtxgen -profile TwoOrgsOrdererGenesis -channelID jiuxi-channel -outputBlock ./channel-artifacts/jiuxi-channel.block
The role of the above command is to create alliances and the creation block contains the specified channel, which TwoOrgsOrdererGenesis from configtx.yaml configuration file, command execution results are as follows:
The reason given is the lack of a certificate file, it is necessary first of all to create a digital certificate of good communication node associated with each other, execute the following command to create:
cryptogen generate --config=./crypto-config.yaml
Profile crypto-config.yaml file defines the node information organizations (including the node name, node domain, node templates and user nodes). Execution results are as follows:
Crypto-config directory will be created in the current directory after successful program execution. It is the digital certificate for secure communications different nodes in the directory. After the certificate is generated, create alliances perform again block command, after performing successful shots are as follows:
Creation block file in the directory where the channel-artifacts, as shown:
Since then, nine analyze with you easily create complete manual blasting operations Union.