mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 11:35:10 +00:00
Update the chaincode.env with new options
1. Introduce four new environment variables to the default chaincode environment file. 2. Add two new environment files for easy/automation running of the external chaincodes for different organizations. Note that when TLS enabled, the package contents will change. So each organization will have their own package ID generated unlike earlier. Also, there will be two chaincode containers running instead of one for the given example. Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
This commit is contained in:
parent
95d39673ea
commit
e435eaa5f6
3 changed files with 64 additions and 0 deletions
|
|
@ -6,3 +6,19 @@ CHAINCODE_SERVER_ADDRESS=asset-transfer-basic.org1.example.com:9999
|
|||
# on install. The `peer lifecycle chaincode queryinstalled` command can be
|
||||
# used to get the ID after install if required
|
||||
CHAINCODE_ID=basic_1.0:0262396ccaffaa2174bc09f750f742319c4f14d60b16334d2c8921b6842c090c
|
||||
|
||||
# Optional parameters that will be used for TLS connection between peer node
|
||||
# and the chaincode.
|
||||
# TLS is disabled by default, uncomment the following line to enable TLS connection
|
||||
# CHAINCODE_TLS_DISABLED=false
|
||||
|
||||
# Following variables will be ignored if TLS is not enabled.
|
||||
# They need to be in PEM format
|
||||
# CHAINCODE_TLS_KEY=/path/to/private/key/file
|
||||
# CHAINCODE_TLS_CERT=/path/to/public/cert/file
|
||||
|
||||
# The following variable will be used by the chaincode server to verify the
|
||||
# connection from the peer node.
|
||||
# Note that when this is set a single chaincode server cannot be shared
|
||||
# across organizations unless their root CA is same.
|
||||
# CHAINCODE_CLIENT_CA_CERT=/path/to/peer/organization/root/ca/cert/file
|
||||
|
|
|
|||
24
asset-transfer-basic/chaincode-external/chaincode1.env
Normal file
24
asset-transfer-basic/chaincode-external/chaincode1.env
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# CHAINCODE_SERVER_ADDRESS must be set to the host and port where the peer can
|
||||
# connect to the chaincode server
|
||||
CHAINCODE_SERVER_ADDRESS=asset-transfer-basic.org1.example.com:9999
|
||||
|
||||
# CHAINCODE_ID must be set to the Package ID that is assigned to the chaincode
|
||||
# on install. The `peer lifecycle chaincode queryinstalled` command can be
|
||||
# used to get the ID after install if required
|
||||
CHAINCODE_ID=basic_1.0:6726c6b6d8ff66fcf5710b72c6ce512d24f118c51c3de510b3d43e51fa592a7d
|
||||
|
||||
# Optional parameters that will be used for TLS connection between peer node
|
||||
# and the chaincode.
|
||||
# TLS is disabled by default, uncomment the following line to enable TLS connection
|
||||
CHAINCODE_TLS_DISABLED=false
|
||||
|
||||
# Following variables will be ignored if TLS is not enabled.
|
||||
# They need to be in PEM format
|
||||
CHAINCODE_TLS_KEY=/crypto/key1.pem
|
||||
CHAINCODE_TLS_CERT=/crypto/cert1.pem
|
||||
|
||||
# The following variable will be used by the chaincode server to verify the
|
||||
# connection from the peer node.
|
||||
# Note that when this is set a single chaincode server cannot be shared
|
||||
# across organizations unless their root CA is same.
|
||||
CHAINCODE_CLIENT_CA_CERT=/crypto/rootcert1.pem
|
||||
24
asset-transfer-basic/chaincode-external/chaincode2.env
Normal file
24
asset-transfer-basic/chaincode-external/chaincode2.env
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# CHAINCODE_SERVER_ADDRESS must be set to the host and port where the peer can
|
||||
# connect to the chaincode server
|
||||
CHAINCODE_SERVER_ADDRESS=asset-transfer-basic.org2.example.com:9999
|
||||
|
||||
# CHAINCODE_ID must be set to the Package ID that is assigned to the chaincode
|
||||
# on install. The `peer lifecycle chaincode queryinstalled` command can be
|
||||
# used to get the ID after install if required
|
||||
CHAINCODE_ID=basic_1.0:e8f9052385e3763ecf5635591155da05d8efbb6905ccbfc1c7229eb6bd28df1b
|
||||
|
||||
# Optional parameters that will be used for TLS connection between peer node
|
||||
# and the chaincode.
|
||||
# TLS is disabled by default, uncomment the following line to enable TLS connection
|
||||
CHAINCODE_TLS_DISABLED=false
|
||||
|
||||
# Following variables will be ignored if TLS is not enabled.
|
||||
# They need to be in PEM format
|
||||
CHAINCODE_TLS_KEY=/crypto/key2.pem
|
||||
CHAINCODE_TLS_CERT=/crypto/cert2.pem
|
||||
|
||||
# The following variable will be used by the chaincode server to verify the
|
||||
# connection from the peer node.
|
||||
# Note that when this is set a single chaincode server cannot be shared
|
||||
# across organizations unless their root CA is same.
|
||||
CHAINCODE_CLIENT_CA_CERT=/crypto/rootcert2.pem
|
||||
Loading…
Reference in a new issue