Deploy Modules
install and start modules
The installer can install individual modules or deploy all modules on a single server for testing.
We recommend the “All In One” deployment for the first time. When familiar with the platform, design a project architecture suiting your requirement, then deploy modules on each server.
Note: Ensure that the Firewalld service is enabled and the current user has sufficient privileges before installation.
Download and unzip the Installer, then start it for the installation. Suppose the download directory is : /opt/taiyi/
$cd /opt/taiyi
$tar zcfv taiyi_release.tar.gz
$./installer
Installer v0.1.3 started
Ready to install Project-Taiyi ...
0 - Portal
1 - Node
2 - Gateway
3 - Update all modules
4 - Forcibly update all modules
5 - All in one sample1: 1 portal/ 1 node/ 1 gateway
6 - All in one sample2: 1 portal/ 3 node/ 1 gateway
7 - Uninstall all modules
8 - Exit
Input index to install:
All In One
Either All modules or multiple storage peers could work on the same server.
Although this deployment minimizes testing resources, it sacrifices much performance and availability.
Please do not use it in a production environment !!!
Installation
Choose “Sample 2” in the installer to simulate the production environment, which includes three storage peers, one gateway, and one portal.
You can press enter to accept every parameter automatically generated except the option “Current Organization” which requires an organization ID.
The installer automatically builds the default configuration based on user input, then installs all modules.
Start Modules
Assume all modules are installed in the path /opt/taiyi/; follow the below instructions to start all modules.
Start Portal
$cd /opt/taiyi/portal
$./portal start
Start Resource Peers
$cd ../node1
$./node start
$cd ../node2
$./node start
$cd ../node3
$./node start
Start Gateway
$cd ../gateway
$./gateway start
After starting all the services, you can now initialize the system.
Distributed Deployment
A distributed system means modules on different servers work together to serve the applications. The below figure is a typical networking diagram.
Node: persistent stores data and assembles a cluster committee responsible for transaction consensus. A cluster must have three or more peers to reach a consensus.
Portal: enables administrators to manage the chain cluster via web pages, with only one portal required.
Gateway: authenticates and handles application requests. Multiple gateways scale out the overall processing capacity, and they can provide similar access services to applications.
Choose the module in the installer for distributed deployment. Assume all modules are installed under the path: /opt/taiyi
You can initialize the system when all cluster modules are installed and started.
Node
The installer will generate default values for all configures except the below two sets:
- Listen IP means the listening address and will start the communication on localhost by default blank value. Use the IPv4 format of “a.b.c.d” to specify the target network card if multiple are available.
- When a storage peer connects to an external peer, a communication address is required in the “Published Address” parameter using the format “IP: Port”
When installation success, start the module.
$cd /opt/taiyi/node
$./node start
Portal
The installer will generate default values for all configures except the parameter “Current Organization”. Only characters or underscores are allowed in the organization name.
It determines all digital certificates of the chain and can not be modified. Please configure it with caution.
When installation success, start the module.
$cd /opt/taiyi/portal
$./portal start
Gateway
The installer will generate default values for all configures except the below two sets:
- Listen IP means the listening address and will start the communication on localhost by default blank value. Use the IPv4 format of “a.b.c.d” to specify the target network card if multiple are available.
- When a gateway provides service to external applications, a communication address is required in the “Published Address” parameter using the format “IP: Port”
When installation success, start the module.
$cd /opt/taiyi/gateway
$./gateway start
Appendix: Configure Parameters
Here are complete parameter list of the installer for every module
All In One
Input Parameter | Default Value | Description |
---|---|---|
Project Install Path | /opt/taiyi | The install path of the project |
Portal Install Path | /opt/taiyi/portal | The install path of portal |
Chain Name | taiyi | Chain name for creating |
Current Organization | ID of current organization | |
Portal ID | portal | portal ID |
Portal Web Port | 8090 | Web port of portal module |
Portal Service Port | 54500 | Communicate port of portal module |
Portal Web Root Path | web_root | Storage path of web pages |
Portal Enable CORS | false | Allow CORS requests to portal |
Node Install Path | /opt/taiyi/node_xx | The install path of storage peer |
Node ID | node_xx | The initial ID of storage peer |
Node Service Port | 54300~ | The communicate port of storage peer |
Gateway Install Path | /opt/taiyi/gateway | The install path of gateway |
Gateway ID | gateway_xx | The initial ID of gateway |
Gateway Service Port | 54400 | The communicate port of gateway |
Gateway API Port | 9100 | The API service port of gateway |
Gateway Enable CORS | false | Allow CORS requets to gateway |
Node
Input Parameter | Default Value | Description |
---|---|---|
Project Install Path | /opt/taiyi | The install path of the project |
Node ID | node_xx | The initial ID of storage peer |
Listen IP | Listening address of the peer, allow empty value. | |
Service Port | 54300 | The communicate port of storage peer |
Published Address | External communicate address in the format “IP: Port” |
Portal
Input Parameter | Default Value | Description |
---|---|---|
Project Install Path | /opt/taiyi | The install path of the project |
Chain Name | taiyi | Chain name for creating |
Current Organization | ID of current organization | |
Portal ID | portal | portal ID |
Web Listen Port | 8090 | Web port of portal module |
Peer Listen Port | 54500 | Communicate port of portal module |
Web Root Path | web_root | Storage path of web pages |
Enable CORS | false | Allow CORS requests to portal |
Gateway
Input Parameter | Default Value | Description |
---|---|---|
Project Install Path | /opt/taiyi | The install path of the project |
Gateway ID | gateway_xxx | The initial ID of gateway |
Listen IP | Listening address of the gateway, allow empty value. | |
Service Port | 54400 | The communicate port of gateway |
Published Address | External API address in the format “IP: Port” | |
API Port | 9100 | The API service port of gateway |
Enable CORS | false | Allow CORS requets to gateway |