Installation and Uninstallation of Cluster Eco-Tools #
Install SphereEx-Boot #
- Create a new operating system user:
copy# groupadd spex
# useradd -g spex spex
# passwd spex
Create the recommended installation directory: /home/spex/boot
Dependencies:
sshpass 1.0.0+
Python 2.7 or Python 3.5+
pip 20.0.0+
- Install SphereEx-Boot
- Execute the following command to install SphereEx-Boot.
copy# pip install sphereex‑boot‑1.1.0.tar.gz
Processing ./sphereex‑boot‑1.1.0.tar.gz
Requirement already satisfied: ansible<=2.10.7,>=2.8.0 in /usr/lib/python2.7/site-packages (from sphereex-boot==1.1.0) (2.10.7)
······
Building wheel for sphereex-boot (setup.py) ... done
Created wheel for spex: filename=sphereex_boot-1.1.0-py2-none-any.whl size=212249 sha256=5de4a3b4f347da57697ad942f74284be38ecf12e5e0d1fefda06e5e4282c22eb
Stored in directory: /root/.cache/pip/wheels/e5/c4/d7/64a96c1f48ffabc68df6aa164beb7a93a1ad4d81aba4b751d7
Successfully built sphereex-boot
Installing collected packages: sphereex-boot
Successfully installed sphereex‑boot‑1.1.0
- Check the Installation Result of SphereEx-Boo
Run the command to check the version of SphereEx-Boot. If the output version is the same as the version that was just installed, then the installation was successful.
copy# spex --version
Version 1.1.0
Uninstall SphereEx-Boot #
Execute the uninstall command.
copy# pip uninstall sphereex‑boot
Install SphereEx-Console #
Deployment Instructions #
- Minimal Deployment
For a minimal deployment of Console, reuse the 5.7 version or above of the MySQL database already available in the user environment.
Host | Eco-Tools |
---|---|
Host1 | Console |
- Recommended Deployment
For a recommended deployment of Console, use a dedicated host and install the Console backend MySQL database using the built-in MySQL software in Console.
Host | Eco-Tools | Components |
---|---|---|
Host1 | Console | Console backend MySQL database (Master) |
Host2 | Console backend MySQL database (Slave) |
Installation Preparation #
- Create a new operating system user.
This step can be skipped if the user was created during the installation of Boot.
copy# groupadd spex
# useradd -g spex spex
# passwd spex
- Create the recommended installation directory:
copy/home/spex/console
- Dependencies:
- JDK 1.8
- SSH service enabled
- SphereEx-Boot
- Environment check (check dependencies):
- Check the JDK version:
copy# java -version
- Check if SSH service is enabled:
copy# ps -aux | grep sshd
- Check if SphereEx-Boot is installed:
copy# spex --version
Obtain software: Please contact us.
Use the spex command of SphereEx-Boot to export the configuration file console_install.yaml.
copy# spex console export
Minimal Installation of SphereEx-Console Initialization Configuration File #
Prerequisites for minimal installation:
MySQL 5.7 or later database is already installed.
A spex database user has been created and allowed the console host to access.
- Create the spex user:
copycreate database console
create user 'spex'@'[SpherexEx-Console IP]' identified by 'XXXXXX';
grant all on console.* to spex@'[SpherexEx-Console IP]';
- Initialize database script
In the db directory under the SphereEx-Console directory after decompression:
copy schema.sql
schema-data.sql
- Modify the configuration file according to the actual situation, default parameters can be kept if not mentioned.
copy vi console_install.yaml
###################### SphereEx-Console Deploy Configuration Example #########################
# This file is an example configuration file.
# Here you can configure for the SphereEx-Console deploy.
# Deploy to remote must use ssh
#===================== Mysql Deploy Configuration ========================
# Required, Whether to install a new Mysql server
# If true Mysql master-slave will be installed
install_mysql: false
#==================== Console Deploy Configuration =======================
console:
# install on local or remote
ssh_user: spex
ssh_password: spex
ssh_port: 22
host: xxx.xxx.xxx.xxx
# Required, SphereEx-Console file. for example:/root/console/SphereEx-Console.tar.gz
file: /home/spex/boot/console.tar.gz
# Required, deployment directory, remote or local
install_dir: /home/spex/console
# Required, deployment directory, remote or local
console_config:
server:
port: 8088
# software home path
software:
home: /home/spex/console
spring:
# If install_mysql is true, the param will be overwritten
# If you use your own Mysql, edit the configuration below
datasource:
url: jdbc:mysql://[IP]:[PORT]/console?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true # console mysql url
username: spex # console mysql user
password: sphereEx@2021 # console mysql password
driverClassName: com.mysql.jdbc.Driver # console mysql driver
Recommended to Install SphereEx-Console Initialization Configuration File #
It is recommended to refer to the deployment guide to plan the host and deploy SphereEx-Console and MySQL master-slave on two separate hosts according to the actual situation.
Refer to the following method to modify the configuration file. Keep the default values for parameters not mentioned.
copy vi console_install.yaml
###################### SphereEx-Console Deploy Configuration Example #########################
# This file is an example configuration file.
# Here you can configure for the SphereEx-Console deploy.
# Deploy to remote must use ssh
#===================== Mysql Deploy Configuration ========================
# Required, Whether to install a new Mysql server
# If true Mysql master-slave will be installed
install_mysql: true
# If install Mysql is true the param is required
mysql:
master:
# install on local or remote
file: /home/spex/console/mysql.tar.xz
host: xxx.xxx.xxx.xxx
listen_port: 3306
ssh_user: spex
ssh_password: spex
ssh_port: 22
install_dir: /home/spex/console
slave:
# install on local or remote
host: xxx.xxx.xxx.xxx
file: /home/spex/boot/mysql.tar.xz
# If two Mysql servers are on the same machine, listen port must be different
listen_port: 3307
ssh_user: root
ssh_password: root
ssh_port: 22
install_dir: /home/spex/console
#==================== Console Deploy Configuration =======================
console:
# install on local or remote
ssh_user: spex
ssh_password: spex
ssh_port: 22
host: xxx.xxx.xxx.xxx
# Required, SphereEx-Console file. for example:/root/console/SphereEx-Console.tar.gz
file: /home/spex/boot/console.tar.gz
# Required, deployment directory, remote or local
install_dir: /home/spex/console
# Required, deployment directory, remote or local
console_config:
server:
port: 8088
# software home path
software:
home: /home/spex/console
Install SphereEx-Console #
- Execute the following command to install SphereEx-Console:
copy# spex console install -n {console_name} -c console_install.yaml
- View the SphereEx-Console list:
copy# spex console list
Manual installation SphereEx-Console #
Install spexc #
spexc is an internal tool of SphereEx-Console and needs to be installed before using SphereEx-Console.
The location of the spexc installation package is in the conf/software/spexc directory after decompression by SphereEx-Console.
Installation preparation
Before installing spexc, ensure that the following software has been installed on the operating system:
copysshpass 1.0.0+
Python 2.7 Or Python 3.5+
pip 20.0.0+
- Install spexc
Execute the following command to install spexc.
copy# pip install spexc‑1.1.0.tar.gz
Processing ./spexc‑1.1.0.tar.gz
Requirement already satisfied: ansible<=2.10.7,>=2.8.0 in /usr/lib/python2.7/site-packages (from spexc==1.1.0) (2.10.7)
······
Building wheel for spexc (setup.py) ... done
Created wheel for spexc: filename=spexc-1.1.0-py2-none-any.whl size=212249 sha256=5de4a3b4f347da57697ad942f74284be38ecf12e5e0d1fefda06e5e4282c22eb
Stored in directory: /root/.cache/pip/wheels/e5/c4/d7/64a96c1f48ffabc68df6aa164beb7a93a1ad4d81aba4b751d7
Successfully built spexc
Installing collected packages: spexc
Successfully installed spexc‑1.1.0
- View spexc installation results
Execute the command to check the spexc version. If the output version is the currently installed version, the installation is successful.
copy# spexc --version
Version 1.1.0
Install SphereEx-Console #
Installation preparation
Before installing SphereEx-Console, ensure that the following software has been installed on the operating system:
- JDK 1.8 installed
- spexc installed
- Existing MySQL 5.7 and above database.
- The spex database user has been created and allowed to be accessed by the host where SphereEx-Console is located.
- Create spex User:
copycreate database console
create user 'spex'@'[SpherexEx-Console IP]' identified by 'XXXXXX';
grant all on console.* to spex@'[SpherexEx-Console IP]';
- Database initialization script
In the db directory in the decompressed directory of SphereEx-Console:
copy schema.sql schema-data.sql
- Modify configuration file
In the conf directory in the decompressed directory of SphereEx-Console, modify the starred part and be careful to remove the asterisk.
copyvi application-prod.yml
server:
*port: 8080
spring:
datasource:
*url: jdbc:mysql://127.0.0.1:3306/console?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true
*username: spex
*password: spex
driverClassName: com.mysql.jdbc.Driver
jwt:
header: token
secret: your_secret
expiration: 30000000000
sphereex:
proxy:
datasource:
hikari:
maximum-pool-size: 4
connection-timeout: 3000
minimum-idle: 2
idle-timeout: 500000
max-lifetime: 540000
- Start SphereEx-Console Under the bin directory in the decompressed directory of SphereEx-Console
copy./start.sh
- Login to SphereEx-Console
Use the server’s IP address and port to access the SphereEx-Console platform through a browser, and log in using the account and password in the configuration file.
Example: 192.168.10.18:8080
Built-in super administrator username/password: admin/admin
Uninstall SphereEx-Console #
copy# spex console uninstall -n {console_name}
Using SphereEx-Boot #
- Starting and stopping SphereEx-Boot
No need to start or stop. Use the spex command directly after installation is completed.
Using SphereEx-Console #
- Starting SphereEx-Console
Log in to the host where the console is located, enter the installation directory of Console, and execute the startup command.
copybin/start.sh
Access the SphereEx-Console platform through a browser using the server’s IP address and port, and log in using the account and password in the configuration file.
For example: 192.168.10.18:8080
The username/password for the built-in super administrator is: admin/admin.
- Stopping SphereEx-Console
Log in to the host where SphereEx-Console is located, enter the installation directory of SphereEx-Console, and execute the stop command.
copybin/stop.sh
Backing up SphereEx-Console
Log in to the host where SphereEx-Boot is located and specify the name of SphereEx-Console to uninstall.
copy# spex console backup -n {name}