Rearrange port arrangements, reconfirm all ports are defined correctly

This commit is contained in:
Ferry Ariawan 2024-06-10 13:56:43 +07:00
parent 967325afca
commit 3b708e7e68
6 changed files with 75 additions and 73 deletions

View file

@ -59,11 +59,11 @@ services:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-huller - FABRIC_CA_SERVER_CA_NAME=ca-huller
- FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_PORT=10054 - FABRIC_CA_SERVER_PORT=9054
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:20054 - FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:19054
ports: ports:
- "10054:10054" - "9054:9054"
- "20054:20054" - "19054:19054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d' command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes: volumes:
- ../organizations/fabric-ca/huller:/etc/hyperledger/fabric-ca-server - ../organizations/fabric-ca/huller:/etc/hyperledger/fabric-ca-server
@ -79,11 +79,11 @@ services:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-export - FABRIC_CA_SERVER_CA_NAME=ca-export
- FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_PORT=11054 - FABRIC_CA_SERVER_PORT=10054
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:21054 - FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:20054
ports: ports:
- "11054:11054" - "10054:10054"
- "21054:21054" - "20054:20054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d' command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes: volumes:
- ../organizations/fabric-ca/export:/etc/hyperledger/fabric-ca-server - ../organizations/fabric-ca/export:/etc/hyperledger/fabric-ca-server
@ -100,10 +100,10 @@ services:
- FABRIC_CA_SERVER_CA_NAME=ca-orderer - FABRIC_CA_SERVER_CA_NAME=ca-orderer
- FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_PORT=9054 - FABRIC_CA_SERVER_PORT=9054
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:19054 - FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:21054
ports: ports:
- "9054:9054" - "11054:11054"
- "19054:19054" - "21054:21054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d' command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes: volumes:
- ../organizations/fabric-ca/ordererOrg:/etc/hyperledger/fabric-ca-server - ../organizations/fabric-ca/ordererOrg:/etc/hyperledger/fabric-ca-server

View file

@ -84,7 +84,7 @@ services:
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.farmer.varion.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.farmer.varion.com:7051
- CORE_PEER_LOCALMSPID=FarmerMSP - CORE_PEER_LOCALMSPID=FarmerMSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_OPERATIONS_LISTENADDRESS=peer0.farmer.varion.com:9444 - CORE_OPERATIONS_LISTENADDRESS=peer0.farmer.varion.com:7444
- CORE_METRICS_PROVIDER=prometheus - CORE_METRICS_PROVIDER=prometheus
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0farmer"} - CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0farmer"}
- CORE_CHAINCODE_EXECUTETIMEOUT=300s - CORE_CHAINCODE_EXECUTETIMEOUT=300s
@ -95,7 +95,7 @@ services:
command: peer node start command: peer node start
ports: ports:
- 7051:7051 - 7051:7051
- 9444:9444 - 7444:7444
networks: networks:
- test - test
@ -115,15 +115,15 @@ services:
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
# Peer specific variables # Peer specific variables
- CORE_PEER_ID=peer0.pulper.varion.com - CORE_PEER_ID=peer0.pulper.varion.com
- CORE_PEER_ADDRESS=peer0.pulper.varion.com:9051 - CORE_PEER_ADDRESS=peer0.pulper.varion.com:8051
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051 - CORE_PEER_LISTENADDRESS=0.0.0.0:8051
- CORE_PEER_CHAINCODEADDRESS=peer0.pulper.varion.com:9052 - CORE_PEER_CHAINCODEADDRESS=peer0.pulper.varion.com:8052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.pulper.varion.com:9051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.pulper.varion.com:8051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.pulper.varion.com:9051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.pulper.varion.com:8051
- CORE_PEER_LOCALMSPID=PulperMSP - CORE_PEER_LOCALMSPID=PulperMSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_OPERATIONS_LISTENADDRESS=peer0.pulper.varion.com:9445 - CORE_OPERATIONS_LISTENADDRESS=peer0.pulper.varion.com:8445
- CORE_METRICS_PROVIDER=prometheus - CORE_METRICS_PROVIDER=prometheus
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0pulper"} - CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0pulper"}
- CORE_CHAINCODE_EXECUTETIMEOUT=300s - CORE_CHAINCODE_EXECUTETIMEOUT=300s
@ -133,8 +133,8 @@ services:
working_dir: /root working_dir: /root
command: peer node start command: peer node start
ports: ports:
- 9051:9051 - 8051:8051
- 9445:9445 - 8445:8445
networks: networks:
- test - test
@ -154,15 +154,15 @@ services:
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
# Peer specific variables # Peer specific variables
- CORE_PEER_ID=peer0.huller.varion.com - CORE_PEER_ID=peer0.huller.varion.com
- CORE_PEER_ADDRESS=peer0.huller.varion.com:11051 - CORE_PEER_ADDRESS=peer0.huller.varion.com:9051
- CORE_PEER_LISTENADDRESS=0.0.0.0:11051 - CORE_PEER_LISTENADDRESS=0.0.0.0:9051
- CORE_PEER_CHAINCODEADDRESS=peer0.huller.varion.com:11052 - CORE_PEER_CHAINCODEADDRESS=peer0.huller.varion.com:9052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.huller.varion.com:11051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.huller.varion.com:9051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.huller.varion.com:11051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.huller.varion.com:9051
- CORE_PEER_LOCALMSPID=HullerMSP - CORE_PEER_LOCALMSPID=HullerMSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_OPERATIONS_LISTENADDRESS=peer0.huller.varion.com:11446 - CORE_OPERATIONS_LISTENADDRESS=peer0.huller.varion.com:9446
- CORE_METRICS_PROVIDER=prometheus - CORE_METRICS_PROVIDER=prometheus
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0huller"} - CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0huller"}
- CORE_CHAINCODE_EXECUTETIMEOUT=300s - CORE_CHAINCODE_EXECUTETIMEOUT=300s
@ -172,8 +172,8 @@ services:
working_dir: /root working_dir: /root
command: peer node start command: peer node start
ports: ports:
- 11051:11051 - 9051:9051
- 11446:11446 - 9446:9446
networks: networks:
- test - test
@ -193,15 +193,15 @@ services:
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
# Peer specific variables # Peer specific variables
- CORE_PEER_ID=peer0.export.varion.com - CORE_PEER_ID=peer0.export.varion.com
- CORE_PEER_ADDRESS=peer0.export.varion.com:12051 - CORE_PEER_ADDRESS=peer0.export.varion.com:10051
- CORE_PEER_LISTENADDRESS=0.0.0.0:12051 - CORE_PEER_LISTENADDRESS=0.0.0.0:10051
- CORE_PEER_CHAINCODEADDRESS=peer0.export.varion.com:12052 - CORE_PEER_CHAINCODEADDRESS=peer0.export.varion.com:10052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:12052 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.export.varion.com:12051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.export.varion.com:10051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.export.varion.com:12051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.export.varion.com:10051
- CORE_PEER_LOCALMSPID=ExportMSP - CORE_PEER_LOCALMSPID=ExportMSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_OPERATIONS_LISTENADDRESS=peer0.export.varion.com:12447 - CORE_OPERATIONS_LISTENADDRESS=peer0.export.varion.com:10447
- CORE_METRICS_PROVIDER=prometheus - CORE_METRICS_PROVIDER=prometheus
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0export"} - CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0export"}
- CORE_CHAINCODE_EXECUTETIMEOUT=300s - CORE_CHAINCODE_EXECUTETIMEOUT=300s
@ -211,7 +211,7 @@ services:
working_dir: /root working_dir: /root
command: peer node start command: peer node start
ports: ports:
- 12051:12051 - 10051:10051
- 12447:12447 - 10447:10447
networks: networks:
- test - test

View file

@ -322,4 +322,6 @@ Profiles:
Organizations: Organizations:
- *Farmer - *Farmer
- *Pulper - *Pulper
- *Huller
- *Export
Capabilities: *ApplicationCapabilities Capabilities: *ApplicationCapabilities

View file

@ -36,7 +36,7 @@ echo "$(json_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrga
echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrganizations/farmer.varion.com/connection-farmer.yaml echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrganizations/farmer.varion.com/connection-farmer.yaml
ORG=pulper ORG=pulper
P0PORT=9051 P0PORT=8051
CAPORT=8054 CAPORT=8054
PEERPEM=organizations/peerOrganizations/pulper.varion.com/tlsca/tlsca.pulper.varion.com-cert.pem PEERPEM=organizations/peerOrganizations/pulper.varion.com/tlsca/tlsca.pulper.varion.com-cert.pem
CAPEM=organizations/peerOrganizations/pulper.varion.com/ca/ca.pulper.varion.com-cert.pem CAPEM=organizations/peerOrganizations/pulper.varion.com/ca/ca.pulper.varion.com-cert.pem
@ -46,7 +46,7 @@ echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrga
ORG=huller ORG=huller
P0PORT=9051 P0PORT=9051
CAPORT=8054 CAPORT=9054
PEERPEM=organizations/peerOrganizations/huller.varion.com/tlsca/tlsca.huller.varion.com-cert.pem PEERPEM=organizations/peerOrganizations/huller.varion.com/tlsca/tlsca.huller.varion.com-cert.pem
CAPEM=organizations/peerOrganizations/huller.varion.com/ca/ca.huller.varion.com-cert.pem CAPEM=organizations/peerOrganizations/huller.varion.com/ca/ca.huller.varion.com-cert.pem
@ -54,8 +54,8 @@ echo "$(json_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrga
echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrganizations/huller.varion.com/connection-huller.yaml echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrganizations/huller.varion.com/connection-huller.yaml
ORG=export ORG=export
P0PORT=9051 P0PORT=10051
CAPORT=8054 CAPORT=10054
PEERPEM=organizations/peerOrganizations/export.varion.com/tlsca/tlsca.export.varion.com-cert.pem PEERPEM=organizations/peerOrganizations/export.varion.com/tlsca/tlsca.export.varion.com-cert.pem
CAPEM=organizations/peerOrganizations/export.varion.com/ca/ca.export.varion.com-cert.pem CAPEM=organizations/peerOrganizations/export.varion.com/ca/ca.export.varion.com-cert.pem

View file

@ -179,22 +179,22 @@ function createHuller() {
export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/peerOrganizations/huller.varion.com/ export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/peerOrganizations/huller.varion.com/
set -x set -x
fabric-ca-client enroll -u https://admin:adminpw@localhost:10054 --caname ca-huller --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem" fabric-ca-client enroll -u https://admin:adminpw@localhost:9054 --caname ca-huller --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
echo 'NodeOUs: echo 'NodeOUs:
Enable: true Enable: true
ClientOUIdentifier: ClientOUIdentifier:
Certificate: cacerts/localhost-10054-ca-huller.pem Certificate: cacerts/localhost-9054-ca-huller.pem
OrganizationalUnitIdentifier: client OrganizationalUnitIdentifier: client
PeerOUIdentifier: PeerOUIdentifier:
Certificate: cacerts/localhost-10054-ca-huller.pem Certificate: cacerts/localhost-9054-ca-huller.pem
OrganizationalUnitIdentifier: peer OrganizationalUnitIdentifier: peer
AdminOUIdentifier: AdminOUIdentifier:
Certificate: cacerts/localhost-10054-ca-huller.pem Certificate: cacerts/localhost-9054-ca-huller.pem
OrganizationalUnitIdentifier: admin OrganizationalUnitIdentifier: admin
OrdererOUIdentifier: OrdererOUIdentifier:
Certificate: cacerts/localhost-10054-ca-huller.pem Certificate: cacerts/localhost-9054-ca-huller.pem
OrganizationalUnitIdentifier: orderer' > "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" OrganizationalUnitIdentifier: orderer' > "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml"
# Since the CA serves as both the organization CA and TLS CA, copy the org's root cert that was generated by CA startup into the org level ca and tlsca directories # Since the CA serves as both the organization CA and TLS CA, copy the org's root cert that was generated by CA startup into the org level ca and tlsca directories
@ -228,14 +228,14 @@ function createHuller() {
infoln "Generating the peer0 msp" infoln "Generating the peer0 msp"
set -x set -x
fabric-ca-client enroll -u https://peer0:peer0pw@localhost:10054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/peers/peer0.huller.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem" fabric-ca-client enroll -u https://peer0:peer0pw@localhost:9054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/peers/peer0.huller.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/huller.varion.com/peers/peer0.huller.varion.com/msp/config.yaml" cp "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/huller.varion.com/peers/peer0.huller.varion.com/msp/config.yaml"
infoln "Generating the peer0-tls certificates, use --csr.hosts to specify Subject Alternative Names" infoln "Generating the peer0-tls certificates, use --csr.hosts to specify Subject Alternative Names"
set -x set -x
fabric-ca-client enroll -u https://peer0:peer0pw@localhost:10054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/peers/peer0.huller.varion.com/tls" --enrollment.profile tls --csr.hosts peer0.huller.varion.com --csr.hosts localhost --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem" fabric-ca-client enroll -u https://peer0:peer0pw@localhost:9054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/peers/peer0.huller.varion.com/tls" --enrollment.profile tls --csr.hosts peer0.huller.varion.com --csr.hosts localhost --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
# Copy the tls CA cert, server cert, server keystore to well known file names in the peer's tls directory that are referenced by peer startup config # Copy the tls CA cert, server cert, server keystore to well known file names in the peer's tls directory that are referenced by peer startup config
@ -245,14 +245,14 @@ function createHuller() {
infoln "Generating the user msp" infoln "Generating the user msp"
set -x set -x
fabric-ca-client enroll -u https://user1:user1pw@localhost:10054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/users/User1@huller.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem" fabric-ca-client enroll -u https://user1:user1pw@localhost:9054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/users/User1@huller.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/huller.varion.com/users/User1@huller.varion.com/msp/config.yaml" cp "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/huller.varion.com/users/User1@huller.varion.com/msp/config.yaml"
infoln "Generating the org admin msp" infoln "Generating the org admin msp"
set -x set -x
fabric-ca-client enroll -u https://hulleradmin:hulleradminpw@localhost:10054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/users/Admin@huller.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem" fabric-ca-client enroll -u https://hulleradmin:hulleradminpw@localhost:9054 --caname ca-huller -M "${PWD}/organizations/peerOrganizations/huller.varion.com/users/Admin@huller.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/huller/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/huller.varion.com/users/Admin@huller.varion.com/msp/config.yaml" cp "${PWD}/organizations/peerOrganizations/huller.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/huller.varion.com/users/Admin@huller.varion.com/msp/config.yaml"
@ -265,22 +265,22 @@ function createExport() {
export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/peerOrganizations/export.varion.com/ export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/peerOrganizations/export.varion.com/
set -x set -x
fabric-ca-client enroll -u https://admin:adminpw@localhost:11054 --caname ca-export --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem" fabric-ca-client enroll -u https://admin:adminpw@localhost:10054 --caname ca-export --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
echo 'NodeOUs: echo 'NodeOUs:
Enable: true Enable: true
ClientOUIdentifier: ClientOUIdentifier:
Certificate: cacerts/localhost-11054-ca-export.pem Certificate: cacerts/localhost-10054-ca-export.pem
OrganizationalUnitIdentifier: client OrganizationalUnitIdentifier: client
PeerOUIdentifier: PeerOUIdentifier:
Certificate: cacerts/localhost-11054-ca-export.pem Certificate: cacerts/localhost-10054-ca-export.pem
OrganizationalUnitIdentifier: peer OrganizationalUnitIdentifier: peer
AdminOUIdentifier: AdminOUIdentifier:
Certificate: cacerts/localhost-11054-ca-export.pem Certificate: cacerts/localhost-10054-ca-export.pem
OrganizationalUnitIdentifier: admin OrganizationalUnitIdentifier: admin
OrdererOUIdentifier: OrdererOUIdentifier:
Certificate: cacerts/localhost-11054-ca-export.pem Certificate: cacerts/localhost-10054-ca-export.pem
OrganizationalUnitIdentifier: orderer' > "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" OrganizationalUnitIdentifier: orderer' > "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml"
# Since the CA serves as both the organization CA and TLS CA, copy the org's root cert that was generated by CA startup into the org level ca and tlsca directories # Since the CA serves as both the organization CA and TLS CA, copy the org's root cert that was generated by CA startup into the org level ca and tlsca directories
@ -314,14 +314,14 @@ function createExport() {
infoln "Generating the peer0 msp" infoln "Generating the peer0 msp"
set -x set -x
fabric-ca-client enroll -u https://peer0:peer0pw@localhost:11054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/peers/peer0.export.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem" fabric-ca-client enroll -u https://peer0:peer0pw@localhost:10054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/peers/peer0.export.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/export.varion.com/peers/peer0.export.varion.com/msp/config.yaml" cp "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/export.varion.com/peers/peer0.export.varion.com/msp/config.yaml"
infoln "Generating the peer0-tls certificates, use --csr.hosts to specify Subject Alternative Names" infoln "Generating the peer0-tls certificates, use --csr.hosts to specify Subject Alternative Names"
set -x set -x
fabric-ca-client enroll -u https://peer0:peer0pw@localhost:11054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/peers/peer0.export.varion.com/tls" --enrollment.profile tls --csr.hosts peer0.export.varion.com --csr.hosts localhost --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem" fabric-ca-client enroll -u https://peer0:peer0pw@localhost:10054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/peers/peer0.export.varion.com/tls" --enrollment.profile tls --csr.hosts peer0.export.varion.com --csr.hosts localhost --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
# Copy the tls CA cert, server cert, server keystore to well known file names in the peer's tls directory that are referenced by peer startup config # Copy the tls CA cert, server cert, server keystore to well known file names in the peer's tls directory that are referenced by peer startup config
@ -331,14 +331,14 @@ function createExport() {
infoln "Generating the user msp" infoln "Generating the user msp"
set -x set -x
fabric-ca-client enroll -u https://user1:user1pw@localhost:11054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/users/User1@export.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem" fabric-ca-client enroll -u https://user1:user1pw@localhost:10054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/users/User1@export.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/export.varion.com/users/User1@export.varion.com/msp/config.yaml" cp "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/export.varion.com/users/User1@export.varion.com/msp/config.yaml"
infoln "Generating the org admin msp" infoln "Generating the org admin msp"
set -x set -x
fabric-ca-client enroll -u https://exportadmin:exportadminpw@localhost:11054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/users/Admin@export.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem" fabric-ca-client enroll -u https://exportadmin:exportadminpw@localhost:10054 --caname ca-export -M "${PWD}/organizations/peerOrganizations/export.varion.com/users/Admin@export.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/export/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/export.varion.com/users/Admin@export.varion.com/msp/config.yaml" cp "${PWD}/organizations/peerOrganizations/export.varion.com/msp/config.yaml" "${PWD}/organizations/peerOrganizations/export.varion.com/users/Admin@export.varion.com/msp/config.yaml"
@ -351,22 +351,22 @@ function createOrderer() {
export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/ordererOrganizations/varion.com export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/ordererOrganizations/varion.com
set -x set -x
fabric-ca-client enroll -u https://admin:adminpw@localhost:9054 --caname ca-orderer --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem" fabric-ca-client enroll -u https://admin:adminpw@localhost:11054 --caname ca-orderer --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
echo 'NodeOUs: echo 'NodeOUs:
Enable: true Enable: true
ClientOUIdentifier: ClientOUIdentifier:
Certificate: cacerts/localhost-9054-ca-orderer.pem Certificate: cacerts/localhost-11054-ca-orderer.pem
OrganizationalUnitIdentifier: client OrganizationalUnitIdentifier: client
PeerOUIdentifier: PeerOUIdentifier:
Certificate: cacerts/localhost-9054-ca-orderer.pem Certificate: cacerts/localhost-11054-ca-orderer.pem
OrganizationalUnitIdentifier: peer OrganizationalUnitIdentifier: peer
AdminOUIdentifier: AdminOUIdentifier:
Certificate: cacerts/localhost-9054-ca-orderer.pem Certificate: cacerts/localhost-11054-ca-orderer.pem
OrganizationalUnitIdentifier: admin OrganizationalUnitIdentifier: admin
OrdererOUIdentifier: OrdererOUIdentifier:
Certificate: cacerts/localhost-9054-ca-orderer.pem Certificate: cacerts/localhost-11054-ca-orderer.pem
OrganizationalUnitIdentifier: orderer' > "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml" OrganizationalUnitIdentifier: orderer' > "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml"
# Since the CA serves as both the organization CA and TLS CA, copy the org's root cert that was generated by CA startup into the org level ca and tlsca directories # Since the CA serves as both the organization CA and TLS CA, copy the org's root cert that was generated by CA startup into the org level ca and tlsca directories
@ -391,14 +391,14 @@ function createOrderer() {
infoln "Generating the orderer msp" infoln "Generating the orderer msp"
set -x set -x
fabric-ca-client enroll -u https://orderer:ordererpw@localhost:9054 --caname ca-orderer -M "${PWD}/organizations/ordererOrganizations/varion.com/orderers/orderer.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem" fabric-ca-client enroll -u https://orderer:ordererpw@localhost:11054 --caname ca-orderer -M "${PWD}/organizations/ordererOrganizations/varion.com/orderers/orderer.varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml" "${PWD}/organizations/ordererOrganizations/varion.com/orderers/orderer.varion.com/msp/config.yaml" cp "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml" "${PWD}/organizations/ordererOrganizations/varion.com/orderers/orderer.varion.com/msp/config.yaml"
infoln "Generating the orderer-tls certificates, use --csr.hosts to specify Subject Alternative Names" infoln "Generating the orderer-tls certificates, use --csr.hosts to specify Subject Alternative Names"
set -x set -x
fabric-ca-client enroll -u https://orderer:ordererpw@localhost:9054 --caname ca-orderer -M "${PWD}/organizations/ordererOrganizations/varion.com/orderers/orderer.varion.com/tls" --enrollment.profile tls --csr.hosts orderer.varion.com --csr.hosts localhost --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem" fabric-ca-client enroll -u https://orderer:ordererpw@localhost:11054 --caname ca-orderer -M "${PWD}/organizations/ordererOrganizations/varion.com/orderers/orderer.varion.com/tls" --enrollment.profile tls --csr.hosts orderer.varion.com --csr.hosts localhost --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
# Copy the tls CA cert, server cert, server keystore to well known file names in the orderer's tls directory that are referenced by orderer startup config # Copy the tls CA cert, server cert, server keystore to well known file names in the orderer's tls directory that are referenced by orderer startup config
@ -412,7 +412,7 @@ function createOrderer() {
infoln "Generating the admin msp" infoln "Generating the admin msp"
set -x set -x
fabric-ca-client enroll -u https://ordererAdmin:ordererAdminpw@localhost:9054 --caname ca-orderer -M "${PWD}/organizations/ordererOrganizations/varion.com/users/Admin@varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem" fabric-ca-client enroll -u https://ordererAdmin:ordererAdminpw@localhost:11054 --caname ca-orderer -M "${PWD}/organizations/ordererOrganizations/varion.com/users/Admin@varion.com/msp" --tls.certfiles "${PWD}/organizations/fabric-ca/ordererOrg/ca-cert.pem"
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
cp "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml" "${PWD}/organizations/ordererOrganizations/varion.com/users/Admin@varion.com/msp/config.yaml" cp "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml" "${PWD}/organizations/ordererOrganizations/varion.com/users/Admin@varion.com/msp/config.yaml"

View file

@ -43,17 +43,17 @@ setGlobals() {
export CORE_PEER_LOCALMSPID=PulperMSP export CORE_PEER_LOCALMSPID=PulperMSP
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_PULPER_CA export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_PULPER_CA
export CORE_PEER_MSPCONFIGPATH=${TEST_NETWORK_HOME}/organizations/peerOrganizations/pulper.varion.com/users/Admin@pulper.varion.com/msp export CORE_PEER_MSPCONFIGPATH=${TEST_NETWORK_HOME}/organizations/peerOrganizations/pulper.varion.com/users/Admin@pulper.varion.com/msp
export CORE_PEER_ADDRESS=localhost:9051 export CORE_PEER_ADDRESS=localhost:8051
elif [ $USING_ORG == "huller" ]; then elif [ $USING_ORG == "huller" ]; then
export CORE_PEER_LOCALMSPID=HullerMSP export CORE_PEER_LOCALMSPID=HullerMSP
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_HULLER_CA export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_HULLER_CA
export CORE_PEER_MSPCONFIGPATH=${TEST_NETWORK_HOME}/organizations/peerOrganizations/huller.varion.com/users/Admin@huller.varion.com/msp export CORE_PEER_MSPCONFIGPATH=${TEST_NETWORK_HOME}/organizations/peerOrganizations/huller.varion.com/users/Admin@huller.varion.com/msp
export CORE_PEER_ADDRESS=localhost:11051 export CORE_PEER_ADDRESS=localhost:9051
elif [ $USING_ORG == "export" ]; then elif [ $USING_ORG == "export" ]; then
export CORE_PEER_LOCALMSPID=ExportMSP export CORE_PEER_LOCALMSPID=ExportMSP
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_EXPORT_CA export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_EXPORT_CA
export CORE_PEER_MSPCONFIGPATH=${TEST_NETWORK_HOME}/organizations/peerOrganizations/export.varion.com/users/Admin@export.varion.com/msp export CORE_PEER_MSPCONFIGPATH=${TEST_NETWORK_HOME}/organizations/peerOrganizations/export.varion.com/users/Admin@export.varion.com/msp
export CORE_PEER_ADDRESS=localhost:12051 export CORE_PEER_ADDRESS=localhost:10051
else else
errorln "ORG Unknown" errorln "ORG Unknown"
fi fi