Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BSN Spartan Data Center System

License

NotificationsYou must be signed in to change notification settings

BSN-Spartan/Data-Center-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This document is a guide to install, configure and run the Data Center System of the BSN Spartan Network. This local system will help users manage their data centers and manage nodes and NTT. The system only interacts with installed full nodes of Non-Cryptocurrency Public Chains on Spartan Network, and never connects to any external third-party systems.

As a clear demonstration, all commands in this document are run with root permission. These commands can also be run under normal user permissions, please set the file storage and configure the parameters properly.

1. Initialization

1.1 Hardware Requirements

It is recommended to build the Data Center Management System on Linux Server with the following requirements:

Minimum Requirements:

  • 2 CPU
  • Memory: 4GB
  • Disk: 25GB SSD
  • Bandwidth: 20Mbps

Recommended Requirements:

  • 4 CPU
  • Memory: 16GB
  • Disk: 50GB SSD
  • Bandwidth: 20Mbps

1.2 Prerequisites

SoftwareVersion
Java1.8+
MySQL5.7+
Jar (Optional)-
Docker-ce (Optional)20.10.0+
Docker-compose (Optional)1.25.5+
Spartan-I Chain Default Node-

1.3 Database Initialization

  1. Make sure you have installed MySQL 5.7 or later version in your system. You can go toMySQL official website to learn how to install MySQL on Linux.

    mysql -V

  2. Getmysql script

  3. Login to MySQL service, name and create the database:

    CREATEDATABASEbsn_spartan_dc DEFAULT CHARACTERSET utf8 COLLATE= utf8_general_ci;

  4. Execute sql script to initialize the table:

    use bsn_spartan_dc;

  5. Execute the rest commands in sequence. Then, check the table structure:

    show tables;

2. Download and Configuration

2.1 Downloading the Package

Download thepackage of the Data Center Management System. You can also download the source code on this page and compile it by yourself.

2.2 Downloading Configuration Files

Download the configuration files, includingapplication.yml,application-prod.yml andlogback-spring.xml.

2.3 Configuration

2.3.1 Editingapplication.yml

  • Change the default login account information

    If the database has never been initialized with any account before, the service will be initialized with this information when started:

    system:adminName:adminadminEmail:spartan_example@hotmail.comdefaultPassword:password

2.3.2 Editingapplication-prod.yml

  • Configure the data source

    server:# Specify the port that runs the Data Center Systemport:8085mysql:# Specify the IP address, port number and the name of your databasewrite_url:jdbc:mysql://database-IP:port/db_name?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&allowMultiQueries=true&useSSL=false# Enter the login name of the databasewrite_username:db_username# Enter the passwordwrite_password:db_password# Specify the IP address, port number and the name of your databaseread_url:jdbc:mysql://database-IP:port/db_name?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&allowMultiQueries=true&useSSL=false# Enter the login name of the databaseread_username:db_username# Enter the passwordread_password:db_password

    Example:

  • Configure the node information

    chain:# Default Node's JSON-RPC interface (--http.port) of Spartan-I ChainnodeRpcAddress:"http://node-IP:node-rpc-port"# Default Chain's network ID, do not change this configurationchainId:9090# Query the transaction pool's waiting time: millisecond, recommended 1.5 secondstxPoolSleep:1500# Change the path of the Keystore file to a designated directorywalletFilePath:"your-directory/wallet"# The system will parse events from all blocks after this block height. This number is recommended to be set as the latest block height of the Default Chain before the Data Center System started. For example: blockHeight: 270441# You can get the block height from the blockchain explorer: https://spartanone.bsn.foundationblockHeight:block_height

    Example:

  • Configure Kong gateway

    Configure the username and password of Kong gateway

    kongGateWayConfig:# Username configured in the operations and maintenance systemusername:username# Password configured in the operations and maintenance systempassword:password

3. Starting the Service

Here we start the service in two ways, you may choose one of them that fits your requirement.

3.1 Starting by Package

Make sure Java 1.8 or later version has been installed in your system.

java -version

PutData-Center-System-1.3.1.jar,application.yml,application-prod.yml andlogback-spring.xml files into the same directory and run the command below:

java -jar Data-Center-System-1.3.1.jar --spring.config.location=./application.yml --spring.config.location=./application-prod.yml --logging.config=./logback-spring.xml - LANG=zh_CN.UTF-8

Result:

After starting up the Data Center System, you may find the "the basic information of data center is not configured" error message in the process. You need to configure the information after logging into the system.

If you would like to run the node in the backend system, you can runnohup command as follow:

nohup java -jar Data-Center-System-1.3.1.jar --spring.config.location=./application.yml --spring.config.location=./application-prod.yml --logging.config=./logback-spring.xml - LANG=zh_CN.UTF-8 > output.log 2>&1 &

You can also check the process from the log:

tail -f output.log

To stop the service innohup mode, please refer to the below command:

# Check the PID of the serviceps -ef| grep java# Stop the service, change "PID" to the correct numberkill -9 PID

3.2 Starting by Docker

  • Create a new directorybsn/spartan under the root directory:
mkdir /bsn/spartan
  • Go to directorybsn/spartan:
cd /bsn/spartan
  • Create and edit filedocker-compose.yaml:
vim docker-compose.yaml
  • Copy below content to filedocker-compose.yaml:
version:'3'services:spartan-dc:container_name:spartan-dcimage:bsnspartan/jre1.8:centos7.9restart:alwaysports:      -"8085:8085"volumes:      -./pkg:/bsn/spartan/pkg      -./logs:/bsn/spartan/logs#This directory must be the same with logPath in logback-spring.xml      -./conf:/bsn/spartan/conf      -./wallet:/bsn/spartan/wallet      -/etc/hosts:/etc/hostsentrypoint:java -jar ./pkg/Data-Center-System-1.3.1.jar --server.port=8085 --spring.config.location=./conf/application.yml --spring.config.location=./conf/application-prod.yml --logging.config=./conf/logback-spring.xml --logging.logpath=./logs
  • Create a directory/bsn/spartan/conf and putapplication-prod.yml,application.yml,logback-spring.xml into it.

  • Create a directory/bsn/spartan/pkg and putData-Center-System-1.3.1.jar into it.

  • Return to the directory/bsn/spartan and start the service:

cd ..docker-compose up -d

4. Data Center Registration

After successfully starting the service, the Data Center Operator can access the system fromhttp://server_IP:server_port. Theserver_port is refering to the port inapplication-prod.yml.

Before using the System, the Data Center Operator should go to theSpartan Official Website to register a new data center.

Please refer to theBSN Spartan Network User Manual for detailed instructions.

5. Data Center Gateway Deployment

After deploying and running the Data Center Management System, Data Center Operators can deploy Kong Gateway service to manage end-user's network access. This is not a mandatory step if the Data Center Operator just wants to run the DC for his/her own system. However, for better protection of the node, we encourage all Data Center Operators to install and run the Kong Gateway. Click to see more information ofData Center Gateway Deployment.

6. Data Center Portal Deployment

Data Center Service Providers can build portals to serve their end-users. Here is a template of the deployment ofBSN Spartan Network Data Center Portal.

7. Data Center Management System Upgrade

If you have already installed the Data Center Management System with the previous version, you can upgrade it to the latest one.

Please find the upgrade instructions intags that matches the version of your Data Center Management System.

About

BSN Spartan Data Center System

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp