From d97e7a443445b357e07dd635689369a069b919d7 Mon Sep 17 00:00:00 2001 From: unknowntpo Date: Fri, 6 Sep 2024 06:57:52 +0800 Subject: [PATCH] tweak port to match description in README.md --- README.md | 28 +++++++++++++---------- helm-chart/templates/NOTES.txt | 33 ++++++++++++++++++---------- helm-chart/templates/hive.yaml | 10 ++++----- helm-chart/templates/jupyter.yaml | 2 +- helm-chart/templates/mysql.yaml | 2 +- helm-chart/templates/postgresql.yaml | 2 +- helm-chart/templates/trino.yaml | 2 +- 7 files changed, 47 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 3678b171..20b3b646 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,14 @@ Install Git and Docker Compose. The playground runs a number of 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 | +| Docker container | Ports used | +| --------------------- | ---------------------------- | +| playground-gravitino | 8090 9001 | +| playground-hive | 3307 19000 19083 20000 60070 | +| playground-mysql | 13306 | +| playground-postgresql | 15342 | +| playground-trino | 18080 | +| playground-jupyter | 18888 | ## Start playground @@ -294,22 +294,26 @@ Apache Gravitino is an effort undergoing incubation at The Apache Software Found ## Kubernetes +In Project root directory, execute this command: + ``` helm upgrade --install gravitino-playground ./helm-chart/ --create-namespace --namespace gravitino-playground --debug --set projectRoot=$(pwd) ``` -FIXME: Tune readme 1. Log in to the Gravitino playground Trino pod using the following command: ``` -kubectl exec trino-5f6b6f996c-cshfv -n gravitino-playground -it -- /bin/bash +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: ``` -kubectl exec spark-74fd98c69-slp8m -n gravitino-playground -it -- /bin/bash +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 ``` -In local minikube, access gravitino ui using the following command: + +If you're using minikube, access gravitino ui using the following command: ``` kubectl expose deployment gravitino -n gravitino-playground --name gravitino-ui --type=NodePort --port=8090 diff --git a/helm-chart/templates/NOTES.txt b/helm-chart/templates/NOTES.txt index 88615e3a..987aba2e 100644 --- a/helm-chart/templates/NOTES.txt +++ b/helm-chart/templates/NOTES.txt @@ -1,11 +1,22 @@ -1. Get the application URL by running these commands: -export POD_NAME=$(kubectl get pods --namespace gravitino-playground -l "app=gravitino" -o jsonpath="{.items[0].metadata.name}") -export CONTAINER_PORT=$(kubectl get pod --namespace gravitino-playground $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") -echo "Visit http://127.0.0.1:8090 to use gravitino Web UI" -kubectl --namespace gravitino-playground port-forward $POD_NAME 8090:$CONTAINER_PORT - -# Jupyter Notebook -export POD_NAME=$(kubectl get pods --namespace gravitino-playground -l "app=jupyternotebook" -o jsonpath="{.items[0].metadata.name}") -export CONTAINER_PORT=$(kubectl get pod --namespace gravitino-playground $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") -echo "Visit http://127.0.0.1:18888 to use gravitino Web UI" -kubectl --namespace gravitino-playground port-forward $POD_NAME 18888:$CONTAINER_PORT \ No newline at end of file +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 +``` + +If you're using minikube, access gravitino ui using the following command: + +``` +kubectl expose deployment gravitino -n gravitino-playground --name gravitino-ui --type=NodePort --port=8090 +``` + +``` +minikube service gravitino-ui -n gravitino-playground --url +``` \ No newline at end of file diff --git a/helm-chart/templates/hive.yaml b/helm-chart/templates/hive.yaml index 4908fa6b..e6d1ebd1 100644 --- a/helm-chart/templates/hive.yaml +++ b/helm-chart/templates/hive.yaml @@ -54,19 +54,19 @@ spec: selector: app: {{ .Values.hive.serviceName }} ports: - - port: 3306 + - port: 3307 targetPort: 3306 name: mysql - - port: 9000 + - port: 19000 targetPort: 9000 name: hdfs - - port: 9083 + - port: 19083 targetPort: 9083 name: metastore - - port: 10000 + - port: 20000 targetPort: 10000 name: hiveserver2 - - port: 50070 + - port: 60070 targetPort: 50070 name: namenode --- diff --git a/helm-chart/templates/jupyter.yaml b/helm-chart/templates/jupyter.yaml index c18de7c4..91c21489 100644 --- a/helm-chart/templates/jupyter.yaml +++ b/helm-chart/templates/jupyter.yaml @@ -69,7 +69,7 @@ spec: selector: app: {{ .Values.jupyter.serviceName }} ports: - - port: 8888 + - port: 18888 targetPort: 8888 --- apiVersion: v1 diff --git a/helm-chart/templates/mysql.yaml b/helm-chart/templates/mysql.yaml index ea7974bf..97da00cf 100644 --- a/helm-chart/templates/mysql.yaml +++ b/helm-chart/templates/mysql.yaml @@ -48,7 +48,7 @@ spec: selector: app: {{ .Values.mysql.serviceName }} ports: - - port: 3306 + - port: 13306 targetPort: 3306 --- apiVersion: v1 diff --git a/helm-chart/templates/postgresql.yaml b/helm-chart/templates/postgresql.yaml index b4812e71..0b32de3c 100644 --- a/helm-chart/templates/postgresql.yaml +++ b/helm-chart/templates/postgresql.yaml @@ -42,7 +42,7 @@ spec: selector: app: {{ .Values.postgresql.serviceName }} ports: - - port: 5432 + - port: 15432 targetPort: 5432 --- apiVersion: v1 diff --git a/helm-chart/templates/trino.yaml b/helm-chart/templates/trino.yaml index d4016887..87cba951 100644 --- a/helm-chart/templates/trino.yaml +++ b/helm-chart/templates/trino.yaml @@ -71,7 +71,7 @@ spec: selector: app: {{ .Values.trino.serviceName }} ports: - - port: 8080 + - port: 18080 targetPort: 8080 name: http ---