Advanced Install

Before you start

Make sure you have followed the instructions in Prepare & Setup - they are a prerequisite to any of the install instructions.

Install with a collection of scripts

The Advanced Install method covers the same ground as the Simple Install, but rather than using the all in one script - - we will instead individually call a series of scripts to ultimately bootstrap a blockchain network, join peers to a channel and launch the Composer playground. You can then use Composer Playground to create and deploy Business Networks to your blockchain network.

Why choose Advanced Install? The Simple Install is the best option for most users - if you’ve already successfully followed those instructions, you don’t need to follow these! You may wish to follow these instructions if you want to stop part way through the install process e.g. not set up Composer Playground.

1. Clone ibm-container-service repository

You’ll be using the config files and scripts from this repository, so start by cloning it to a directory of your choice on your local machine.

git clone

# change dir to use the scripts in the following sections
cd cs-offerings/scripts/

2. Set up the Blockchain Network

  1. Create Storage (Persistent Volume and Persistant Volume Claim)
  2. Create blockchain network
    • Option 1: Using leveldb as worldstate db:
    • Option 2: Using couchdb as worldstate db:
        /create/ --with-couchdb
  3. Create channel named channel1
    CHANNEL_NAME="channel1" create/
  4. Join Org1 peer to channel1
    CHANNEL_NAME="channel1" PEER_MSPID="Org1MSP" PEER_ADDRESS="blockchain-org1peer1:30110" MSP_CONFIGPATH="/shared/crypto-config/peerOrganizations/" create/
  5. Join Org2 peer to channel1
    CHANNEL_NAME="channel1" PEER_MSPID="Org2MSP" PEER_ADDRESS="blockchain-org2peer1:30210" MSP_CONFIGPATH="/shared/crypto-config/peerOrganizations/" create/

3. Set up Composer Playground

  1. Launch the Playground - this is a UI for creating and deploying Business Networks to your Blockchain runtime.
  2. Create a Basic Business Network Hyperledger Composer provides a tutorial for using Playground to create a basic Business Network. We recommend you follow this to get to grips with the programming model:

Playground Tutorial

  1. Create and start the REST server
    ./create/ --business-network-id INSERT_BIZNET_NAME

4. Install and Instantiate Chaincode

  1. Install example02 chaincode on Org1 peer
    CHAINCODE_NAME="example02" CHAINCODE_VERSION="v1" MSP_CONFIGPATH="/shared/crypto-config/peerOrganizations/"  PEER_MSPID="Org1MSP" PEER_ADDRESS="blockchain-org1peer1:30110" create/
  2. Install example02 chaincode on Org2 peer
    CHAINCODE_NAME="example02" CHAINCODE_VERSION="v1" MSP_CONFIGPATH="/shared/crypto-config/peerOrganizations/"  PEER_MSPID="Org2MSP" PEER_ADDRESS="blockchain-org2peer1:30210" create/
  3. Instantiate example02 chaincode on channel1
    CHANNEL_NAME="channel1" CHAINCODE_NAME="example02" CHAINCODE_VERSION="v1" MSP_CONFIGPATH="/shared/crypto-config/peerOrganizations/"  PEER_MSPID="Org1MSP" PEER_ADDRESS="blockchain-org1peer1:30110" create/