World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#5511] Update playground doc to latest (#5577)
danhuawang7cb0d9e676f6
diff --git a/docs/how-to-use-the-playground.md b/docs/how-to-use-the-playground.mdindex 58787ff3bf..27b32dbdd2 100644--- a/docs/how-to-use-the-playground.md+++ b/docs/how-to-use-the-playground.md@@ -14,6 +14,7 @@ Depending on your network and computer, startup time may take 3-5 minutes. Once## PrerequisitesInstall Git (optional), Docker, Docker Compose.+Docker Desktop (or Orbstack) with Kubenetes enabled, and helm CLI are required if you use helm-chart to deploy services.## System Resource Requirements@@ -24,44 +25,110 @@ Install Git (optional), Docker, Docker Compose.The playground runs several services. The TCP ports used may clash with existing services you run, such as MySQL or Postgres.| Docker container | Ports used |-|-----------------------|------------------------|+| --------------------- | ---------------------- || playground-gravitino | 8090 9001 || playground-hive | 3307 19000 19083 60070 || playground-mysql | 13306 || playground-postgresql | 15342 || playground-trino | 18080 || playground-jupyter | 18888 |+| playground-prometheus | 19090 |+| playground-grafana | 13000 |## Playground usage-### Launch playground--You can launch the playground in two ways:--1. Use a single curl command+### One curl command launch playground```shell/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apache/gravitino-playground/HEAD/install.sh)"```-2. Use Git+### Use git to download and launch playground```shellgit clone [email protected]:apache/gravitino-playground.gitcd gravitino-playground-./playground.sh start```-### Check status+#### Docker++##### Start++```+./playground.sh docker start+```++##### Check status+```shell-./playground.sh status+./playground.sh docker status+```++##### Stop playground++```shell+./playground.sh docker stop+```++#### Kubernetes++Enable Kubernetes in Docker Desktop or Orbstack.++In Project root directory, execute this command:++```+helm upgrade --install gravitino-playground ./helm-chart/ --create-namespace --namespace gravitino-playground --set projectRoot=$(pwd)+```++##### Start++```+./playground.sh k8s start+```++##### Check status++```shell+./playground.sh k8s status+```++##### Port Forwarding++To access pods or services at `localhost`, you needs to do these steps:++1. Log in to the Gravitino playground Trino pod using the following command:++```+TRINO_POD=$(kubectl get pods --namespace gravitino-playground -l app=trino -o jsonpath="{.items[0].metadata.name}")+kubectl exec $TRINO_POD -n gravitino-playground -it -- /bin/bash+```++2. Log in to the Gravitino playground Spark pod using the following command:++```+SPARK_POD=$(kubectl get pods --namespace gravitino-playground -l app=spark -o jsonpath="{.items[0].metadata.name}")+kubectl exec $SPARK_POD -n gravitino-playground -it -- /bin/bash```-### Stop playground++3. Port-forwarding Gravitino Service, so that you can access it at `localhost:8090`.++```+kubectl port-forward svc/gravitino -n gravitino-playground 8090:8090+```++4. Port-forwarding Jupyter Notebook Service, so that you can access it at `localhost:8888`.++```+kubectl port-forward svc/jupyternotebook -n gravitino-playground 8888:8888+```++##### Stop playground+```shell-./playground.sh stop+./playground.sh k8s stop```-## Using Apache Gravitino with Trino SQL+## Experiencing Apache Gravitino with Trino SQL### Using Trino CLI in Docker Container@@ -96,9 +163,17 @@ docker exec -it playground-spark bash2. Open the Spark SQL client in the container.```shell-spark@container_id:/$ cd /opt/spark && /bin/bash bin/spark-sql+spark@container_id:/$ cd /opt/spark && /bin/bash bin/spark-sql```+## Monitoring Gravitino++1. Open the Grafana in the browser at [http://localhost:13000](http://localhost:13000).++2. In the navigation menu, click **Dashboards** -> **Gravitino Playground**.++3. Experiment with the default template.+## Example### Simple Trino queries@@ -203,6 +278,8 @@ INSERT OVERWRITE TABLE employees PARTITION(department='Marketing') VALUES (3, 'MSELECT * FROM catalog_hive.product.employees WHERE department = 'Engineering';```+The demo is located in the `jupyter` folder, you can open the `gravitino-spark-trino-example.ipynb`+demo via Jupyter Notebook by [http://localhost:18888](http://localhost:18888).### Using Apache Iceberg REST service@@ -259,6 +336,9 @@ unionselect * from catalog_iceberg.sales.customers;```+The demo is located in the `jupyter` folder, you can open the `gravitino-spark-trino-example.ipynb`+demo via Jupyter Notebook by [http://localhost:18888](http://localhost:18888).+### Using Gravitino with LlamaIndexThe Gravitino playground also provides a simple RAG demo with LlamaIndex. This demo will show you the