Use latest image tag for dev
parent
9c0538cc25
commit
6ab17f83cd
|
@ -69,11 +69,17 @@ dev_init: # initialize the fabric network
|
|||
docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/initialize_peer0.sh"
|
||||
|
||||
dev_stop: # stop the fabric network for dev
|
||||
@echo "Stop the fabric network with 1 peer for dev"
|
||||
@echo "Stop and clean the fabric dev network"
|
||||
docker-compose -f ${COMPOSE_DEV_FILE} down
|
||||
|
||||
dev_restart: dev_stop dev_start
|
||||
|
||||
dev_download: # download required images
|
||||
@echo "Download Docker images for dev"
|
||||
docker pull yeasy/hyperledger-fabric:latest
|
||||
docker pull hyperledger/fabric-baseos:x86_64-0.4.1
|
||||
docker tag yeasy/hyperledger-fabric:latest hyperledger/fabric-ccenv:x86_64-1.1.0
|
||||
|
||||
################## Couchdb testing ################
|
||||
couch:
|
||||
@echo "Please make sure u have setup Docker and pulled images by 'make setup'."
|
||||
|
|
|
@ -73,8 +73,34 @@ services:
|
|||
# - /var/run/:/host/var/run/
|
||||
command: peer node start
|
||||
|
||||
peer-base-dev:
|
||||
cli-base:
|
||||
image: yeasy/hyperledger-fabric:1.0.2
|
||||
#image: hyperledger/fabric-tools:x86_64-1.0.2
|
||||
tty: true
|
||||
environment:
|
||||
#- GOPATH=/opt/gopath
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true
|
||||
- ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
|
||||
- CHANNEL_NAME:="businesschannel"
|
||||
volumes:
|
||||
#- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
|
||||
- ./scripts:/tmp/scripts
|
||||
- ./e2e_cli/channel-artifacts:/tmp/channel-artifacts
|
||||
- ./e2e_cli/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
|
||||
- ./e2e_cli/crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
|
||||
- ./e2e_cli/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto
|
||||
- ./e2e_cli/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
|
||||
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
||||
command: bash -c 'while true; do sleep 20170504; done'
|
||||
|
||||
couchdb-base:
|
||||
#container_name: couchdb0
|
||||
image: hyperledger/fabric-couchdb:x86_64-1.0.2
|
||||
# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
|
||||
# for example map it to utilize Fauxton User Interface in dev environments.
|
||||
peer-base-dev:
|
||||
image: yeasy/hyperledger-fabric:latest
|
||||
environment:
|
||||
#- CORE_PEER_ID=peer0
|
||||
- CORE_PEER_ADDRESSAUTODETECT=false
|
||||
|
@ -102,11 +128,36 @@ services:
|
|||
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- $GOPATH/src/github.com/hyperledger/fabric:/go/src/github.com/hyperledger/fabric
|
||||
#volumes:
|
||||
# - /var/run/:/host/var/run/
|
||||
command: bash -c 'bash /tmp/peer_build.sh; peer node start'
|
||||
|
||||
cli-base:
|
||||
image: yeasy/hyperledger-fabric:1.0.2
|
||||
orderer-base-dev:
|
||||
image: yeasy/hyperledger-fabric:latest
|
||||
#image: hyperledger/fabric-orderer:x86_64-1.0.2
|
||||
environment:
|
||||
- ORDERER_GENERAL_LOGLEVEL=DEBUG
|
||||
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||||
- ORDERER_GENERAL_GENESISMETHOD=file
|
||||
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
|
||||
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
|
||||
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
|
||||
- ORDERER_GENERAL_LEDGERTYPE=file
|
||||
- ORDERER_GENERAL_BATCHTIMEOUT=2s
|
||||
- ORDERER_GENERAL_MAXMESSAGECOUNT=10
|
||||
- ORDERER_GENERAL_MAXWINDOWSIZE=1000
|
||||
- ORDERER_GENERAL_LISTENPORT=7050
|
||||
#- ORDERER_RAMLEDGER_HISTORY_SIZE=100 #only useful when use ram ledger
|
||||
# enabled TLS
|
||||
- ORDERER_GENERAL_TLS_ENABLED=true
|
||||
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
|
||||
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
|
||||
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
||||
expose:
|
||||
- "7050" #
|
||||
#command: bash -c 'bash /tmp/orderer_build.sh; orderer start' # use this if to debug orderer
|
||||
command: bash -c 'orderer start'
|
||||
|
||||
cli-base-dev:
|
||||
image: yeasy/hyperledger-fabric:latest
|
||||
#image: hyperledger/fabric-tools:x86_64-1.0.2
|
||||
tty: true
|
||||
environment:
|
||||
|
@ -124,10 +175,4 @@ services:
|
|||
- ./e2e_cli/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto
|
||||
- ./e2e_cli/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
|
||||
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
||||
command: bash -c 'while true; do sleep 20170504; done'
|
||||
|
||||
couchdb-base:
|
||||
#container_name: couchdb0
|
||||
image: hyperledger/fabric-couchdb:x86_64-1.0.2
|
||||
# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
|
||||
# for example map it to utilize Fauxton User Interface in dev environments.
|
||||
command: bash -c 'while true; do sleep 20170910; done'
|
||||
|
|
|
@ -8,21 +8,10 @@
|
|||
version: '2.0'
|
||||
|
||||
services:
|
||||
# ca.example.com: # not used currently
|
||||
# extends:
|
||||
# file: base.yaml
|
||||
# service: ca-base
|
||||
# container_name: ca.example.com
|
||||
# hostname: ca.example.com
|
||||
# # command: /go/src/github.com/hyperledger/fabric-ca/bin/ca server start -ca testdata/ec.pem #-ca-key testdata/ec-key.pem -config testdata/testconfig.json
|
||||
# ports:
|
||||
# - "7054:7054"
|
||||
# command: fabric-ca-server start -b admin:adminpw
|
||||
|
||||
orderer.example.com: # There can be multiple orderers
|
||||
extends:
|
||||
file: base.yaml
|
||||
service: orderer-base
|
||||
service: orderer-base-dev
|
||||
container_name: orderer.example.com
|
||||
hostname: orderer.example.com
|
||||
ports:
|
||||
|
@ -31,30 +20,7 @@ services:
|
|||
- ./e2e_cli/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
|
||||
- ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
|
||||
- ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
|
||||
command: orderer start
|
||||
|
||||
cli:
|
||||
#extends:
|
||||
# file: peer-base-dev.yaml
|
||||
# service: peer-base
|
||||
#image: yeasy/hyperledger-fabric:1.0.2
|
||||
extends:
|
||||
file: base.yaml
|
||||
service: cli-base
|
||||
container_name: fabric-cli
|
||||
hostname: fabric-cli
|
||||
tty: true
|
||||
environment:
|
||||
- CORE_PEER_ID=fabric-cli
|
||||
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
|
||||
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
|
||||
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
|
||||
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
||||
volumes:
|
||||
- $GOPATH/src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric
|
||||
- /tmp/:/tmp/
|
||||
#command: bash -c 'bash /tmp/orderer_build.sh; orderer start'
|
||||
|
||||
peer0.org1.example.com:
|
||||
extends:
|
||||
|
@ -76,8 +42,40 @@ services:
|
|||
- 7052:7052
|
||||
- 7053:7053
|
||||
#command: bash -c 'bash /tmp/peer_build.sh; peer node start'
|
||||
command: bash -c 'bash /tmp/peer_build.sh; peer node start'
|
||||
#command: peer node start
|
||||
|
||||
cli:
|
||||
#extends:
|
||||
# file: peer-base-dev.yaml
|
||||
# service: peer-base
|
||||
#image: yeasy/hyperledger-fabric:1.0.2
|
||||
extends:
|
||||
file: base.yaml
|
||||
service: cli-base-dev
|
||||
container_name: fabric-cli
|
||||
hostname: fabric-cli
|
||||
tty: true
|
||||
environment:
|
||||
- CORE_PEER_ID=fabric-cli
|
||||
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
|
||||
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
|
||||
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
|
||||
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
||||
volumes:
|
||||
- $GOPATH/src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric
|
||||
- /tmp/:/tmp/
|
||||
|
||||
# ca.example.com: # not used currently
|
||||
# extends:
|
||||
# file: base.yaml
|
||||
# service: ca-base
|
||||
# container_name: ca.example.com
|
||||
# hostname: ca.example.com
|
||||
# # command: /go/src/github.com/hyperledger/fabric-ca/bin/ca server start -ca testdata/ec.pem #-ca-key testdata/ec-key.pem -config testdata/testconfig.json
|
||||
# ports:
|
||||
# - "7054:7054"
|
||||
# command: fabric-ca-server start -b admin:adminpw
|
||||
|
||||
#networks:
|
||||
# default:
|
||||
|
|
Loading…
Reference in New Issue