Add an organization to an external channel
After you create an organization in Alibaba Cloud BaaS, submit an application to add it to a channel in an external Hyperledger Fabric environment.
This procedure involves two parties: the Alibaba Cloud BaaS user and the administrator of the external Hyperledger Fabric environment. Steps are labeled by actor.
Prerequisites
Before you begin, make sure that:
The peer and orderer node addresses in the external channel are domain name and port number combinations accessible from the Internet
The organizations in the external channel use the same type of state database as your BaaS organizations. The default state database is CouchDB
The Hyperledger Fabric versions are compatible:
If the BaaS consortium version is V1.4, the external organization must run Hyperledger Fabric V1.4.2 or later, and earlier than V2.0
If the BaaS consortium version is V2.2, the external organization must run Hyperledger Fabric V2.2.x
(Recommended) A management chaincode is deployed in every organization in the external channel to coordinate organization management centrally. For details, see Management chaincode
How it works
The join process has three stages:
The BaaS user exports a request file containing the organization's configuration and sends it to the external administrator.
The external administrator adds the organization to the channel configuration using the request file, then returns a response file.
The BaaS user uploads the response file to complete the join, then deploys the management chaincode to enable coordinated channel management.
Add an internal organization to an external channel
(BaaS user) Log on to the Alibaba Cloud BaaS console. In the My Organizations section of the Overview page, click the name of the target organization.consoleAlibaba Cloud BaaS console
(BaaS user) Click the Channels tab, then click Join Hybrid Channel in the upper-right corner.
(BaaS user) In the Join Hybrid Channel pane, click Download Join Request to download the request file. The request file contains your organization's configuration that the external administrator needs to update the channel. Send the file to the administrator of the external Hyperledger Fabric environment.
(External administrator) Use the blockchain platform that hosts the target channel or the Hyperledger Fabric command-line interface (CLI) to add the organization information from the request file to the target channel configuration. For CLI instructions, see Adding an Org to a Channel. We recommend that you use the management chaincode to coordinate the task across the existing channel organizations.
(External administrator) Generate a response file and send it to the BaaS user. The response file confirms that the channel configuration has been updated to include your organization.

(BaaS user) Log on to the Alibaba Cloud BaaS console. In the My Organizations section of the Overview page, click the name of the organization to be added. Click the Channels tab, then click Join Hybrid Channel in the upper-right corner.

(BaaS user) In the Join Hybrid Channel pane, upload the response file or enter the response information in the field, then click Join.
(BaaS user) Download the management chaincode, deploy it in the added organization, and bind it to the external channel. This lets the organization participate in managing the channel alongside other organizations. For details, see Management chaincode.