FAB-4910 fix incorrect network spec

and fix incorrect function name in byfn.sh
add *.tx and *.block files to .gitignore
add FABRIC_CFG_PATH setting

Change-Id: Id3457455354b1f2aea1a9661aa89dc677e05124b
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
Signed-off-by: Rameshbabu <rameshbabu.thoomu@gmail.com>
This commit is contained in:
Christopher Ferris 2017-06-21 22:57:25 +08:00
parent fbc120f1fc
commit 241d08ee3c
9 changed files with 66 additions and 3 deletions

5
.gitignore vendored
View file

@ -6,3 +6,8 @@
.*.sw*
# installed platform-specific binaries
/bin
first-network/channel-artifacts/*.tx
first-network/channel-artifacts/*.block
first-network/crypto-config/*

1
basic-network/.env Normal file
View file

@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=net

View file

@ -5,6 +5,9 @@
#
version: '2'
networks:
basic:
services:
ca.example.com:
image: hyperledger/fabric-ca:x86_64-1.0.0-beta
@ -17,6 +20,8 @@ services:
volumes:
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca.example.com
networks:
- basic
orderer.example.com:
container_name: orderer.example.com
@ -37,6 +42,8 @@ services:
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer
- ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1
- ./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/msp/peerOrg2
networks:
- basic
peer0.org1.example.com:
container_name: peer0.org1.example.com
@ -52,7 +59,7 @@ services:
# # the following setting starts chaincode containers on the same
# # bridge network as the peers
# # https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=composer_default
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
@ -68,6 +75,8 @@ services:
- ./config:/etc/hyperledger/configtx
depends_on:
- orderer.example.com
networks:
- basic
couchdb:
container_name: couchdb
@ -76,3 +85,5 @@ services:
- 5984:5984
environment:
DB_URL: http://localhost:5984/member_db
networks:
- basic

1
first-network/.env Normal file
View file

@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=net

View file

@ -4,6 +4,7 @@
#
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer
@ -12,7 +13,7 @@ services:
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=byfn_default
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
#- CORE_LOGGING_LEVEL=ERROR
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true

View file

@ -24,6 +24,7 @@
# prepending $PWD/../bin to PATH to ensure we are picking up the correct binaries
# this may be commented out to resolve installed version of tools if desired
export PATH=${PWD}/../bin:${PWD}:$PATH
export FABRIC_CFG_PATH=${PWD}
# Print the usage message
function printHelp () {
@ -64,7 +65,7 @@ function askProceed () {
;;
* )
echo "invalid response"
proceed
askProceed
;;
esac
}

View file

@ -5,6 +5,9 @@
version: '2'
networks:
byfn:
services:
orderer.example.com:
@ -12,30 +15,40 @@ services:
file: base/docker-compose-base.yaml
service: orderer.example.com
container_name: orderer.example.com
networks:
- byfn
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.example.com
networks:
- byfn
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.example.com
networks:
- byfn
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.example.com
networks:
- byfn
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.example.com
networks:
- byfn
cli:
container_name: cli
@ -67,3 +80,6 @@ services:
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
networks:
- byfn

View file

@ -5,6 +5,9 @@
version: '2'
networks:
byfn:
services:
couchdb0:
container_name: couchdb0
@ -13,6 +16,8 @@ services:
# for example map it to utilize Fauxton User Interface in dev environments.
ports:
- "5984:5984"
networks:
- byfn
peer0.org1.example.com:
environment:
@ -28,6 +33,8 @@ services:
# for example map it to utilize Fauxton User Interface in dev environments.
ports:
- "6984:5984"
networks:
- byfn
peer1.org1.example.com:
environment:
@ -43,6 +50,8 @@ services:
# for example map it to utilize Fauxton User Interface in dev environments.
ports:
- "7984:5984"
networks:
- byfn
peer0.org2.example.com:
environment:
@ -58,6 +67,8 @@ services:
# for example map it to utilize Fauxton User Interface in dev environments.
ports:
- "8984:5984"
networks:
- byfn
peer1.org2.example.com:
environment:

View file

@ -5,6 +5,8 @@
version: '2'
networks:
byfn:
services:
ca0:
image: hyperledger/fabric-ca
@ -20,6 +22,8 @@ services:
volumes:
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
networks:
- byfn
ca1:
image: hyperledger/fabric-ca
@ -35,33 +39,45 @@ services:
volumes:
- ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg2
networks:
- byfn
orderer.example.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.example.com
container_name: orderer.example.com
networks:
- byfn
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.example.com
networks:
- byfn
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.example.com
networks:
- byfn
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.example.com
networks:
- byfn
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.example.com
networks:
- byfn