diff --git a/README.md b/README.md
index ed76d91..3da8dc5 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,13 @@
# Installation
-## Installation instructions
+## Prerequisites
+
+- JDK 1.8
+- [Maven](http://maven.apache.org/) 3.0 and above
+- IvorySQL 5.0
+- Kubernetes 1.23 (Must have default storage class)
-As an open-source backend project, ivory-cloud requires the local installation of `git`, `jdk`, `maven`, etc., during the development process.
+## Installation instructions
Fork the backend repository of the open-source cloud platform to your own GitHub account, then clone it to your local machine, for example:
@@ -21,30 +26,46 @@ cd ivory-cloud
## Deployment
### Compile and build
+1. Please ensure that all files ending with .sh in the ivory-cloud\cloudnative\src\main\resources\monitor folder and all its subfolders are in UNIX format. If they are not, please run the dos2unix command to convert them to UNIX format.
-Maven:Maven configuration is required,After configuration, execute the following command:
+2. Maven:Maven configuration is required,After configuration, execute the following command:
```
mvn clean
-mvn install
+mvn package -D maven.test.skip=true
```
-After the packaging is completed, you can find the `pkg` directory in the root directory of the project. It contains the jar package to be deployed.
+After the packaging is completed, you can find the cloudnative-1.0-SNAPSHOT.jar file at the path ivory-cloud/cloudnative/target.
### Deploy backend projects
-Install a database such as ivorysql on your server and start it.
-Place the above jar package in your server, then edit [configuration file](./cloudnative/src/main/resources/application-native.yaml)
-Among them, 5432 is the port on which the ivorysql database runs; please modify it according to the actual situation.
+1. Install a database such as ivorysql on your server and start it.
+2. create a directory to store the application files. For example:
+```
+ mkdir -p /home/ivory
+```
+4. upload JAR file (cloudnative-1.0-SNAPSHOT.jar) to your server.
+5. create a directory(name must be: config) under /home/ivory to store the application files. For example:
+```
+ mkdir -p /home/ivory/config
+```
+6. Please upload below files from the source code path ivory-cloud/cloudnative/src/main/resources to the /home/ivory/config path on your server.
+```
+ application.yaml
+ application-native.yaml
+ spring_pro_logback.xml
+```
+8. then edit /home/ivory/config/application-native.yaml
+Please modify url, username, password parts according to your actual situation.
```
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: org.postgresql.Driver
- url: jdbc:postgresql://127.0.0.1:5432/ivory
+ url: jdbc:postgresql://127.0.0.1:5432/ivorysql
username: ivorysql
password: "ivory@123"
```
-In the directory where the jar package is located, execute:
+7. Launch ivory-cloud app
+ cd /home/ivory/
```
-nohup java -jar cloudservice-1.0-SNAPSHOT.jar > log_native 2>&1 &
+nohup java -jar cloudnative-1.0-SNAPSHOT.jar > log_native 2>&1 &
```
-cloudservice-1.0-SNAPSHOT.jar is the name of the jar package; please replace it according to the actual situation.
diff --git a/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/AlertAutoScalingServiceImpl.java b/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/AlertAutoScalingServiceImpl.java
index 79e8830..d71409b 100644
--- a/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/AlertAutoScalingServiceImpl.java
+++ b/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/AlertAutoScalingServiceImpl.java
@@ -57,6 +57,7 @@
import com.highgo.platform.exception.AutoScalingException;
import com.highgo.platform.utils.AsyncTask;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Lazy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.PageRequest;
@@ -99,6 +100,7 @@ public class AlertAutoScalingServiceImpl implements AlertAutoScalingService {
private K8sClusterService k8sClusterService;
@Resource(name = "asyncTask")
+ @Lazy
private AsyncTask asyncTask;
@Value("${common.serviceName}")
diff --git a/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/MonitorServiceImpl.java b/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/MonitorServiceImpl.java
index 6560ff3..468bbd3 100644
--- a/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/MonitorServiceImpl.java
+++ b/cloudnative/src/main/java/com/highgo/platform/apiserver/service/impl/MonitorServiceImpl.java
@@ -33,6 +33,7 @@
import com.highgo.platform.errorcode.ClusterError;
import com.highgo.platform.exception.ClusterException;
import com.highgo.platform.utils.AsyncTask;
+import org.springframework.context.annotation.Lazy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -63,6 +64,7 @@ public class MonitorServiceImpl implements MonitorService {
private K8sClusterInfoRepository k8sClusterInfoRepository;
@Resource(name = "asyncTask")
+ @Lazy
private AsyncTask asyncTask;
@Value("${common.serviceName}")
diff --git a/cloudnative/src/main/resources/application-native.yaml b/cloudnative/src/main/resources/application-native.yaml
index 7a7bf0d..a67e402 100644
--- a/cloudnative/src/main/resources/application-native.yaml
+++ b/cloudnative/src/main/resources/application-native.yaml
@@ -9,9 +9,9 @@ spring:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: org.postgresql.Driver
- url: jdbc:postgresql://127.0.0.1:5432/ivory
- username: postgres
- password: "highgo@123"
+ url: jdbc:postgresql://127.0.0.1:5432/ivorysql
+ username: ivorysql
+ password: "ivory@123"
jpa:
show-sql: false
open-in-view: false
@@ -32,39 +32,25 @@ common:
alert-path-prefix: alert
serviceName: ivory
namespace: ivory
-# storageClassLabels: "{'cnp.inspurcloud.cn/system-storageclass': 'false'}"
refreshWatcherTaskTime: 600000 # 单位ms 默认10分钟
linuxk8sConfigPath: /root/.kube/config
# ivoryPgKernelVersion: 15 #数据库内核版本
# ivoryVersion: 2.3 #ivory版本
- ivoryPgKernelVersion: 17 #数据库内核版本
- ivoryVersion: 4.5 #ivory版本
+ ivoryPgKernelVersion: 18 #数据库内核版本
+ ivoryVersion: 5.0 #ivory版本
logging:
level:
-# com:
-# inspur:
-# common: ERROR
org:
hibernate: error
root: info
config: config/spring_pro_logback.xml
images:
-# image:
-# db: harbor.highgo.com/highgo/crunchy-highgo:sm3nodemx
-# backrest: harbor.highgo.com/highgo/crunchy-pgbackrest:sm3-v2
-# pgadmin: harbor.highgo.com/highgo/crunchy-pgadmin4:hgadmin2
-# exporter: harbor.highgo.com/highgo/crunchy-postgres-exporter:v1.5
-# image:
-# db: docker.io/ivorysql/ivorysql:ubi8-2.2-1.1-1
-# backrest: docker.io/ivorysql/pgbackrest:ubi8-2.45-1.1-1
-# pgadmin: docker.io/ivorysql/pgadmin:ubi8-7.4-1.1-1
-# exporter: docker.io/ivorysql/postgres-exporter:ubi8-0.13.2-1.1-1
image:
- db: docker.io/ivorysql/ivorysql:ubi8-4.5-4.0-1
- backrest: docker.io/ivorysql/pgbackrest:ubi8-2.54.1-4.0-1
- pgadmin: docker.io/ivorysql/pgadmin:ubi8-8.14.0-4.0-1
- exporter: docker.io/ivorysql/postgres-exporter:ubi8-0.17.0-4.0-1
+ db: docker.io/ivorysql/ivorysql:ubi8-5.0-5.0-1
+ backrest: docker.io/ivorysql/pgbackrest:ubi8-2.56.0-5.0-1
+ pgadmin: docker.io/ivorysql/pgadmin:ubi8-9.9-5.0-1
+ exporter: docker.io/ivorysql/postgres-exporter:ubi8-0.17.0-5.0-1
server:
port: 8081
error:
@@ -73,22 +59,13 @@ server:
cluster:
user: pguser
-# user: hguser
group: ivory-operator.ivorysql.org
-# group: highgo-operator.inspur.com
version: v1beta1
-# version: v1beta1
kind: IvoryCluster
-# kind: PostgresCluster
plural: ivoryclusters
-# plural: highgoclusters
singular: ivorycluster
-# singular: highgocluster
instanceIdName: ivory/instanceId
-# instanceIdName: highgo/instanceId
clusterId: ivory/clusterId
-# clusterId: highgo/clusterId
-# prometheusFilter: highgo/user
prometheusFilter: ivory/user
clusterNameLabel: ${cluster.group}/cluster
clusterRoleLabel: ${cluster.group}/role
@@ -96,8 +73,5 @@ cluster:
crBackupAnnotation: ${cluster.group}/pgbackrest-backup
crRestoreAnnotation: ${cluster.group}/pgbackrest-restore
grafanaName: grafana
-# grafanaName: crunchy-grafana
alertManagerName: alertmanager
-# alertManagerName: crunchy-alertmanager
prometheusName: prometheus
-# prometheusName: crunchy-prometheus
diff --git a/cloudnative/src/main/resources/db/changelog/ivory/0000-init.xml b/cloudnative/src/main/resources/db/changelog/ivory/0000-init.xml
index 1ff9e81..636b8bd 100644
--- a/cloudnative/src/main/resources/db/changelog/ivory/0000-init.xml
+++ b/cloudnative/src/main/resources/db/changelog/ivory/0000-init.xml
@@ -114,7 +114,7 @@
-
+
diff --git a/ivory-cloud_release_notes.txt b/ivory-cloud_release_notes.txt
index f049595..4071965 100644
--- a/ivory-cloud_release_notes.txt
+++ b/ivory-cloud_release_notes.txt
@@ -1,4 +1,8 @@
ivory-cloud RELEASE NOTES
+******************v5.0******************
+1.IvorySqL 5.0适配
+
+
******************v4.0******************
1.IvorySqL operator 4.0适配(包括postgres-exporter、pgbackrest以及pgadmin的适配)