Skip to content

Commit

Permalink
FAB-4910 fix incorrect network spec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
christo4ferris committed Jun 22, 2017
1 parent fbc120f commit 241d08e
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions basic-network/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=net
13 changes: 12 additions & 1 deletion basic-network/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#
version: '2'

networks:
basic:

services:
ca.example.com:
image: hyperledger/fabric-ca:x86_64-1.0.0-beta
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -68,6 +75,8 @@ services:
- ./config:/etc/hyperledger/configtx
depends_on:
- orderer.example.com
networks:
- basic

couchdb:
container_name: couchdb
Expand All @@ -76,3 +85,5 @@ services:
- 5984:5984
environment:
DB_URL: http://localhost:5984/member_db
networks:
- basic
1 change: 1 addition & 0 deletions first-network/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=net
3 changes: 2 additions & 1 deletion first-network/base/peer-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

version: '2'

services:
peer-base:
image: hyperledger/fabric-peer
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion first-network/byfn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -64,7 +65,7 @@ function askProceed () {
;;
* )
echo "invalid response"
proceed
askProceed
;;
esac
}
Expand Down
16 changes: 16 additions & 0 deletions first-network/docker-compose-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,50 @@

version: '2'

networks:
byfn:

services:

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

cli:
container_name: cli
Expand Down Expand Up @@ -67,3 +80,6 @@ services:
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
networks:
- byfn

11 changes: 11 additions & 0 deletions first-network/docker-compose-couch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

version: '2'

networks:
byfn:

services:
couchdb0:
container_name: couchdb0
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions first-network/docker-compose-e2e-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

version: '2'

networks:
byfn:
services:
ca0:
image: hyperledger/fabric-ca
Expand All @@ -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
Expand All @@ -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

0 comments on commit 241d08e

Please sign in to comment.