Skip to content

Commit

Permalink
refactor(README.md): minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
unknowntpo committed Nov 7, 2024
1 parent b420ded commit d4357f6
Showing 1 changed file with 73 additions and 41 deletions.
114 changes: 73 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,95 @@ The playground runs a number of services. The TCP ports used may clash with exis

## Playground usage



### One curl command launch playground
```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apache/gravitino-playground/HEAD/install.sh)"
```

### Use git download and launch playground
### Use git to download and launch playground

```shell
git clone [email protected]:apache/gravitino-playground.git
cd 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
```

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

##### Stop playground
```shell
./playground.sh stop
./playground.sh k8s stop
```




## Experiencing Apache Gravitino with Trino SQL

### Using Trino CLI in Docker Container
Expand Down Expand Up @@ -311,41 +378,6 @@ os.environ["OPENAI_API_KEY"] = ""
os.environ["OPENAI_API_BASE"] = ""
```

## 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)
```

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
```

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
```

## ASF Incubator disclaimer

Apache Gravitino is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
Expand Down

0 comments on commit d4357f6

Please sign in to comment.