Any organization in a channel of a consortium that is created in Alibaba Cloud BaaS can add an external Hyperledger Fabric organization to that channel — as long as the management chaincode is installed and bound across all organizations in the channel. The channel must be marked with the Hybrid Channel identifier before you begin.
Prerequisites
Before you begin, ensure that:
The external organization's peer node addresses follow the
<domain name>:<port>format and are accessible over the InternetThe external organization uses the same state database type as your BaaS organizations (the default is CouchDB)
The Hyperledger Fabric version of the external organization matches your consortium version:
BaaS consortium V1.4: Hyperledger Fabric V1.4.2 or later, and earlier than V2.0
BaaS consortium V2.2: Hyperledger Fabric V2.2.x
The management chaincode is installed in all organizations in the channel and bound with the channel, and the channel shows the Hybrid Channel identifier (see Management chaincodes)
The external organization has the interoperability tool — BaaS users can submit a ticket to the BaaS team to get this tool and send it to the external organization. To use the tool, the external organization must have access to the
configtx.yamlfile and thecrypto-configdirectory in their Hyperledger Fabric environment. If those files are inaccessible, the external organization must use its own blockchain platform's interoperability feature instead
How it works
Adding an external organization involves three phases, each with actions from different participants:
Request: The external organization generates a join request file and sends it to a BaaS organization in the channel.
Approve: All organizations in the channel — both BaaS organizations (via the console) and any existing external organizations (via the interoperability tool) — review and approve the request. More than half of all organizations must approve.
Join: After approval, the BaaS organization sends a response file to the external organization, which uses it to join the channel and install the management chaincode.
Add an external organization
Step 1: Generate and send the join request (external organization)
Run the following command with the interoperability tool to generate a request file:
./cmt.amd64 req generate req.json
Send the generated req.json file to the administrator of a BaaS organization in the target channel through offline means (for example, email or a secure file transfer).
For instructions on configuring and using the interoperability tool, see the description file bundled with the tool. If the tool is unavailable, use your blockchain platform or the Hyperledger Fabric CLI to gather the required information and generate a request file. See the join request example for the expected file content. In the screenshot example,~/cmt.amd64 req generate req.jsonindicates that the command is executed in the root directory. Ensure that the cmt tool is available in the root directory. If the cmt tool is in the current directory, you can directly run./cmt.amd64 req generate req.json. All the screenshot examples in this section are executed in the root directory.
Step 2: Upload the request and initiate approval (BaaS admin)
Log in to the Alibaba Cloud BaaS console. On the Overview page, under My Organization, click the name of your organization in the target channel.
Click the Channels tab, find the target channel, and confirm it shows the Hybrid Channel identifier
. Click Add External Organization.In the Add External Organization pane, upload the request file. Review the key information of the external organization displayed in the lower part of the pane, then click Add. An approval task is issued to all organizations in the channel. More than half of all organizations must approve before the task proceeds.
Step 3: Approve the task — BaaS organizations
On the Tasks page, find the approval task and click Handle in the Actions column. The Task Details pane opens.

Review the details of the external organization. Confirm that the Membership Service Provider (MSP) ID and other information are correct, then click Approve. To decline, click Close.
In most cases, the task for the organization that initiated the request is automatically approved.
When an organization that is not the operator that instantiated the management chaincode uses the management chaincode for the first time, it must set up a runtime environment. In this case, the Task Details pane may take longer to respond, and the initiator's task may not be automatically approved.
Step 4: Approve the task — existing external organizations
Existing external organizations in the channel cannot approve tasks through the BaaS console. Use the interoperability tool instead.
Run the following command to list pending tasks:
./cmt.amd64 list
Run the following command to approve the task. Replace
<Proposal ID>with the task ID shown in the Task Details pane of the BaaS console:./cmt.amd64 approve <Proposal ID>
If the interoperability tool is unavailable, use your blockchain platform or the Hyperledger Fabric CLI to sign the channel update and call the management chaincode to process the task.
Step 5: Submit the channel update
After more than half of all organizations approve, the task state changes to Applicable.
BaaS organizations: The task is automatically submitted. The state changes to Applied.
Existing external organizations: Contact a BaaS organization to click Submit in the Task Details pane to validate the channel update.
Step 6: Download and send the response file (BaaS organization)
On the Overview page, under My Organizations, click your organization name.
On the organization details page, click the Channels tab, then click Get Join Response.
In the pane that appears, download the response file or copy its content.

Send the file or copied content to the external organization being added.
Step 7: Join the channel and configure the tool (external organization)
Use the interoperability tool to process the response file and join the channel.
If the interoperability tool is unavailable, use your blockchain platform or the Hyperledger Fabric CLI to connect to orderer nodes and get the latest blocks in the channel.

Reconfigure the channel and orderer certificate, and specify the management chaincode for the interoperability tool.

Step 8: Install the management chaincode (external organization)
Install the management chaincode that matches your BaaS consortium version so you can manage channels alongside other organizations.
For BaaS consortium V1.4
Download cmcc.1.4.cc, then run:
./cmt.amd64 install cmcc.1.4.ccFor BaaS consortium V2.2
Download cmcc.1.5.tar.gz, then run:
./cmt.amd64 lifecycle install ./cmcc.1.5.tar.gzSubmit the chaincode definition. Get the chaincode name, version number, and serial number from a BaaS organization in the channel, then run:
./cmt.amd64 lifecycle approve cmcc.1.5.tar.gz -n <Chaincode name in BaaS> -v <Version number in BaaS> -s <Serial number in BaaS> -e <Endorsement policy in BaaS>
Step 9: Verify the setup (external organization)
After the management chaincode is installed and the channel update is complete, run the following command to confirm you can view tasks in the channel:
./cmt.amd64 list
If tasks appear, the external organization has successfully joined the channel and the management chaincode is bound correctly.


