Intro to Private Blockchains

Deploying your First Network


Starting from an appropriate directory, download the sample files and enter the /bin/ subfolder.


Download the Sample Project

[email protected]: ~/dev/ $ curl -sSL | bash -s
[email protected]: ~/dev/ $ ls
[email protected]: ~/dev/ $ cd fabric-samples/
[email protected]: ~/dev/ $ cd bin


This folder contains some example launch scripts to help you set up a hyperledger network. The scripts will automatically launch several docker containers, which will simulate a network with multiple independant nodes.

The Hyperledger team has compiled this script to help us easily set up a whole network at once. It will deploy our chain code to a number of Docker containers, and help us simulate a network!
~ Build
~ Your
~ First
~ Network

Let’s try running the starter script, and we can explore how it generates the network.


Start the Sample Network

[email protected]: ~/dev/fabric-samples/ $ cd first-network/
[email protected]: ~/dev/fabric-samples/ $ ./ -h
[email protected]: ~/dev/fabric-samples/ $ ./ generate

Now that we have the network up and running, let’s see what files were generated.

If the dependency installs aren’t set properly then you’ll need to spin down the network, verify all dependencies, and then spin up the network again

Finding the

[email protected]: ~/dev/fabric-samples/ $ ls channel-artifacts
[email protected]: ~/dev/fabric-samples/ $ ls crypto-config

There are a few commands available from the network launch script.


Managing the network

[email protected]: ~/dev/fabric-samples/ $ ./ up // Turns on the network
[email protected]: ~/dev/fabric-samples/ $ ./ down // Shuts down the network
[email protected]: ~/dev/fabric-samples/ $ ./ generate // Generates a new network

Once the install is complete, you’ll see a nice ascii art printout of the word END, which means everything worked!