mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 01:25:10 +00:00
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:
parent
fbc120f1fc
commit
241d08ee3c
9 changed files with 66 additions and 3 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -6,3 +6,8 @@
|
||||||
.*.sw*
|
.*.sw*
|
||||||
# installed platform-specific binaries
|
# installed platform-specific binaries
|
||||||
/bin
|
/bin
|
||||||
|
|
||||||
|
first-network/channel-artifacts/*.tx
|
||||||
|
first-network/channel-artifacts/*.block
|
||||||
|
first-network/crypto-config/*
|
||||||
|
|
||||||
|
|
|
||||||
1
basic-network/.env
Normal file
1
basic-network/.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
COMPOSE_PROJECT_NAME=net
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
#
|
#
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
basic:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ca.example.com:
|
ca.example.com:
|
||||||
image: hyperledger/fabric-ca:x86_64-1.0.0-beta
|
image: hyperledger/fabric-ca:x86_64-1.0.0-beta
|
||||||
|
|
@ -17,6 +20,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
||||||
container_name: ca.example.com
|
container_name: ca.example.com
|
||||||
|
networks:
|
||||||
|
- basic
|
||||||
|
|
||||||
orderer.example.com:
|
orderer.example.com:
|
||||||
container_name: 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/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/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
|
- ./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/msp/peerOrg2
|
||||||
|
networks:
|
||||||
|
- basic
|
||||||
|
|
||||||
peer0.org1.example.com:
|
peer0.org1.example.com:
|
||||||
container_name: peer0.org1.example.com
|
container_name: peer0.org1.example.com
|
||||||
|
|
@ -52,7 +59,7 @@ services:
|
||||||
# # the following setting starts chaincode containers on the same
|
# # the following setting starts chaincode containers on the same
|
||||||
# # bridge network as the peers
|
# # bridge network as the peers
|
||||||
# # https://docs.docker.com/compose/networking/
|
# # 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_STATEDATABASE=CouchDB
|
||||||
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
|
||||||
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
|
||||||
|
|
@ -68,6 +75,8 @@ services:
|
||||||
- ./config:/etc/hyperledger/configtx
|
- ./config:/etc/hyperledger/configtx
|
||||||
depends_on:
|
depends_on:
|
||||||
- orderer.example.com
|
- orderer.example.com
|
||||||
|
networks:
|
||||||
|
- basic
|
||||||
|
|
||||||
couchdb:
|
couchdb:
|
||||||
container_name: couchdb
|
container_name: couchdb
|
||||||
|
|
@ -76,3 +85,5 @@ services:
|
||||||
- 5984:5984
|
- 5984:5984
|
||||||
environment:
|
environment:
|
||||||
DB_URL: http://localhost:5984/member_db
|
DB_URL: http://localhost:5984/member_db
|
||||||
|
networks:
|
||||||
|
- basic
|
||||||
|
|
|
||||||
1
first-network/.env
Normal file
1
first-network/.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
COMPOSE_PROJECT_NAME=net
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
peer-base:
|
peer-base:
|
||||||
image: hyperledger/fabric-peer
|
image: hyperledger/fabric-peer
|
||||||
|
|
@ -12,7 +13,7 @@ services:
|
||||||
# the following setting starts chaincode containers on the same
|
# the following setting starts chaincode containers on the same
|
||||||
# bridge network as the peers
|
# bridge network as the peers
|
||||||
# https://docs.docker.com/compose/networking/
|
# 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=ERROR
|
||||||
- CORE_LOGGING_LEVEL=DEBUG
|
- CORE_LOGGING_LEVEL=DEBUG
|
||||||
- CORE_PEER_TLS_ENABLED=true
|
- CORE_PEER_TLS_ENABLED=true
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
# prepending $PWD/../bin to PATH to ensure we are picking up the correct binaries
|
# 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
|
# this may be commented out to resolve installed version of tools if desired
|
||||||
export PATH=${PWD}/../bin:${PWD}:$PATH
|
export PATH=${PWD}/../bin:${PWD}:$PATH
|
||||||
|
export FABRIC_CFG_PATH=${PWD}
|
||||||
|
|
||||||
# Print the usage message
|
# Print the usage message
|
||||||
function printHelp () {
|
function printHelp () {
|
||||||
|
|
@ -64,7 +65,7 @@ function askProceed () {
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
echo "invalid response"
|
echo "invalid response"
|
||||||
proceed
|
askProceed
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
byfn:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
orderer.example.com:
|
orderer.example.com:
|
||||||
|
|
@ -12,30 +15,40 @@ services:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: orderer.example.com
|
service: orderer.example.com
|
||||||
container_name: orderer.example.com
|
container_name: orderer.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer0.org1.example.com:
|
peer0.org1.example.com:
|
||||||
container_name: peer0.org1.example.com
|
container_name: peer0.org1.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer0.org1.example.com
|
service: peer0.org1.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer1.org1.example.com:
|
peer1.org1.example.com:
|
||||||
container_name: peer1.org1.example.com
|
container_name: peer1.org1.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer1.org1.example.com
|
service: peer1.org1.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer0.org2.example.com:
|
peer0.org2.example.com:
|
||||||
container_name: peer0.org2.example.com
|
container_name: peer0.org2.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer0.org2.example.com
|
service: peer0.org2.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer1.org2.example.com:
|
peer1.org2.example.com:
|
||||||
container_name: peer1.org2.example.com
|
container_name: peer1.org2.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer1.org2.example.com
|
service: peer1.org2.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
cli:
|
cli:
|
||||||
container_name: cli
|
container_name: cli
|
||||||
|
|
@ -67,3 +80,6 @@ services:
|
||||||
- peer1.org1.example.com
|
- peer1.org1.example.com
|
||||||
- peer0.org2.example.com
|
- peer0.org2.example.com
|
||||||
- peer1.org2.example.com
|
- peer1.org2.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
byfn:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
couchdb0:
|
couchdb0:
|
||||||
container_name: couchdb0
|
container_name: couchdb0
|
||||||
|
|
@ -13,6 +16,8 @@ services:
|
||||||
# for example map it to utilize Fauxton User Interface in dev environments.
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
||||||
ports:
|
ports:
|
||||||
- "5984:5984"
|
- "5984:5984"
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer0.org1.example.com:
|
peer0.org1.example.com:
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -28,6 +33,8 @@ services:
|
||||||
# for example map it to utilize Fauxton User Interface in dev environments.
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
||||||
ports:
|
ports:
|
||||||
- "6984:5984"
|
- "6984:5984"
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer1.org1.example.com:
|
peer1.org1.example.com:
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -43,6 +50,8 @@ services:
|
||||||
# for example map it to utilize Fauxton User Interface in dev environments.
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
||||||
ports:
|
ports:
|
||||||
- "7984:5984"
|
- "7984:5984"
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer0.org2.example.com:
|
peer0.org2.example.com:
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -58,6 +67,8 @@ services:
|
||||||
# for example map it to utilize Fauxton User Interface in dev environments.
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
||||||
ports:
|
ports:
|
||||||
- "8984:5984"
|
- "8984:5984"
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer1.org2.example.com:
|
peer1.org2.example.com:
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
byfn:
|
||||||
services:
|
services:
|
||||||
ca0:
|
ca0:
|
||||||
image: hyperledger/fabric-ca
|
image: hyperledger/fabric-ca
|
||||||
|
|
@ -20,6 +22,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
||||||
container_name: ca_peerOrg1
|
container_name: ca_peerOrg1
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
ca1:
|
ca1:
|
||||||
image: hyperledger/fabric-ca
|
image: hyperledger/fabric-ca
|
||||||
|
|
@ -35,33 +39,45 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
- ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
||||||
container_name: ca_peerOrg2
|
container_name: ca_peerOrg2
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
orderer.example.com:
|
orderer.example.com:
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: orderer.example.com
|
service: orderer.example.com
|
||||||
container_name: orderer.example.com
|
container_name: orderer.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer0.org1.example.com:
|
peer0.org1.example.com:
|
||||||
container_name: peer0.org1.example.com
|
container_name: peer0.org1.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer0.org1.example.com
|
service: peer0.org1.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer1.org1.example.com:
|
peer1.org1.example.com:
|
||||||
container_name: peer1.org1.example.com
|
container_name: peer1.org1.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer1.org1.example.com
|
service: peer1.org1.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer0.org2.example.com:
|
peer0.org2.example.com:
|
||||||
container_name: peer0.org2.example.com
|
container_name: peer0.org2.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer0.org2.example.com
|
service: peer0.org2.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
||||||
peer1.org2.example.com:
|
peer1.org2.example.com:
|
||||||
container_name: peer1.org2.example.com
|
container_name: peer1.org2.example.com
|
||||||
extends:
|
extends:
|
||||||
file: base/docker-compose-base.yaml
|
file: base/docker-compose-base.yaml
|
||||||
service: peer1.org2.example.com
|
service: peer1.org2.example.com
|
||||||
|
networks:
|
||||||
|
- byfn
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue