Skip to content

Commit

Permalink
tweak port to match description in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
unknowntpo committed Sep 5, 2024
1 parent 4c43376 commit d97e7a4
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 32 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
33 changes: 22 additions & 11 deletions helm-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -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
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
```
10 changes: 5 additions & 5 deletions helm-chart/templates/hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/jupyter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
selector:
app: {{ .Values.jupyter.serviceName }}
ports:
- port: 8888
- port: 18888
targetPort: 8888
---
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
selector:
app: {{ .Values.mysql.serviceName }}
ports:
- port: 3306
- port: 13306
targetPort: 3306
---
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
selector:
app: {{ .Values.postgresql.serviceName }}
ports:
- port: 5432
- port: 15432
targetPort: 5432
---
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/trino.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
selector:
app: {{ .Values.trino.serviceName }}
ports:
- port: 8080
- port: 18080
targetPort: 8080
name: http
---
Expand Down

0 comments on commit d97e7a4

Please sign in to comment.