Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#1032] improvement: Move Gravitino playground to another repo (#1028)

qqqttt1237abf093a5b46
diff --git a/dev/docker/playground/README.md b/dev/docker/playground/README.md
deleted file mode 100644
index 59781a7653..0000000000
--- a/dev/docker/playground/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
- Copyright 2023 Datastrato.
- This software is licensed under the Apache License version 2.
--->
-# Playground
-This is a complete Gravitino Docker runtime environment with `Hive`, `Hdfs`, `Trino`, and `Gravitno` Server. just execute the `./launch-playground.sh` script.
-Depending on your network, the startup may take 3-5 minutes.
-Once the playground environment has started, you can open http://localhost:8090 to access the Gravitino Web UI.
-
-## Startup playground
-```shell
-./launch-playground.sh
-```
-
-## Experience Gravitino with Trino SQL
-
-1. Login to Gravitino playground Trino Docker container using the following command.
-
-```shell
-docker exec -it playground-trino bash
-````
-
-2. Open Trino CLI in the container.
-
-```shell
-trino@d2bbfccc7432:/$ trino
-```
-
-3. Use follow SQL to test in the Trino CLI.
-
-```SQL
-SHOW CATALOGS;
-
-CREATE SCHEMA "metalake_demo.catalog_demo".db1
- WITH (location = 'hdfs://hive:9000/user/hive/warehouse/db1.db');
-
-SHOW CREATE SCHEMA "metalake_demo.catalog_demo".db1;
-
-CREATE TABLE "metalake_demo.catalog_demo".db1.table_001
-(
- name varchar,
- salary varchar
-)
-WITH (
- format = 'TEXTFILE'
-);
-
-INSERT INTO "metalake_demo.catalog_demo".db1.table_001 (name, salary) VALUES ('sam', '11');
-
-SELECT * FROM "metalake_demo.catalog_demo".db1.table_001;
-```
diff --git a/dev/docker/playground/docker-compose.yaml b/dev/docker/playground/docker-compose.yaml
deleted file mode 100644
index ada69951fa..0000000000
--- a/dev/docker/playground/docker-compose.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Copyright 2023 Datastrato.
-# This software is licensed under the Apache License version 2.
-#
-version: '3.0'
-services:
- hive:
- image: datastrato/hive:2.7.3-no-yarn
- ports:
- - "3306:3306"
- - "9000:9000"
- - "9083:9083"
- container_name: playground-hive
- environment:
- - HADOOP_USER_NAME=root
- healthcheck:
- test: ["CMD", "/tmp/check-status.sh"]
- interval: 10s
- timeout: 60s
- retries: 5
- deploy:
- resources:
- limits:
- cpus: "1"
- memory: 1G
-
- gravitino:
- image: datastrato/gravitino:0.3.0-SNAPSHOT
- ports:
- - "8090:8090"
- container_name: playground-gravitino
- depends_on:
- hive :
- condition: service_healthy
- volumes:
- - ./healthcheck:/tmp/healthcheck
- deploy:
- resources:
- limits:
- cpus: "0.5"
- memory: 500M
- healthcheck:
- test: ["CMD", "/tmp/healthcheck/gravitino-healthcheck.sh"]
- interval: 5s
- timeout: 10s
- retries: 5
-
- trino:
- image: datastrato/trino:426-gravitino-0.3.0-SNAPSHOT
- ports:
- - "8080:8080"
- container_name: playground-trino
- environment:
- - HADOOP_USER_NAME=root
- - GRAVITINO_HOST_IP=gravitino
- - GRAVITINO_HOST_PORT=8090
- - GRAVITINO_METALAKE_NAME=metalake_demo
- - HIVE_HOST_IP=hive
- depends_on:
- hive :
- condition: service_healthy
- gravitino :
- condition: service_healthy
- deploy:
- resources:
- limits:
- cpus: "1"
- memory: 1G
diff --git a/dev/docker/playground/healthcheck/gravitino-healthcheck.sh b/dev/docker/playground/healthcheck/gravitino-healthcheck.sh
deleted file mode 100755
index 25ac8e5189..0000000000
--- a/dev/docker/playground/healthcheck/gravitino-healthcheck.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2023 Datastrato.
-# This software is licensed under the Apache License version 2.
-#
-set -ex
-
-# Since trino-connector needs to connect Gravitino service, get the default metalake
-# Create metalake
-response=$(curl -X POST -H "Content-Type: application/json" -d '{"name":"metalake_demo","comment":"comment","properties":{}}' http://127.0.0.1:8090/api/metalakes)
-if echo "$response" | grep -q "\"code\":0"; then
- true # Placeholder, do nothing
-else
- echo "Metalake metalake_demo create failed"
- exit 1
-fi
-
-# Check metalake if created
-response=$(curl -X GET -H "Content-Type: application/json" http://127.0.0.1:8090/api/metalakes)
-if echo "$response" | grep -q "metalake_demo"; then
- echo "Metalake metalake_demo successfully created"
-else
- echo "Metalake metalake_demo create failed"
- exit 1
-fi
-
-# Create Hive catalog for experience Gravitino service
-curl -X POST -H "Content-Type: application/json" -d '{"name":"catalog_demo","type":"RELATIONAL", "provider":"hive", "comment":"comment","properties":{"metastore.uris":"thrift://hive:9083"}}' http://127.0.0.1:8090/api/metalakes/metalake_demo/catalogs
-
-# Check catalog if created
-response=$(curl -X GET -H "Content-Type: application/json" http://127.0.0.1:8090/api/metalakes/metalake_demo/catalogs)
-if echo "$response" | grep -q "catalog_demo"; then
- echo "Catalog catalog_demo successfully created"
-else
- echo "Catalog catalog_demo create failed"
- exit 1
-fi
-
-exit 0
\ No newline at end of file
diff --git a/dev/docker/playground/healthcheck/trino-healthcheck.sh b/dev/docker/playground/healthcheck/trino-healthcheck.sh
deleted file mode 100755
index a14ed068dc..0000000000
--- a/dev/docker/playground/healthcheck/trino-healthcheck.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2023 Datastrato.
-# This software is licensed under the Apache License version 2.
-#
-set -ex
-
-# Because trino-connector must first synchronize a default metalake from the Gravitino server
-response=$(trino --execute "SHOW CATALOGS LIKE 'metalake_demo.catalog_demo'")
-if echo "$response" | grep -q "metalake_demo.catalog_demo"; then
- echo "Gravitino Trino connector has finished synchronizing metadata"
-else
- echo "Gravitino Trino connector is not yet finished synchronizing metadata"
- exit 1
-fi
-
-exit 0
\ No newline at end of file
diff --git a/dev/docker/playground/launch-playground.sh b/dev/docker/playground/launch-playground.sh
deleted file mode 100755
index 4b95ddc87c..0000000000
--- a/dev/docker/playground/launch-playground.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2023 Datastrato.
-# This software is licensed under the Apache License version 2.
-#
-#set -ex
-playground_dir="$(dirname "${BASH_SOURCE-$0}")"
-playground_dir="$(cd "${playground_dir}">/dev/null; pwd)"
-
-isExist=`which docker-compose`
-if [ $isExist ]
-then
- true # Placeholder, do nothing
-else
- echo "ERROR: No docker service environment found, please install docker-compose first."
- exit
-fi
-
-cd ${playground_dir}
-docker-compose up
-
-# Clean Docker containers when you quit this script
-docker-compose down