How could I add more peers to network blockchain that have been developed with hyperledge composer? -


i have developed blockchain network hyperledge composer on development environment documentation shows. have tested , works nice. want build production network. @ moment, first objective add more peers development environment on same server in order learn. have looked startfabric.sh , have edit docker file , sh doesn’t work. have attached 2 files have edited original code. error fires me container of peer1 isn’t working. database 2 working. have searched on forums how can add more peer don’t find guide in order understand how step step. question, have done bad? know tutorial in order learn how add more peers development environment? thank you

startfabric.sh

#!/bin/bash  # exit on first error, print commands. set -ev  #detect architecture arch=`uname -m`  # grab current directory dir="$( cd "$( dirname "${bash_source[0]}" )" && pwd )"  # cd "${dir}"/composer  arch=$arch docker-compose -f "${dir}"/composer/docker-compose.yml down arch=$arch docker-compose -f "${dir}"/composer/docker-compose.yml -d  # wait hyperledger fabric start # incase of errors when running later commands, issue export fabric_start_timeout=<larger number> echo ${fabric_start_timeout} sleep ${fabric_start_timeout}  # create channel docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx docker exec peer1.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel1.tx   # join peer0.org1.example.com channel. docker exec -e "core_peer_mspconfigpath=/etc/hyperledger/msp/users/admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b composerchannel.block docker exec -e "core_peer_mspconfigpath=/etc/hyperledger/msp/users/admin@org1.example.com/msp" peer1.org1.example.com peer channel join -b composerchannel.block   cd ../.. 

docker-composer.yml

version: '2'  services:   ca.org1.example.com:     image: hyperledger/fabric-ca:$arch-1.0.1     environment:       - fabric_ca_home=/etc/hyperledger/fabric-ca-server       - fabric_ca_server_ca_name=ca.org1.example.com #      - fabric_ca_server_ca_certfile=/etc/hyperledger/fabric-ca-server-config/org1.example.com-cert.pem #      - fabric_ca_server_ca_keyfile=/etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk      ports:       - "7054:7054"     command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/19ab65a$     volumes:       - ./crypto-config/peerorganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config     container_name: ca.org1.example.com    orderer.example.com:     container_name: orderer.example.com     image: hyperledger/fabric-orderer:$arch-1.0.1     environment:       - orderer_general_loglevel=debug       - orderer_general_listenaddress=0.0.0.0       - orderer_general_genesismethod=file       - orderer_general_genesisfile=/etc/hyperledger/configtx/composer-genesis.block       - orderer_general_localmspid=orderermsp       - orderer_general_localmspdir=/etc/hyperledger/msp/orderer/msp     working_dir: /opt/gopath/src/github.com/hyperledger/fabric     command: orderer     ports:       - 7050:7050     volumes:         - ./:/etc/hyperledger/configtx         - ./crypto-config/ordererorganizations/example.com/orderers/orderer.example.com/msp:/etc/hyperledger/msp/orderer/msp    peer0.org1.example.com:     container_name: peer0.org1.example.com     image: hyperledger/fabric-peer:$arch-1.0.1     environment:       - core_logging_peer=debug       - core_chaincode_logging_level=debug       - core_vm_endpoint=unix:///host/var/run/docker.sock       - core_peer_id=peer0.org1.example.com       - core_peer_address=peer0.org1.example.com:7051       - core_vm_docker_hostconfig_networkmode=composer_default       - core_peer_localmspid=org1msp       - core_peer_mspconfigpath=/etc/hyperledger/peer/msp       - core_ledger_state_statedatabase=couchdb       - core_ledger_state_couchdbconfig_couchdbaddress=couchdb:5984     working_dir: /opt/gopath/src/github.com/hyperledger/fabric     command: peer node start --peer-defaultchain=false     ports:       - 7051:7051       - 7053:7053     volumes:         - /var/run/:/host/var/run/         - ./:/etc/hyperledger/configtx         - ./crypto-config/peerorganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/peer/msp         - ./crypto-config/peerorganizations/org1.example.com/users:/etc/hyperledger/msp/users     depends_on:       - orderer.example.com       - couchdb    couchdb:     container_name: couchdb     image: hyperledger/fabric-couchdb:$arch-1.0.1     ports:       - 5984:5984     environment:       db_url: http://localhost:5984/member_db     peer1.org1.example.com:     container_name: peer1.org1.example.com     image: hyperledger/fabric-peer:$arch-1.0.1     environment:       - core_logging_peer=debug       - core_chaincode_logging_level=debug       - core_vm_endpoint=unix:///host/var/run/docker.sock       - core_peer_id=peer1.org1.example.com       - core_peer_address=peer1.org1.example.com:7051       - core_vm_docker_hostconfig_networkmode=composer_default       - core_peer_localmspid=org1msp       - core_peer_mspconfigpath=/etc/hyperledger/peer/msp       - core_ledger_state_statedatabase=couchdb       - core_ledger_state_couchdbconfig_couchdbaddress=couchdb2:5985     working_dir: /opt/gopath/src/github.com/hyperledger/fabric     command: peer node start --peer-defaultchain=false     ports:       - 7061:7061       - 7063:7063     volumes:         - /var/run/:/host/var/run/         - ./:/etc/hyperledger/configtx         - ./crypto-config/peerorganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/peer/msp         - ./crypto-config/peerorganizations/org1.example.com/users:/etc/hyperledger/msp/users     depends_on:       - orderer.example.com       - couchdb2     couchdb2:     container_name: couchdb2     image: hyperledger/fabric-couchdb:$arch-1.0.1     ports:       - 5985:5985     environment:       db_url: http://localhost:5984/member_db 

we provide basic hyperledger fabric network development purposes , isn't meant example demostrate how build one. hyperledger composer work hyperledger fabric setup right connection profiles anf hyperledger fabric provide documentation , examples on how build own networks think need see https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html how build own network , see https://hyperledger.github.io/composer/reference/connectionprofile.html information composer connection profiles. see does composer support endorsement policy? how? provides info multi org networks , connection profiles


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -