mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-23 01:55:10 +00:00
[FAB-16844] Correct BYFN CC name/Add cli for org2
- Correct chaincode name regexp in byfn.sh - Add in the useful cli for org2 in first-network Change-Id: I6904db1786ae431f8a7069296ff610695d5a72c0 Signed-off-by: Matthew B. White <whitemat@uk.ibm.com>
This commit is contained in:
parent
fe96f60311
commit
4a4cc6cfac
2 changed files with 37 additions and 2 deletions
|
|
@ -90,7 +90,7 @@ function askProceed() {
|
|||
# Obtain CONTAINER_IDS and remove them
|
||||
# TODO Might want to make this optional - could clear other containers
|
||||
function clearContainers() {
|
||||
CONTAINER_IDS=$(docker ps -a | awk '($2 ~ /dev-peer.*.mycc.*/) {print $1}')
|
||||
CONTAINER_IDS=$(docker ps -a | awk '($2 ~ /dev-peer.*/) {print $1}')
|
||||
if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" == " " ]; then
|
||||
echo "---- No containers available for deletion ----"
|
||||
else
|
||||
|
|
@ -102,7 +102,7 @@ function clearContainers() {
|
|||
# specifically the following images are often left behind:
|
||||
# TODO list generated image naming patterns
|
||||
function removeUnwantedImages() {
|
||||
DOCKER_IMAGE_IDS=$(docker images | awk '($1 ~ /dev-peer.*.mycc.*/) {print $3}')
|
||||
DOCKER_IMAGE_IDS=$(docker images | awk '($1 ~ /dev-peer.*/) {print $3}')
|
||||
if [ -z "$DOCKER_IMAGE_IDS" -o "$DOCKER_IMAGE_IDS" == " " ]; then
|
||||
echo "---- No images available for deletion ----"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -91,3 +91,38 @@ services:
|
|||
- peer1.org2.example.com
|
||||
networks:
|
||||
- byfn
|
||||
|
||||
Org2cli:
|
||||
container_name: Org2cli
|
||||
image: hyperledger/fabric-tools:$IMAGE_TAG
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
#- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=INFO
|
||||
- CORE_PEER_ID=cli
|
||||
- CORE_PEER_ADDRESS=peer0.org2.example.com:9051
|
||||
- CORE_PEER_LOCALMSPID=Org2MSP
|
||||
- CORE_PEER_TLS_ENABLED=true
|
||||
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt
|
||||
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key
|
||||
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
|
||||
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
|
||||
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
||||
command: /bin/bash
|
||||
volumes:
|
||||
- /var/run/:/host/var/run/
|
||||
- ./../chaincode/:/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode
|
||||
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
|
||||
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
|
||||
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
|
||||
depends_on:
|
||||
- orderer.example.com
|
||||
- peer0.org1.example.com
|
||||
- peer1.org1.example.com
|
||||
- peer0.org2.example.com
|
||||
- peer1.org2.example.com
|
||||
networks:
|
||||
- byfn
|
||||
|
|
|
|||
Loading…
Reference in a new issue