World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#10929]docs(deploy): Add GCS configuration guide for Helm Chart and Docker deployments (#11421)
Danhua Wangdc87b596dbac
diff --git a/dev/charts/gravitino/values.yaml b/dev/charts/gravitino/values.yamlindex 250f3ceb93..84040d594a 100644--- a/dev/charts/gravitino/values.yaml+++ b/dev/charts/gravitino/values.yaml@@ -289,7 +289,11 @@ icebergRest:# tenantId: ""# clientId: ""# clientSecret: ""- ## No need to configure extra Google Cloud Storage configuration+ ## Google Cloud Storage (GCS) configuration+ ## If your catalog uses GCS as the object store, you must set the+ ## GOOGLE_APPLICATION_CREDENTIALS environment variable in the container (see the "env" section below).+ ## Mount the service account key file into the pod via extraVolumes/extraVolumeMounts.+ ## No additional Iceberg REST properties are required beyond the credential file.#### Catalog configuration provider class name##@@ -356,12 +360,24 @@ additionalConfigItems: {}extraVolumes:- name: gravitino-logemptyDir: {}+ ## Uncomment the following to mount a GCS service account key for catalogs using GCS as object store.+ ## Create the secret first: kubectl create secret generic gcs-key --from-file=key.json=<path-to-key-file> -n gravitino+ ##+ # - name: gcs-key+ # secret:+ # secretName: gcs-key## Additional volume mounts##extraVolumeMounts:- name: gravitino-logmountPath: /opt/gravitino/logs+ ## Uncomment the following to mount the GCS key into the container.+ ## Ensure GOOGLE_APPLICATION_CREDENTIALS env is set to /etc/gcs/key.json (see env section).+ ##+ # - name: gcs-key+ # mountPath: /etc/gcs+ # readOnly: true## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/## If you set enabled as "True", you need :@@ -532,6 +548,11 @@ containerSecurityContext:env:- name: GRAVITINO_MEMvalue: "-Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=512m"+ ## Uncomment the following if your catalog uses Google Cloud Storage (GCS) as the object store.+ ## You must also mount the service account key file via extraVolumes and extraVolumeMounts.+ ##+ # - name: GOOGLE_APPLICATION_CREDENTIALS+ # value: /etc/gcs/key.json## The envWithTpl array below has the same usage as "env", but is using the tpl function to support templatable string.## This can be useful when you want to pass dynamic values to the Chart using the helm argument "--set <variable>=<value>"diff --git a/docs/chart.md b/docs/chart.mdindex 3fa11fb78a..45b7802ba5 100644--- a/docs/chart.md+++ b/docs/chart.md@@ -27,7 +27,7 @@ helm pull oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION>Or install directly:```console-helm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> -n gravitino --create-namespace+helm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> -n <NAMESPACE> --create-namespace```### Install from Local Repository (For Development or Unreleased Versions)@@ -48,7 +48,7 @@ helm dependency update gravitinoInstall the chart:```console-helm upgrade --install gravitino ./gravitino -n gravitino --create-namespace+helm upgrade --install gravitino ./gravitino -n <NAMESPACE> --create-namespace```## View Chart Values@@ -72,7 +72,7 @@ helm upgrade --install [RELEASE_NAME] oci://registry-1.docker.io/apache/gravitinRun the following command to deploy Gravitino using the default settings:```console-helm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> -n gravitino --create-namespace+helm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> -n <NAMESPACE> --create-namespace```### Deploy with Custom Configuration@@ -81,7 +81,7 @@ To customize the deployment, use the --set flag to override specific values:```consolehelm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> \- -n gravitino --create-namespace \+ -n <NAMESPACE> --create-namespace \--set key1=val1,key2=val2,...```@@ -89,7 +89,7 @@ Alternatively, you can provide a custom values.yaml file:```consolehelm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> \- -n gravitino --create-namespace \+ -n <NAMESPACE> --create-namespace \-f /path/to/values.yaml```@@ -99,7 +99,7 @@ To deploy both Gravitino and MySQL, where MySQL is used as the storage backend,```consolehelm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> \- -n gravitino --create-namespace \+ -n <NAMESPACE> --create-namespace \--set mysql.enabled=true```@@ -109,7 +109,7 @@ By default, the MySQL PersistentVolumeClaim(PVC) storage class is local-path. To```consolehelm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> \- -n gravitino --create-namespace \+ -n <NAMESPACE> --create-namespace \--set mysql.enabled=true \--set global.defaultStorageClass="-"```@@ -130,7 +130,7 @@ Use Helm to install or upgrade Gravitino, specifying the MySQL connection detail```consolehelm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> \- -n gravitino --create-namespace \+ -n <NAMESPACE> --create-namespace \--set entity.jdbcUrl="jdbc:mysql://database-1.***.***.rds.amazonaws.com:3306/gravitino" \--set entity.jdbcDriver="com.mysql.cj.jdbc.Driver" \--set entity.jdbcUser="admin" \@@ -142,8 +142,48 @@ Replace database-1.***.***.rds.amazonaws.com with your actual MySQL host. \Change admin and admin123 to your actual MySQL username and password. \Ensure the target MySQL database (gravitino) exists before deployment._+### Deploy Gravitino with GCS as Object Store++If your catalog uses Google Cloud Storage (GCS) as the object store, you need to set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable in the container and mount the service account key file.++1. Create a Kubernetes secret from your GCS service account key:++```console+kubectl create secret generic gcs-key --from-file=key.json=/path/to/your-service-account-key.json -n <NAMESPACE>+```++2. Deploy Gravitino with GCS configuration in your custom `values.yaml`:++```yaml+env:+ - name: GRAVITINO_MEM+ value: "-Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=512m"+ - name: GOOGLE_APPLICATION_CREDENTIALS+ value: /etc/gcs/key.json++extraVolumes:+ - name: gravitino-log+ emptyDir: {}+ - name: gcs-key+ secret:+ secretName: gcs-key++extraVolumeMounts:+ - name: gravitino-log+ mountPath: /opt/gravitino/logs+ - name: gcs-key+ mountPath: /etc/gcs+ readOnly: true+```++```console+helm upgrade --install gravitino oci://registry-1.docker.io/apache/gravitino-helm --version <VERSION> \+ -n <NAMESPACE> --create-namespace \+ -f /path/to/values.yaml+```+## Uninstall Helm Chart```console-helm uninstall [RELEASE_NAME] -n [NAMESPACE]+helm uninstall [RELEASE_NAME] -n <NAMESPACE>```diff --git a/docs/how-to-install.md b/docs/how-to-install.mdindex 13252e2b24..7626beb427 100644--- a/docs/how-to-install.md+++ b/docs/how-to-install.md@@ -150,6 +150,17 @@ curl -v -X GET -H "Accept: application/vnd.gravitino.v1+json" -H "Content-Type:to make sure Gravitino is running.+### Using GCS as Object Store with Docker++If your catalog uses Google Cloud Storage (GCS) as the object store, set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable and mount the service account key file into the container:++```shell+docker run -d -i -p 8090:8090 \+ -v /path/to/your-service-account-key.json:/etc/gcs/key.json:ro \+ -e GOOGLE_APPLICATION_CREDENTIALS=/etc/gcs/key.json \+ apache/gravitino:<version>+```+## Install Apache Gravitino using Docker composeThe published Gravitino Docker image only contains the Gravitino server with a basic configuration. If you want to experience the whole Gravitino system with other components, use the Docker `compose` file.