Skip to content

Commit

Permalink
Move to Fabric 2-4
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew B White <[email protected]>
  • Loading branch information
mbwhite authored and jt-nti committed Nov 8, 2021
1 parent 5bbe3a8 commit 95d0764
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ docker.log

# jsdoc output
docs/gen
fabric-samples
2 changes: 1 addition & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ variables:
- name: rewire_node_version_spec # see https://github.com/jhnns/rewire/issues/178
value: '16.4.0'
- name: FABRIC_VERSION
value: 2.2
value: 2.4.0-beta

# Build on Ubuntu
pool:
Expand Down
2 changes: 1 addition & 1 deletion common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"name": "start-fabric",
"summary": "Starts local Fabric test network ",
"description": "Run this command to start local Fabric network for testing",
"shellCommand": "rm -rf ./fabric-samples && curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.2 1.5.1 && cd ./fabric-samples/test-network && ./network.sh down && ./network.sh up createChannel -ca -s couchdb && cd -"
"shellCommand": "rm -rf ./fabric-samples && curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.4.0-beta 1.5.1 && cd ./fabric-samples/test-network && ./network.sh down && ./network.sh up createChannel -ca -s couchdb && cd -"
},
{
"commandKind": "global",
Expand Down
10 changes: 5 additions & 5 deletions test/fv/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const execSync = require('child_process').execSync;
const ordererCA = '/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem';
const dir = path.join(__dirname, '..', '..', 'fabric-samples');
const registerAndEnroll = () => {
const cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` +
const cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` +
`export FABRIC_CA_CLIENT_HOME=${dir}/test-network/organizations/peerOrganizations/org1.example.com/ && ` +
`fabric-ca-client register --caname ca-org1 --id.name owner --id.secret ownerpw --id.type client --tls.certfiles "${dir}/test-network/organizations/fabric-ca/org1/tls-cert.pem" && ` +
`fabric-ca-client enroll -u https://owner:ownerpw@localhost:7054 --caname ca-org1 -M "${dir}/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp" --tls.certfiles "${dir}/test-network/organizations/fabric-ca/org1/tls-cert.pem" && ` +
Expand Down Expand Up @@ -52,7 +52,7 @@ async function install(ccName, transient) {
async function instantiate(ccName, func, args) {
let res = null;
if (func !== undefined) {
const initCmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` +
const initCmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` +
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org1MSP" && ` +
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt && ` +
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp && ` +
Expand All @@ -77,7 +77,7 @@ function printArgs(func, args) {
}

async function invoke(ccName, func, args, transient) {
let cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` +
let cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` +
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org1MSP" && ` +
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt && ` +
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp && ` +
Expand All @@ -95,7 +95,7 @@ async function invoke(ccName, func, args, transient) {
}

async function query(ccName, func, args, transient) {
let cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` +
let cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` +
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org2MSP" && ` +
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt && ` +
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp && ` +
Expand All @@ -120,7 +120,7 @@ async function installAndInstantiate(ccName, instantiateFunc, instantiateArgs, t
}

async function getLastBlock() {
const cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` +
const cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` +
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org2MSP" && ` +
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt && ` +
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp && ` +
Expand Down
8 changes: 4 additions & 4 deletions tools/getEdgeDocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
set -euo pipefail

version=${FABRIC_VERSION:-2.2}
version=${FABRIC_VERSION:-2.4}
artifactory_url=hyperledger-fabric.jfrog.io

for image in peer orderer ca baseos ccenv tools; do
Expand All @@ -17,6 +17,6 @@ for image in peer orderer ca baseos ccenv tools; do
done

docker pull -q couchdb:3.1
docker pull -q hyperledger/fabric-ca:1.4
docker tag hyperledger/fabric-ca:1.4 hyperledger/fabric-ca
docker rmi hyperledger/fabric-ca:1.4 >/dev/null
docker pull -q hyperledger/fabric-ca:1.5
docker tag hyperledger/fabric-ca:1.5 hyperledger/fabric-ca
docker rmi hyperledger/fabric-ca:1.5 >/dev/null

0 comments on commit 95d0764

Please sign in to comment.