Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.
- What's New
- Function Overview
- Service Overview
- Billing
- Getting Started
-
User Guide
- Enhanced Hyperledger Fabric BCS Management
- Best Practices
-
Developer Guide
- Overview
- Chaincode Development
- Application Development
- Demos
-
Blockchain Middleware APIs
- Overview
- Chaincode Invoking (OBT)
-
Chaincode Management
- Obtaining a Token
- Installing a Chaincode
- Instantiating a Chaincode
- Listing Installed Chaincodes
- Querying Version of a Specified Chaincode
- Querying Chaincode Installation Information
- Querying Chaincode Instantiation Information
- Querying an Appchain
- Listing Blocks
- Listing Transactions
- Querying Transaction Quantity
- Listing Block Transactions
- Querying Transaction Details
- Querying Peers
- Querying diskUsage of a Node
- Querying the System-Hosted Certificate Status
- Deleting a Chaincode
- Downloading a Report
- Distributed Identity (OBT)
- Trusted Data Exchange (OBT)
- Appendix
-
API Reference
- Before You Start
- API Overview
- Examples
- Calling APIs
-
APIs (Enhanced Hyperledger Fabric)
-
BCS Management
- Creating a BCS Service
- Querying Creation Status of a BCS Service
- Querying a BCS Service
- Modifying a BCS Service
- Creating Channels
- Querying Channel Information
- Adding Peers to a Channel
- Removing Organizations from a Channel
- Downloading Certificates
- Downloading the SDK Configuration
- Generating a User Certificate
- Unfreezing a User Certificate
- Freezing a User Certificate
- Querying Quotas
- Querying Flavors
- Querying Peer Information
- Querying Asynchronous Operation Results
- Querying the BCS Service List
- Deleting a BCS Service
- Removing a Peer from a Channel
- Deleting a Channel
- BCS Consortium
- BCS Monitoring
-
BCS Management
- Permissions Policies and Supported Actions
- Appendix
- Change History
- SDK Reference
-
FAQs
-
Enhanced Hyperledger Fabric
- Billing
-
Instance Management
-
Consultation
- How Do I Determine Whether a Blockchain Is Necessary?
- What Underlying Framework Is Used for Huawei Cloud BCS?
- Can BCS Instances Deployed on the Public Cloud Access Blockchain Nodes on Other Clouds?
- What Competitive Advantages Does Huawei Cloud BCS Have?
- In Which Direction and What Capabilities Will Huawei Cloud BCS Develop?
- What Are the Specifications of VMs to Be Purchased for BCS?
- How Do I Get Access to the Partners of Huawei Cloud BCS for More Services?
- What Are the Differences Between Channel Isolation and Privacy Protection?
- How Well Does BCS Perform?
- Does BCS Support Customized Development?
- When Do I Need to Hibernate or Wake an Instance?
-
Service Usage
- Which Ports of a Security Group Are Opened When I Create a BCS Instance?
- How Do I Check Whether the ICAgent Is Installed for the Cluster?
- What Can I Do If I Can't Open the Blockchain Management Console?
- What Should I Do If My BCS Instance Remains in the Creating State?
- What Should I Do If a Peer Restarts Frequently with the Error Message "PanicDB not exist"?
- What Can I Do If the CPU Usage of a Blockchain Node Reaches 100%?
- Why Can't I Log In to the Blockchain Management Console?
- BCS.4009100: System Error
- How Can I Obtain Private Keys and Certificates for Enhanced Hyperledger Fabric Blockchains?
- Why Does Chaincode Instantiation Fail When I Deploy a Fabric v1.4 Instance Using a v1.19 CCE Cluster?
- Can All Blocks Be Saved As More and More Blocks Are Created?
-
What Can I Do If I Fail to Purchase a BCS Instance?
- General Checks
-
Detailed Checks
- CCE Cluster Quota Used Up
- Failed to Create a Cluster
- Failed to Create a PVC
- Cluster Already In Use
- SFS Turbo File System Quota Exceeded
- No EIP Bound
- CCE Is Abnormal
- Cluster Status Is Abnormal
- Subnet Unavailable
- Quick Deployment in Progress
- CCE Status Check Times Out
- Insufficient Master Nodes in the AZ of the CCE Cluster
-
Abnormal Instance Statuses
- What Can I Do If a BCS Instance Is in the Abnormal State?
- What Can I Do If a BCS Instance Is in the Unknown State?
- What Can I Do If a BCS Instance Is in the EIP abnormal State?
- What Can I Do If a BCS Instance Is in the Frozen or Cluster frozen State?
- What Can I Do If the BCS Instance and the peer-xxx StatefulSet Are Abnormal After an Organization or a Peer Is Added?
- Other Issues
-
Consultation
- Chaincode Management
- Data Storage to the Blockchain
- Demos and APIs
- O&M and Monitoring
- Consortium Management
-
Enhanced Hyperledger Fabric
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Managing Enhanced Hyperledger Fabric Instances
-
FAQs
-
BCS FAQs
-
Instance Management
-
Consultation
- How Do I Determine Whether a Blockchain Is Necessary?
- What Underlying Framework Is Used for BCS?
- What Competitive Advantages Does BCS Have?
- What Are the Specifications of VMs to Be Created for BCS?
- What Are the Differences Between Channel Isolation and Privacy Protection?
- How Well Does BCS Perform?
- When Do I Need to Hibernate or Wake an Instance?
-
Service Usage
- How Do I Check Whether the ICAgent Is Installed for the Cluster?
- What Can I Do If I Can't Open the Blockchain Management Console?
- What Should I Do If My BCS Instance Remains in the Creating State?
- What Should I Do If a Peer Restarts Frequently with the Error Message "PanicDB not exist"?
- What Can I Do If the CPU Usage of a Blockchain Node Reaches 100%?
- Why Can't I Log In to the Blockchain Management Console?
- BCS.4009100: System Error
- How Can I Obtain Private Keys and Certificates for Enhanced Hyperledger Fabric Blockchains?
- Can All Blocks Be Saved As More and More Blocks Are Created?
- Abnormal Instance Statuses
- Other Issues
-
Consultation
- Chaincode Management
- Data Storage to the Blockchain
- Demos and APIs
- O&M and Monitoring
- Consortium Management
-
Instance Management
-
BCS FAQs
- Change History
- Developer Guide (ME-Abu Dhabi Region)
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Deploying the Application
This section describes how to deploy the application.
Deploying the Application
- To obtain the image, go to the BCS console and choose Use Cases. Download Bank_Image in the SDK Demo for a Bank Consortium Blockchain area.
- Ensure that the docker and unzip commands exist before logging in to ECS.
Run the cd /root/bankuniondemo command to upload the downloaded image to the directory.
Run the vi startserver.sh command to create the startserver.sh file. Add the following content to the startserver.sh file and save the file:
#!/bin/sh # Obtain the current path. path=`pwd` # Obtain the IP address. localip=`ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'` # Check whether unzip and docker commands exist. if type unzip > /dev/null 2>&1; then echo "Unzip command is exists!" else echo "No unzip command, please install unzip before start this demo" exit 1 fi if type docker > /dev/null 2>&1; then echo "Docker exists!" else echo "No docker, please install docker before start this demo" exit 1 fi # Check whether the certificate directory exists. if [ -e ./crypto ];then rm -rf crypto fi # Decompress the certificate file. echo "Start unziping certificate ...." cerzip=$(ls|grep .zip) for i in $cerzip; do unzip -n $i -d crypto/ done echo "Unzip certificate Done!!" # Configure the certificate path. Folder="$path/crypto" for file in ${Folder}/* do temp_file=`basename $file` mv -f $path/crypto/$temp_file/* $path/crypto/ done # Check whether the required certificate files are ready. echo "Start checking if the required files are ready" if [ -e $path/democraticBank.yaml ]&&[ -e $path/civilizationBank.yaml ]&&[ -e $path/harmoniousBank.yaml ];then echo "Check required yaml files OK!!" else echo "Please check if the required yaml files are ready!!" exit fi # Restart the system if the password is forgotten. read -p "Is this the first time you deploy the application? If yes please insert 'y', if you want to reset your password please insert 'n': " choice echo $choice if [ $choice = "n" ];then docker rm $(docker stop $(docker ps -a -q --filter ancestor=bank --format="{{.ID}}")) echo "Resetting password..." fi # Set the password. read -p "Please set your password: " test echo $test if [ ${#test} -lt 4 -o ${#test} -gt 24 ];then echo "password length should in [4, 24].";exit;fi #load images if [ -e $path/bankv3.tar.gz ];then echo "Start loading images..." docker load -i bankv3.tar.gz echo "Api-server images is exists,Skip load!" fi # Start the service. echo "Start server ....." docker run --env TESTPWD=$test -p 8080:8080 -d -it -v $path/crypto:/opt/bank/src/bank/conf/crypto -v $path/democraticBank.yaml:/opt/bank/src/bank/conf/democraticBank.yaml -v $path/harmoniousBank.yaml:/opt/bank/src/bank/conf/harmoniousBank.yaml -v $path/civilizationBank.yaml:/opt/bank/src/bank/conf/civilizationBank.yaml bank RET_CODE=`echo $?` if [ $RET_CODE -eq 0 ]; then echo "Start server success!" echo -e "please login \033[32mhttp://EIP:8080/adminLogin \033[0mto visit Bank Management System" echo -e "or login \033[32mhttp://EIP:8080/userLogin \033[0mto visit Bank Customer System" else echo "Failed to start server! Please check if everything ok" fi
Run the following script:
bash startserver.sh
- After you see "Is this the first time you deploy the application?", enter y for yes, or enter n if you want to change the password. Then, insert your password (123456 is used as an example in the following figure).
The command output is similar to the following:
Figure 1 Command output - Run the following command to check whether the container has started:
docker ps
If the following information is displayed, the container has started. Otherwise, check the configuration.
Figure 2 Message displayed
Adding a Security Group
- If you deploy the bankuniondemo application on your own server, skip this procedure.
- If you deploy the bankuniondemo application on an ECS on Huawei Cloud, create a security group and then add security group rules to enable access to port 8080 of the server. For details, see Creating a Security Group. Table 1 describes the security group rule.
Table 1 Parameters of a security group rule Parameter
Setting
Description
Protocol
Select TCP.
Specifies the network protocol.
Direction
Set the inbound rules.
Specifies the direction in which the security group rule takes effect. Inbound rules control external access to the ECS.
Port number range
Create a rule, and set the port to 8080.
Specifies the port range for which a rule takes effect.
Source
Select IP Address, and enter 0.0.0.0/0.
This parameter is required for inbound rules.
- The EIP must be the IP address of the server where the bankuniondemo application is deployed or the EIP of the ECS.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot