Alibaba Cloud BaaS allows you to add a new node from another environment into an existing Quorum netowrk.
You can create a Quorum node on another cloud platform or in your local enviroment, and join an existing Quorum netowrk of Alibaba Cloud BaaS by following below steps:
Find the network in My Ethereums that you want to add external node into, then click the AddNode. If you don’t have any netowrk, see Create a blockchain network to create one or see Invite a user of Alibaba Cloud to join to join an existing netowrk.
Input your node information in sliding panel and make sure that External Node is checked, then click Create. You will see external node in table My Nodes after creation finishes.
Click the node ID that you created just now in table My Nodes, you will see the node Configuration tab on the page.
Now you can create Quorum node on another cloud platform based on information from Configuration tab. You can also create Quorum node by yourself, see Setup a simple node for test enviroment for more information.
After you finish creating a new external Quorum node, you MUST collect the following information for joining an existing Quorum network of Alibaba Cloud BaaS:
- IP: public IP address of Quorum node and it’s tx-manager
- TMPort: tx-manager serve port
- P2pPort: Quorum node p2p serve port
- TMPub: tx-manager’s public key
- NodePub: Quorum node’s public key
- WSPort: optional，Quorum node’s websocket serve port
- RpcPort: optional， Quorum node’s RPC serve port
Once you have the above information, Click Edit button in node Configuration tab and fill in the edit boxes, then click Submit.
If you want to make the node a consensus node, you need to contact the owners of the other consensus nodes to manually add the your node to all existing consensus nodes by calling the rpc interface of the consensus nodes.
- When the nodes in the network changed, the external node config in the node Configuration tab will be updated automatically, but please ensure the updated configuration is manually synchronized to the external node, since the external node is not owned or managed by Alibaba Cloud BaaS.
Below is a sample demonstrating how to quickly create an external Quorum node for test purpose in your Linux (e.g. Ubuntu) environment and join the Quorum network of Alibaba Cloud BaaS. However, this sample is not recommended for production environment.
Execute the following command，install docker and docker-compose
sudo apt update && sudo apt install docker.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod 755 /usr/local/bin/docker-compose
Install and initialize Quorum node
Download and execute install script
wget https://baas-sdk.oss-cn-hangzhou.aliyuncs.com/bootstrap-1.0.0.sh -O bootstrap.sh && chmod 755 bootstrap.sh && ./bootstrap.sh
According to the output prompt, write the config provided by the node Configuration tag to the corresponding file.
You can also use the following command to manage your Quorum node.
- View node information：
- Update node config：
- Start node：
- Stop node：
- View node information：