Skip to content

Commit

Permalink
chore(testnet): upgrade fabric testnet to v2.5 in weaver and fix for mac
Browse files Browse the repository at this point in the history
Signed-off-by: Sandeep Nishad <sandeep.nishad1@ibm.com>
  • Loading branch information
sandeepnRES committed Apr 25, 2023
1 parent 53922f1 commit b1758e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 2 additions & 0 deletions weaver/tests/network-setups/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
fabric/dev/config
fabric/dev/bin
fabric/dev/.fabric-setup
fabric/dev/install-fabric.sh
fabric/dev/builders
.lock
*.lock
fabric/dev/scripts/config.json
Expand Down
15 changes: 9 additions & 6 deletions weaver/tests/network-setups/fabric/dev/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FABRIC_VERSION=2.4.7
FABRIC_CA_VERSION=1.5.5
FABRIC_COUCH_VERSION=0.4.20
FABRIC_VERSION=2.5.0
FABRIC_CA_VERSION=1.5.6
CHAINCODE_NAME?=simplestate
NW?=network1
E2E_CONFIDENTIALITY?=false
Expand Down Expand Up @@ -100,7 +99,8 @@ deploy-cc-local: setup-cc-local


.fabric-setup:
curl -sSL https://bit.ly/2ysbOFE | bash -s -- $(FABRIC_VERSION) $(FABRIC_CA_VERSION) $(FABRIC_COUCH_VERSION) -s
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
./install-fabric.sh --fabric-version $(FABRIC_VERSION) --ca-version $(FABRIC_CA_VERSION) docker binary
touch .fabric-setup

.PHONY: stop
Expand Down Expand Up @@ -130,12 +130,15 @@ remove-network2:
.PHONY: clean
clean: remove
+docker system prune -f || true
+rm -rf bin || true
+rm -rf config || true
+rm .fabric-setup || true
+chmod -R 755 ../shared/chaincode/interop
+rm -rf ../shared/chaincode/*

.PHONY: clean-all
clean-all: clean
+rm -rf bin || true
+rm .fabric-setup || true

chmod-artifacts:
sudo chmod 644 ../shared/network1/fabric-ca/ordererOrg/msp/keystore/*
sudo chmod 644 ../shared/network1/fabric-ca/org1/msp/keystore/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ services:
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- FABRIC_CFG_PATH=/etc/hyperledger/fabric
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
Expand Down Expand Up @@ -63,7 +62,7 @@ services:
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_PROFILE_ENABLED=false
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
Expand All @@ -76,9 +75,9 @@ services:
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.${COMPOSE_PROJECT_NAME}.com:$PEER_ORG1_PORT
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.${COMPOSE_PROJECT_NAME}.com:$PEER_ORG1_PORT
- CORE_PEER_LOCALMSPID=Org1MSP
- FABRIC_CFG_PATH=/etc/hyperledger/fabric
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
volumes:
- /var/run/:/host/var/run/
- /var/run/docker.sock:/host/var/run/docker.sock
- $NW_CFG_PATH/peerOrganizations/org1.${COMPOSE_PROJECT_NAME}.com/peers/peer0.org1.${COMPOSE_PROJECT_NAME}.com/msp:/etc/hyperledger/fabric/msp
- $NW_CFG_PATH/peerOrganizations/org1.${COMPOSE_PROJECT_NAME}.com/peers/peer0.org1.${COMPOSE_PROJECT_NAME}.com/tls:/etc/hyperledger/fabric/tls
- peer0.org1.${COMPOSE_PROJECT_NAME}.com:/var/hyperledger/production
Expand All @@ -105,7 +104,7 @@ services:
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_PROFILE_ENABLED=false
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
Expand All @@ -118,9 +117,9 @@ services:
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.${COMPOSE_PROJECT_NAME}.com:$PEER_ORG2_PORT
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.${COMPOSE_PROJECT_NAME}.com:$PEER_ORG2_PORT
- CORE_PEER_LOCALMSPID=Org2MSP
- FABRIC_CFG_PATH=/etc/hyperledger/fabric
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
volumes:
- /var/run/:/host/var/run/
- /var/run/docker.sock:/host/var/run/docker.sock
- $NW_CFG_PATH/peerOrganizations/org2.${COMPOSE_PROJECT_NAME}.com/peers/peer0.org2.${COMPOSE_PROJECT_NAME}.com/msp:/etc/hyperledger/fabric/msp
- $NW_CFG_PATH/peerOrganizations/org2.${COMPOSE_PROJECT_NAME}.com/peers/peer0.org2.${COMPOSE_PROJECT_NAME}.com/tls:/etc/hyperledger/fabric/tls
- peer0.org2.${COMPOSE_PROJECT_NAME}.com:/var/hyperledger/production
Expand Down

0 comments on commit b1758e6

Please sign in to comment.