Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added CN/modules/ROOT/images/media/image10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image31.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image33.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CN/modules/ROOT/images/media/image34.png
Binary file added CN/modules/ROOT/images/media/image35.png
Binary file added CN/modules/ROOT/images/media/image36.jpeg
Binary file added CN/modules/ROOT/images/media/image37.png
Binary file added CN/modules/ROOT/images/media/image38.jpeg
Binary file added CN/modules/ROOT/images/media/image39.png
Binary file added CN/modules/ROOT/images/media/image4.png
Binary file added CN/modules/ROOT/images/media/image40.png
Binary file added CN/modules/ROOT/images/media/image41.png
Binary file added CN/modules/ROOT/images/media/image42.png
Binary file added CN/modules/ROOT/images/media/image43.png
Binary file added CN/modules/ROOT/images/media/image44.png
Binary file added CN/modules/ROOT/images/media/image45.jpeg
Binary file added CN/modules/ROOT/images/media/image46.png
Binary file added CN/modules/ROOT/images/media/image47.png
Binary file added CN/modules/ROOT/images/media/image5.png
Binary file added CN/modules/ROOT/images/media/image6.png
Binary file added CN/modules/ROOT/images/media/image7.png
Binary file added CN/modules/ROOT/images/media/image8.png
Binary file added CN/modules/ROOT/images/media/image9.png
2 changes: 2 additions & 0 deletions CN/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*** xref:master/4.3.adoc[开发者指南]
*** xref:master/4.4.adoc[运维管理指南]
*** xref:master/4.5.adoc[迁移指南]
*** xref:master/4.7.1.adoc[IvorySQL安装手册]
*** xref:master/4.7.2.adoc[IvorySQL使用手册]
** IvorySQL生态
*** xref:master/cpu_arch_adp.adoc[芯片架构适配]
*** xref:master/os_arch_adp.adoc[操作系统适配]
Expand Down
385 changes: 385 additions & 0 deletions CN/modules/ROOT/pages/master/4.7.1.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,385 @@


:sectnums:
:sectnumlevels: 5
:imagesdir: ./_images

= 安装说明

IvorySQL Cloud平台是一个综合性的解决方案,它集成了IvorySQL数据库以及周边生态,以提供全面的数据库和资源管理功能。安装前需要上github编译安装好

前端:https://github.com/IvorySQL/ivory-cloud-web

后端:https://github.com/IvorySQL/ivory-cloud

搭建好K8S集群,并在集群master节点上安装ivory-operator

https://github.com/IvorySQL/ivory-operator/tree/IVYO_REL_5_STABLE

== IvorySQL Cloud平台安装

IvorySQL Cloud平台,目前支持Linux系统下的安装,以下为各部分对应的安装包:

[width="99%",cols="<28%,<72%",options="header"]
|===
|组件|安装包
|前端|dist
|后端|cloudnative-1.0-SNAPSHOT.jar
|K8S集群 a|
[arabic]
. docker.io/ivorysql/ivory-operator:v5.0
. docker.io/ivorysql/pgadmin:ubi8-9.9-5.0-1
. docker.io/ivorysql/pgbackrest:ubi8-2.56.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
|===

另外,云服务平台还需要用户安装以下组件:

* *后端数据库*:负责存储和管理所有与云资源、用户信息、权限控制、计费信息等相关的数据。需要使用PG系列数据库,如PostgreSQL、瀚高数据库、IvorySQL等。
* *NGINX*:支持云服务平台的web服务。

== 安装前准备

安装前,所有服务器都必须完成以下准备工作。并且将IvorySQL Cloud平台部署在K8S(1.23)的服务器上,且该K8S集群需要有默认的storage class.

=== 关闭防火墙

所有服务器关闭防火墙,以保证他们之间的网络互通。

[literal]
----
systemctl stop firewalld.service

systemctl disable firewalld.service
----

=== 后端部署

==== 后端数据库

IvorySQL Cloud平台的后端数据库需用户自行安装,请参考IvorySQL官网。

==== 后端服务程序

===== 编译后端服务程序

[literal]
----
# 克隆代码

git clone https://github.com/IvorySQL/ivory-cloud.git

# 进入到项目根目录

cd ivory-cloud
----

请确保ivory-cloud\cloudnative\src\main\resources\monitor文件夹,及其所有的子文件夹下的以.sh结尾的文件是unix格式的,如果不是,请执行dos2unix命令转换成unix格式。

[literal]
----
dos2unix cloudnative\src\main\resources\monitor\*

# 编译

mvn clean

mvn package -D maven.test.skip=true

打包完成后,可以在 ivory-cloud/cloudnative/target下找到cloudnative-1.0-SNAPSHOT.jar文件
----

===== 部署程序

[literal]
----
在K8S服务器上执行如下操作:

# 创建目录

mkdir -p /home/ivory

# 将上一步编译好的文件ivory-cloud/cloudnative/target/cloudnative-1.0-SNAPSHOT.jar上传至上述目录

# 配置文件

## 创建配置目录

mkdir -p /home/ivory/config

## 上传配置文件

将源代码ivory-cloud/cloudnative/src/main/resources目录里的如下三个配置文件上传至 /home/ivory/config

application.yaml

application-native.yaml

spring_pro_logback.xml

## 修改配置文件,请将url、username、password修改为<<backend-db,后端数据库章节>>安装的数据库的信息。

## /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"
----

==== 启动后端服务程序

[literal]
----
# 安装jdk1.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 10月09 ? 00:03:07 java -jar cloudnative-1.0-SNAPSHOT.jar
----

=== 前端部署

==== 编译前端服务程序

[literal]
----
## 获取代码

git clone https://github.com/IvorySQL/ivory-cloud-web.git

## 进入项目根目录

cd ivorysql-cloud-web

## 安装依赖

npm install

## 编译打包

npm run build:prod
----

==== 修改目录和文件权限

[literal]
----
# 创建目录

[root@cloud opt]# mkdir -p /opt/cloud/web

# 将前端构建后的dist文件夹置于/opt/cloud/web

# 授权

[root@cloud web]# chmod 755 /opt/cloud/web/dist

[root@cloud web]# chmod -R 777 /opt/cloud/web/dist
----

==== 修改config.js

修改文件

[literal]
----
[root@cloud dist]# pwd

/home/cloud/web/dist

[root@cloud dist]# vi config.js

var PLATFROM_CONFIG = {};

// ip请更换为当前服务器地址

PLATFROM_CONFIG.baseUrl = "http://192.168.31.43:8081/cloudapi/api/v1"

//true: need to show "注册" on login page

//false: don't show "注册" on login page

globalShowRegister = true

//是否隐藏云原生数据库, true: 隐藏云原生数据库;false:显示云原生数据库

disableNative = false

// 数据库类型

dbtype = "IvorySQL"

dbversion = "5.0"
----

=== 安装部署nginx

IvorySQL Cloud平台服务器需要安装nginx,以支持云服务平台的web服务。nginx需要用户自行安装,这里提供一种安装方法作为参考。

==== 下载nginx安装包

[literal]
----
[root@cloud web]# wget https://nginx.org/download/nginx-1.20.1.tar.gz

[root@cloud web]# ls -lrt

总用量 3924

-rwxrwxr-x. 1 root root 1061461 5月 25 2021 nginx-1.20.1.tar.gz

-rwxrwxr-x. 1 root root 2943732 10月 9 16:43 dist.tar.gz

drwxrwxrwx. 4 root root 103 10月 21 13:20 dist
----

==== 安装相关依赖

[literal]
----
[root@host30 cloud]# yum -y install pcre-devel

[root@host30 cloud]# yum -y install openssl openssl-devel
----

==== 编译安装nginx

nginx会被安装在configure时由--prefix指定的目录下,例如这里的/opt/cloud/nginx:

[literal]
----
## 解压缩nginx-1.20.1.tar.gz安装包

[root@cloud web]# tar -zxvf nginx-1.20.1.tar.gz

## 解压后生成nginx-1.20.1文件夹

[root@cloud web]# ls -lrt

总用量 3924

-rwxrwxr-x. 1 root root 1061461 5月 25 2021 nginx-1.20.1.tar.gz

-rwxrwxr-x. 1 root root 2943732 10月 9 16:43 dist.tar.gz

drwxrwxr-x. 9 1001 1001 186 10月 9 16:53 nginx-1.20.1

drwxrwxrwx. 4 root root 103 10月 21 13:20 dist

## 配置导向

[root@cloud web]# cd nginx-1.20.1

[root@cloud nginx-1.20.1]# ./configure --prefix=/opt/cloud/nginx --with-http_ssl_module

## 编译安装

[root@cloud nginx-1.20.1]# make

[root@cloud nginx-1.20.1]# make install
----

==== 修改配置文件nginx.conf

配置文件在/opt/cloud/nginx路径下,可以按照github上readme对nginx.conf进行对比修改。ip请配置为当前服务器的ip。

[literal]
----
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;

}

}
----

==== 启动nginx

[literal]
----
[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 10月21 ? 00:00:00 nginx: master process ./nginx -c /opt/cloud/nginx/conf/nginx.conf

nobody 55048 55047 0 10月21 ? 00:00:00 nginx: worker process
----

=== operator部署

请自行搭建K8S,此处描述为在K8S集群上安装ivory-operator和load镜像。

==== 安装ivory-operator

参见

https://github.com/IvorySQL/ivory-operator/tree/IVYO_REL_4_STABLE[https://github.com/IvorySQL/ivory-operator/tree/IVYO_REL_5_STABLE]

网站上的readme

==== load镜像

如果服务器可以直接访问到docker hub,可以跳过该章节。否则需要在所有的K8S集群节点提前load 如下docker镜像

[literal]
----
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
----

Loading