Update Aug 29th 2019: Hyperledger Composer has been deprecated. Please see the README for more information.

Hyperledger Composer Network Start CLI

Hyperledger Composer Network Start


The composer network start utility is used to start a specific version of a business network that has been previously installed to a Hyperledger Fabric v1.2 network. Before using this command, read the topic Deploying and Updating Business Networks.

Please Note: You must first install the business network to the Hyperledger Fabric peers by using the composer network install command.

composer network start --networkName <business-network-name> --networkVersion <business-network-version> --networkAdmin <admin-name> --networkAdminEnrollSecret <enroll-secret> --card <peer-admin-card> --file <admin-card-file-name>

Considerations

This command creates a new card file. The connection profile in this card file comes from the card defined in the -c|--card option used to perform the request and the connection profile defines whether an identity in a card should be HSM managed or not. If the card used for the request is not HSM managed (as defined in the connection profle) then the card file created will not be HSM managed. Conversely if the card used for the request is HSM managed then the card file created will also be HSM managed.

Options

composer network start [options]

Options:
  --help                             Show help  [boolean]
  -v, --version                      Show version number  [boolean]
  --networkName, -n                  Name of the business network to start  [required]
  --networkVersion, -V               Version of the business network to start  [required]
  --loglevel, -l                     The initial loglevel to set  [choices: "INFO", "WARNING", "ERROR", "DEBUG"]
  --option, -o                       Options that are specific to connection. Multiple options are specified by repeating this option  [string]
  --optionsFile, -O                  A file containing options that are specific to connection  [string]
  --networkAdmin, -A                 The identity name of the business network administrator  [string] [required]
  --networkAdminCertificateFile, -C  The certificate of the business network administrator  [string]
  --networkAdminPrivateKeyFile, -K   The private key of the business network administrator  [string]
  --networkAdminEnrollSecret, -S     The enrollment secret for the business network administrator  [string]
  --card, -c                         The cardname to use to start the network  [string] [required]
  --file, -f                         File name of the card to be created  [string]

Please refer to Connector specific information for more information about connecting to Hyperledger Fabric v1.2.

Javascript API Example

const NetworkStart = require('composer-cli').Network.Start;

let options = {
  networkName: 'tutorial-network',
  networkVersion: '0.0.1',
  networkAdmin: 'admin',
  networkAdminEnrollSecret: 'adminpw',
  card: 'PeerAdmin@fabric-network'
};

NetworkStart.handler(options);