The IvorySQL Cloud platform is a comprehensive solution that integrates the IvorySQL database and its surrounding ecosystem to deliver end-to-end database and resource management capabilities. Before starting the installation, compile and install the following projects from GitHub:
Prepare a Kubernetes cluster (version 1.23) and install ivory-operator on the master node:
The IvorySQL Cloud platform currently supports installation on Linux systems. The required packages are listed below.
| Component | Package |
|---|---|
Frontend |
dist |
Backend |
cloudnative-1.0-SNAPSHOT.jar |
K8S cluster |
|
In addition, install the following supporting components:
-
Backend database: Stores and manages all data related to cloud resources, user information, access control, billing, and more. Use a PostgreSQL-compatible database such as PostgreSQL, HighGo DB, or IvorySQL.
-
NGINX: Hosts the web user interface of the cloud platform.
Complete the preparation steps on every server before installation. Deploy IvorySQL Cloud on a Kubernetes (1.23) cluster that already has a default storage class.
Disable the firewall on every server to ensure full connectivity.
systemctl stop firewalld.service
systemctl disable firewalld.serviceInstall the backend database yourself by following the instructions on the IvorySQL official website.
# Clone the code
git clone https://github.com/IvorySQL/ivory-cloud.git
# Go to the project root
cd ivory-cloudEnsure that every .sh file in ivory-cloud\cloudnative\src\main\resources\monitor and its subdirectories uses the Unix format. If not, run dos2unix to convert them.
dos2unix cloudnative\src\main\resources\monitor\*
# Build
mvn clean
mvn package -D maven.test.skip=true
The packaged artifact `cloudnative-1.0-SNAPSHOT.jar` can be found under `ivory-cloud/cloudnative/target`.Execute the following steps on the Kubernetes server:
# Create a working directory
mkdir -p /home/ivory
# Upload `ivory-cloud/cloudnative/target/cloudnative-1.0-SNAPSHOT.jar` to the directory created above
# Configuration files
## Create a configuration directory
mkdir -p /home/ivory/config
## Upload configuration files
Copy the following files from `ivory-cloud/cloudnative/src/main/resources` to `/home/ivory/config`:
application.yaml
application-native.yaml
spring_pro_logback.xml
## Update the configuration
Replace `url`, `username`, and `password` with the database information configured in <<Backend database>>.
## /home/ivory/config/application-native.yaml
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://127.0.0.1:5432/ivorysql
username: ivorysql
password: "ivory@123"# Install JDK 1.8
yum install -y java-1.8.0-openjdk.x86_64
[root@cloud ivory]# pwd
/home/ivory/
[root@cloud ivory]# nohup java -jar cloudnative-1.0-SNAPSHOT.jar > log_native 2>&1 &
[root@cloud ivory]# ps -ef | grep java
root 77494 1 0 Oct09 ? 00:03:07 java -jar cloudnative-1.0-SNAPSHOT.jar## Fetch the code
git clone https://github.com/IvorySQL/ivory-cloud-web.git
## Go to the project root
cd ivorysql-cloud-web
## Install dependencies
npm install
## Build for production
npm run build:prod# Create a deployment directory
[root@cloud opt]# mkdir -p /opt/cloud/web
# Copy the generated `dist` folder to /opt/cloud/web
# Grant permissions
[root@cloud web]# chmod 755 /opt/cloud/web/dist
[root@cloud web]# chmod -R 777 /opt/cloud/web/distEdit the configuration file:
[root@cloud dist]# pwd
/home/cloud/web/dist
[root@cloud dist]# vi config.js
var PLATFROM_CONFIG = {};
// Replace with the IP address of the current server
PLATFROM_CONFIG.baseUrl = "http://192.168.31.43:8081/cloudapi/api/v1"
// true: show the “Register” button on the login page
// false: hide the “Register” button on the login page
globalShowRegister = true
// Hide the cloud-native database? true: hide; false: show
disableNative = false
// Database type
dbtype = "IvorySQL"
dbversion = "5.0"The IvorySQL Cloud host must have NGINX installed to serve the web interface. Users can select any installation method; the following steps are provided for reference.
[root@cloud web]# wget https://nginx.org/download/nginx-1.20.1.tar.gz
[root@cloud web]# ls -lrt
total 3924
-rwxrwxr-x. 1 root root 1061461 May 25 2021 nginx-1.20.1.tar.gz
-rwxrwxr-x. 1 root root 2943732 Oct 9 16:43 dist.tar.gz
drwxrwxrwx. 4 root root 103 Oct 21 13:20 dist[root@host30 cloud]# yum -y install pcre-devel
[root@host30 cloud]# yum -y install openssl openssl-develNGINX is installed under the directory specified by --prefix during configure. The example below installs it to /opt/cloud/nginx.
## Extract nginx-1.20.1.tar.gz
[root@cloud web]# tar -zxvf nginx-1.20.1.tar.gz
## Verify that nginx-1.20.1 was created
[root@cloud web]# ls -lrt
total 3924
-rwxrwxr-x. 1 root root 1061461 May 25 2021 nginx-1.20.1.tar.gz
-rwxrwxr-x. 1 root root 2943732 Oct 9 16:43 dist.tar.gz
drwxrwxr-x. 9 1001 1001 186 Oct 9 16:53 nginx-1.20.1
drwxrwxrwx. 4 root root 103 Oct 21 13:20 dist
## Configure
[root@cloud web]# cd nginx-1.20.1
[root@cloud nginx-1.20.1]# ./configure --prefix=/opt/cloud/nginx --with-http_ssl_module
## Compile and install
[root@cloud nginx-1.20.1]# make
[root@cloud nginx-1.20.1]# make installThe configuration file is stored under /opt/cloud/nginx. Adjust it according to the README on GitHub, and replace the IP with the address of the current server.
server {
listen 9104;
server_name 192.168.31.43;
location / {
root /opt/cloud/web/dist;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}[root@cloud sbin]# pwd
/opt/cloud/nginx/sbin
[root@cloud sbin]# ./nginx -c /opt/cloud/nginx/conf/nginx.conf
[root@cloud sbin]# ps -ef | grep nginx
root 2179 131037 0 09:46 pts/1 00:00:00 grep --color=auto nginx
root 55047 1 0 Oct21 ? 00:00:00 nginx: master process ./nginx -c /opt/cloud/nginx/conf/nginx.conf
nobody 55048 55047 0 Oct21 ? 00:00:00 nginx: worker processSet up the Kubernetes cluster yourself. This section describes how to install ivory-operator on the cluster and preload container images.
Refer to the README on GitHub:
If your servers have direct access to Docker Hub, you can skip this step. Otherwise, preload the following images on every node in the Kubernetes cluster.
docker.io/ivorysql/pgadmin:ubi8-9.9-5.0-1
docker.io/ivorysql/pgbackrest:ubi8-2.56.0-5.0-1
docker.io/ivorysql/pgbouncer:ubi8-1.23.0-5.0-1
docker.io/ivorysql/postgres-exporter:ubi8-0.17.0-5.0-1
docker.io/ivorysql/ivorysql:ubi8-5.0-5.0-1
docker.io/prom/prometheus:v2.33.5
docker.io/prom/alertmanager:v0.22.2
docker.io/grafana/grafana:8.5.10