diff --git a/docs/platform-engineers/system-operation/high-availability.md b/docs/platform-engineers/system-operation/high-availability.md index 400695e2244..38e6e96ec6e 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(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 ``` +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