From f1b099cc5ea6da7808e8316cd94cb925cc406a9a Mon Sep 17 00:00:00 2001 From: Neeraj Gartia Date: Thu, 7 Sep 2023 14:25:24 +0530 Subject: [PATCH 1/2] adds velaux sql database docs Signed-off-by: Neeraj Gartia --- .../system-operation/high-availability.md | 3 +- docs/reference/addons/velaux.md | 108 +++++++++++++++++- 2 files changed, 108 insertions(+), 3 deletions(-) diff --git a/docs/platform-engineers/system-operation/high-availability.md b/docs/platform-engineers/system-operation/high-availability.md index 400695e2244..ffe728b0015 100644 --- a/docs/platform-engineers/system-operation/high-availability.md +++ b/docs/platform-engineers/system-operation/high-availability.md @@ -39,8 +39,9 @@ kubectl scale deploy -n vela-system kubevela-cluster-gateway --replicas=3 VelaUX is an addon, it composed by 3 major parts: nginx for frontend, APIServer as backend, and its database. -We strongly recommend to use high availability mongodb cluster as the database driver. The frontend and backend are both stateless services, just configure multiple replicas for them. As a result, the high availability installation command just like below: +We strongly recommend to use high availability mongodb, mysql or postgresql cluster as the database driver. The frontend and backend are both stateless services, just configure multiple replicas for them. As a result, the high availability installation command just like below: ``` vela addon enable velaux dbType=mongodb dbURL=mongodb://:@ replicas=3 ``` +You can refer [Setup with the database](../../reference/addons/velaux.md#setup-with-the-database) for more info. \ No newline at end of file diff --git a/docs/reference/addons/velaux.md b/docs/reference/addons/velaux.md index 2197569ad98..99064c10fda 100644 --- a/docs/reference/addons/velaux.md +++ b/docs/reference/addons/velaux.md @@ -2,6 +2,9 @@ title: VelaUX --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + VelaUX provides the UI console of KubeVela. ![alt](../../resources/velaux-view.jpg) @@ -126,9 +129,12 @@ Please make sure the certificate matches the domain. vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik secretName=velaux-cert ``` -## Setup with MongoDB database +## Setup with the database + +VelaUX supports Kubernetes, MongoDB, MySQL and PostgreSQL as the database. the default is Kubernetes. We strongly advise using the databases other than Kubernetes to power your production environment. -VelaUX supports Kubernetes and MongoDB as the database. the default is Kubernetes. We strongly advise using the MongoDB database to power your production environment. + + ```shell script vela addon enable velaux dbType=mongodb dbURL=mongodb://:@ @@ -173,6 +179,104 @@ spec: ``` After deployed, let's get the root password from the secret `vela-system/velaux-db-mongodb`. + + + + +```shell script +vela addon enable velaux dbType=mysql dbURL=mysql://:@:/ +``` +> It's necessary to create the specified database in advance. You can find the relevant connection string parameters [here](https://github.com/go-sql-driver/mysql#parameters) + +You can also deploy the MySQL with this application configuration: + +> Your cluster must have a default storage class. + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: velaux-db + namespace: vela-system +spec: + components: + - name: velaux-db + properties: + chart: mysql + repoType: helm + url: https://charts.bitnami.com/bitnami + values: + persistence: + size: 20Gi + version: 12.1.12 + type: helm + policies: + - name: vela-system + properties: + clusters: + - local + namespace: vela-system + type: topology + workflow: + steps: + - name: vela-system + properties: + policies: + - vela-system + type: deploy +``` + +After deployed, let's get the root password from the secret `vela-system/velaux-db-mysql`. + + + + +```shell script +vela addon enable velaux dbType=postgresql dbURL=postgres://:@:/ +``` +> It's necessary to create the specified database in advance. + +You can also deploy the PostgreSQL with this application configuration: + +> Your cluster must have a default storage class. + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: velaux-db + namespace: vela-system +spec: + components: + - name: velaux-db + properties: + chart: postgresql + repoType: helm + url: https://charts.bitnami.com/bitnami + values: + persistence: + size: 20Gi + version: 12.1.12 + type: helm + policies: + - name: vela-system + properties: + clusters: + - local + namespace: vela-system + type: topology + workflow: + steps: + - name: vela-system + properties: + policies: + - vela-system + type: deploy +``` + +After deployed, let's get the root password from the secret `vela-system/velaux-db-postgresql`. + + ## Specify the addon image From 8c8ca188e21f8770f78ecf726bd0ae1700eca064 Mon Sep 17 00:00:00 2001 From: Neeraj Gartia <80708727+NeerajGartia21@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:40:40 +0530 Subject: [PATCH 2/2] Update docs/platform-engineers/system-operation/high-availability.md Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com> Signed-off-by: Neeraj Gartia --- docs/platform-engineers/system-operation/high-availability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform-engineers/system-operation/high-availability.md b/docs/platform-engineers/system-operation/high-availability.md index ffe728b0015..38e6e96ec6e 100644 --- a/docs/platform-engineers/system-operation/high-availability.md +++ b/docs/platform-engineers/system-operation/high-availability.md @@ -39,7 +39,7 @@ kubectl scale deploy -n vela-system kubevela-cluster-gateway --replicas=3 VelaUX is an addon, it composed by 3 major parts: nginx for frontend, APIServer as backend, and its database. -We strongly recommend to use high availability mongodb, mysql or postgresql cluster as the database driver. The frontend and backend are both stateless services, just configure multiple replicas for them. As a result, the high availability installation command just like below: +We strongly recommend to use high availability mongodb, mysql(beta) or postgresql(beta) cluster as the database driver. The frontend and backend are both stateless services, just configure multiple replicas for them. As a result, the high availability installation command just like below: ``` vela addon enable velaux dbType=mongodb dbURL=mongodb://:@ replicas=3