mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 23:45:10 +00:00
Rearrange port arrangements, reconfirm all ports are defined correctly
This commit is contained in:
parent
967325afca
commit
3b708e7e68
6 changed files with 75 additions and 73 deletions
|
|
@ -59,11 +59,11 @@ services:
|
|||
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
|
||||
- FABRIC_CA_SERVER_CA_NAME=ca-huller
|
||||
- FABRIC_CA_SERVER_TLS_ENABLED=true
|
||||
- FABRIC_CA_SERVER_PORT=10054
|
||||
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:20054
|
||||
- FABRIC_CA_SERVER_PORT=9054
|
||||
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:19054
|
||||
ports:
|
||||
- "10054:10054"
|
||||
- "20054:20054"
|
||||
- "9054:9054"
|
||||
- "19054:19054"
|
||||
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
|
||||
volumes:
|
||||
- ../organizations/fabric-ca/huller:/etc/hyperledger/fabric-ca-server
|
||||
|
|
@ -79,11 +79,11 @@ services:
|
|||
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
|
||||
- FABRIC_CA_SERVER_CA_NAME=ca-export
|
||||
- FABRIC_CA_SERVER_TLS_ENABLED=true
|
||||
- FABRIC_CA_SERVER_PORT=11054
|
||||
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:21054
|
||||
- FABRIC_CA_SERVER_PORT=10054
|
||||
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=0.0.0.0:20054
|
||||
ports:
|
||||
- "11054:11054"
|
||||
- "21054:21054"
|
||||
- "10054:10054"
|
||||
- "20054:20054"
|
||||
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
|
||||
volumes:
|
||||
- ../organizations/fabric-ca/export:/etc/hyperledger/fabric-ca-server
|
||||
|
|
@ -100,10 +100,10 @@ services:
|
|||
- FABRIC_CA_SERVER_CA_NAME=ca-orderer
|
||||
- FABRIC_CA_SERVER_TLS_ENABLED=true
|
||||
- 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:
|
||||
- "9054:9054"
|
||||
- "19054:19054"
|
||||
- "11054:11054"
|
||||
- "21054:21054"
|
||||
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
|
||||
volumes:
|
||||
- ../organizations/fabric-ca/ordererOrg:/etc/hyperledger/fabric-ca-server
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ services:
|
|||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.farmer.varion.com:7051
|
||||
- CORE_PEER_LOCALMSPID=FarmerMSP
|
||||
- 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
|
||||
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0farmer"}
|
||||
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
|
||||
|
|
@ -95,7 +95,7 @@ services:
|
|||
command: peer node start
|
||||
ports:
|
||||
- 7051:7051
|
||||
- 9444:9444
|
||||
- 7444:7444
|
||||
networks:
|
||||
- test
|
||||
|
||||
|
|
@ -115,15 +115,15 @@ services:
|
|||
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
|
||||
# Peer specific variables
|
||||
- CORE_PEER_ID=peer0.pulper.varion.com
|
||||
- CORE_PEER_ADDRESS=peer0.pulper.varion.com:9051
|
||||
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
|
||||
- CORE_PEER_CHAINCODEADDRESS=peer0.pulper.varion.com:9052
|
||||
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.pulper.varion.com:9051
|
||||
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.pulper.varion.com:9051
|
||||
- CORE_PEER_ADDRESS=peer0.pulper.varion.com:8051
|
||||
- CORE_PEER_LISTENADDRESS=0.0.0.0:8051
|
||||
- CORE_PEER_CHAINCODEADDRESS=peer0.pulper.varion.com:8052
|
||||
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.pulper.varion.com:8051
|
||||
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.pulper.varion.com:8051
|
||||
- CORE_PEER_LOCALMSPID=PulperMSP
|
||||
- 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
|
||||
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0pulper"}
|
||||
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
|
||||
|
|
@ -133,8 +133,8 @@ services:
|
|||
working_dir: /root
|
||||
command: peer node start
|
||||
ports:
|
||||
- 9051:9051
|
||||
- 9445:9445
|
||||
- 8051:8051
|
||||
- 8445:8445
|
||||
networks:
|
||||
- test
|
||||
|
||||
|
|
@ -154,15 +154,15 @@ services:
|
|||
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
|
||||
# Peer specific variables
|
||||
- CORE_PEER_ID=peer0.huller.varion.com
|
||||
- CORE_PEER_ADDRESS=peer0.huller.varion.com:11051
|
||||
- CORE_PEER_LISTENADDRESS=0.0.0.0:11051
|
||||
- CORE_PEER_CHAINCODEADDRESS=peer0.huller.varion.com:11052
|
||||
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.huller.varion.com:11051
|
||||
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.huller.varion.com:11051
|
||||
- CORE_PEER_ADDRESS=peer0.huller.varion.com:9051
|
||||
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
|
||||
- CORE_PEER_CHAINCODEADDRESS=peer0.huller.varion.com:9052
|
||||
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.huller.varion.com:9051
|
||||
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.huller.varion.com:9051
|
||||
- CORE_PEER_LOCALMSPID=HullerMSP
|
||||
- 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
|
||||
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0huller"}
|
||||
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
|
||||
|
|
@ -172,8 +172,8 @@ services:
|
|||
working_dir: /root
|
||||
command: peer node start
|
||||
ports:
|
||||
- 11051:11051
|
||||
- 11446:11446
|
||||
- 9051:9051
|
||||
- 9446:9446
|
||||
networks:
|
||||
- test
|
||||
|
||||
|
|
@ -193,15 +193,15 @@ services:
|
|||
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
|
||||
# Peer specific variables
|
||||
- CORE_PEER_ID=peer0.export.varion.com
|
||||
- CORE_PEER_ADDRESS=peer0.export.varion.com:12051
|
||||
- CORE_PEER_LISTENADDRESS=0.0.0.0:12051
|
||||
- CORE_PEER_CHAINCODEADDRESS=peer0.export.varion.com:12052
|
||||
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:12052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.export.varion.com:12051
|
||||
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.export.varion.com:12051
|
||||
- CORE_PEER_ADDRESS=peer0.export.varion.com:10051
|
||||
- CORE_PEER_LISTENADDRESS=0.0.0.0:10051
|
||||
- CORE_PEER_CHAINCODEADDRESS=peer0.export.varion.com:10052
|
||||
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.export.varion.com:10051
|
||||
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.export.varion.com:10051
|
||||
- CORE_PEER_LOCALMSPID=ExportMSP
|
||||
- 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
|
||||
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0export"}
|
||||
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
|
||||
|
|
@ -211,7 +211,7 @@ services:
|
|||
working_dir: /root
|
||||
command: peer node start
|
||||
ports:
|
||||
- 12051:12051
|
||||
- 12447:12447
|
||||
- 10051:10051
|
||||
- 10447:10447
|
||||
networks:
|
||||
- test
|
||||
|
|
|
|||
|
|
@ -322,4 +322,6 @@ Profiles:
|
|||
Organizations:
|
||||
- *Farmer
|
||||
- *Pulper
|
||||
- *Huller
|
||||
- *Export
|
||||
Capabilities: *ApplicationCapabilities
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
ORG=pulper
|
||||
P0PORT=9051
|
||||
P0PORT=8051
|
||||
CAPORT=8054
|
||||
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
|
||||
|
|
@ -46,7 +46,7 @@ echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrga
|
|||
|
||||
ORG=huller
|
||||
P0PORT=9051
|
||||
CAPORT=8054
|
||||
CAPORT=9054
|
||||
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
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
ORG=export
|
||||
P0PORT=9051
|
||||
CAPORT=8054
|
||||
P0PORT=10051
|
||||
CAPORT=10054
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -179,22 +179,22 @@ function createHuller() {
|
|||
export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/peerOrganizations/huller.varion.com/
|
||||
|
||||
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
|
||||
|
||||
echo 'NodeOUs:
|
||||
Enable: true
|
||||
ClientOUIdentifier:
|
||||
Certificate: cacerts/localhost-10054-ca-huller.pem
|
||||
Certificate: cacerts/localhost-9054-ca-huller.pem
|
||||
OrganizationalUnitIdentifier: client
|
||||
PeerOUIdentifier:
|
||||
Certificate: cacerts/localhost-10054-ca-huller.pem
|
||||
Certificate: cacerts/localhost-9054-ca-huller.pem
|
||||
OrganizationalUnitIdentifier: peer
|
||||
AdminOUIdentifier:
|
||||
Certificate: cacerts/localhost-10054-ca-huller.pem
|
||||
Certificate: cacerts/localhost-9054-ca-huller.pem
|
||||
OrganizationalUnitIdentifier: admin
|
||||
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"
|
||||
|
||||
# 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"
|
||||
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
|
||||
|
||||
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"
|
||||
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
|
||||
|
||||
# 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"
|
||||
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
|
||||
|
||||
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"
|
||||
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
|
||||
|
||||
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/
|
||||
|
||||
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
|
||||
|
||||
echo 'NodeOUs:
|
||||
Enable: true
|
||||
ClientOUIdentifier:
|
||||
Certificate: cacerts/localhost-11054-ca-export.pem
|
||||
Certificate: cacerts/localhost-10054-ca-export.pem
|
||||
OrganizationalUnitIdentifier: client
|
||||
PeerOUIdentifier:
|
||||
Certificate: cacerts/localhost-11054-ca-export.pem
|
||||
Certificate: cacerts/localhost-10054-ca-export.pem
|
||||
OrganizationalUnitIdentifier: peer
|
||||
AdminOUIdentifier:
|
||||
Certificate: cacerts/localhost-11054-ca-export.pem
|
||||
Certificate: cacerts/localhost-10054-ca-export.pem
|
||||
OrganizationalUnitIdentifier: admin
|
||||
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"
|
||||
|
||||
# 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"
|
||||
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
|
||||
|
||||
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"
|
||||
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
|
||||
|
||||
# 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"
|
||||
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
|
||||
|
||||
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"
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
echo 'NodeOUs:
|
||||
Enable: true
|
||||
ClientOUIdentifier:
|
||||
Certificate: cacerts/localhost-9054-ca-orderer.pem
|
||||
Certificate: cacerts/localhost-11054-ca-orderer.pem
|
||||
OrganizationalUnitIdentifier: client
|
||||
PeerOUIdentifier:
|
||||
Certificate: cacerts/localhost-9054-ca-orderer.pem
|
||||
Certificate: cacerts/localhost-11054-ca-orderer.pem
|
||||
OrganizationalUnitIdentifier: peer
|
||||
AdminOUIdentifier:
|
||||
Certificate: cacerts/localhost-9054-ca-orderer.pem
|
||||
Certificate: cacerts/localhost-11054-ca-orderer.pem
|
||||
OrganizationalUnitIdentifier: admin
|
||||
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"
|
||||
|
||||
# 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"
|
||||
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
|
||||
|
||||
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"
|
||||
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
|
||||
|
||||
# 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"
|
||||
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
|
||||
|
||||
cp "${PWD}/organizations/ordererOrganizations/varion.com/msp/config.yaml" "${PWD}/organizations/ordererOrganizations/varion.com/users/Admin@varion.com/msp/config.yaml"
|
||||
|
|
|
|||
|
|
@ -43,17 +43,17 @@ setGlobals() {
|
|||
export CORE_PEER_LOCALMSPID=PulperMSP
|
||||
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_ADDRESS=localhost:9051
|
||||
export CORE_PEER_ADDRESS=localhost:8051
|
||||
elif [ $USING_ORG == "huller" ]; then
|
||||
export CORE_PEER_LOCALMSPID=HullerMSP
|
||||
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_ADDRESS=localhost:11051
|
||||
export CORE_PEER_ADDRESS=localhost:9051
|
||||
elif [ $USING_ORG == "export" ]; then
|
||||
export CORE_PEER_LOCALMSPID=ExportMSP
|
||||
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_ADDRESS=localhost:12051
|
||||
export CORE_PEER_ADDRESS=localhost:10051
|
||||
else
|
||||
errorln "ORG Unknown"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue