Block chain of Hyperledgerd build (ii, download fabric source code and Docker create Fabric network & Create/Join channel (ledger))

Source: Internet
Author: User
Tags curl docker ps docker compose
The last one said to install the Docker and Docker-compose, now start downloading the source code and joining the channel Download and install the Curl tool 1, create Fabric Engineering and project directory.

Mkdir-p work
CD work Then, execute the following code:

Curl-l https://raw.githubusercontent.com/voodoo12345/polaris/master/fabpre.tar.gz-o fabpre.tar.gz 2>/dev/null; TAR-XVF fabpre.tar.gz

After this command is executed, the related components of the deployment fabric network are downloaded and uncompressed, including Docker Compose scripts, channel creation/addition scripts, authentication-used cryptographic elements, and so on.

Your current directory looks like this:
Ls
ccenv channel_test.sh docker-compose.yml fabpre.tar.gz src tmp 2, creating a fabric network with Docker

1 Ensure that the hyperledger/fabric-ccenv mirrors are labeled Latest:

Execute Docker-compose Build

2 Create Fabric network, create channel (original), add peer node to channel:
Before up, first modify

Of these two files
Address is Order container address, address can be viewed through PS-EF
Otherwise, the CLI grpc timeout is caused
Execute docker-compose up

3) Check your container:

Docker PS

4 Ensure that the channel was successfully created and that the node was successfully joined:

Execute Docker exec-it CLI sh

5 View the results of channel creation/node joins:

Cat Results.txt

The results of the screen display are as follows:

6 Verify the creation of the creation block successfully, execute the following command:

Ls-ltr Myc1.block

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.