orenccl commented on code in PR #110:
URL: 
https://github.com/apache/gravitino-playground/pull/110#discussion_r1860368697


##########
playground.sh:
##########
@@ -104,97 +65,53 @@ checkPortInUse() {
 start() {
   echo "INFO: Starting the playground..."
 
-  case "$runtime" in
-  k8s)
-    testK8s
-    checkHelm
-    ;;
-  docker)
-    testDocker
-    checkCompose
-    ports=(8090 9001 3307 19000 19083 60070 13306 15342 18080 18888 19090 
13000)
-    for port in "${ports[@]}"; do
-      checkPortInUse ${port}
-    done
-    ;;
-  esac
+       testDocker
+       checkCompose
+       ports=(8090 9001 3307 19000 19083 60070 13306 15342 18080 18888 19090 
13000)
+       for port in "${ports[@]}"; do
+               checkPortInUse ${port}
+       done
 
   cd ${playground_dir}
   echo "Preparing packages..."
   ./init/spark/spark-dependency.sh
   ./init/gravitino/gravitino-dependency.sh
   ./init/jupyter/jupyter-dependency.sh
 
-  case "$runtime" in
-  k8s)
-    helm upgrade --install gravitino-playground ./helm-chart/ \
-      --create-namespace --namespace gravitino-playground \
-      --set projectRoot=$(pwd)
-    ;;
-  docker)
-    logSuffix=$(date +%Y%m%d%H%m%s)
-    if [ "$enableRanger" == true ]; then
-        docker-compose -f docker-compose.yaml -f 
docker-enable-ranger-hive-override.yaml up --detach
-    else
-        docker-compose up --detach
-    fi
-    
-    docker compose logs -f >${playground_dir}/playground-${logSuffix}.log 2>&1 
&
-    echo "Check log details: ${playground_dir}/playground-${logSuffix}.log"
-    ;;
-  esac
+       logSuffix=$(date +%Y%m%d%H%m%s)
+       if [ "$enableRanger" == true ]; then
+                       docker-compose -f docker-compose.yaml -f 
docker-enable-ranger-hive-override.yaml up --detach
+       else
+                       docker-compose up --detach
+       fi
+       
+       docker compose logs -f >${playground_dir}/playground-${logSuffix}.log 
2>&1 &
+       echo "Check log details: ${playground_dir}/playground-${logSuffix}.log"
 }
 
 status() {
-  case "$runtime" in
-  k8s)
-    kubectl -n gravitino-playground get pods -o wide
-    ;;
-  docker)
-    docker-compose ps -a
-    ;;
-  esac
+       docker-compose ps -a
 }
 
 stop() {
   echo "INFO: Stopping the playground..."
 
-  case "$runtime" in
-  k8s)
-       helm uninstall --namespace gravitino-playground gravitino-playground 
-    ;;
-  docker)
-    docker-compose down
-    if [ $? -eq 0 ]; then
-      echo "INFO: Playground stopped!"
-    fi
-    ;;
-  esac
+       docker-compose down
+       if [ $? -eq 0 ]; then
+               echo "INFO: Playground stopped!"
+       fi
 }
 
-runtime=""
-
 case "$1" in
-k8s)
-  runtime="k8s";
-  ;;
-docker)
-  runtime="docker";
-  ;;
-*)
-  echo "ERROR: please specify which runtime you want to use, available 
runtime: [docker|k8s]" 
-esac
-
-case "$2" in
 start)
-  if [[ "$3" == "-y" ]]; then
+  if [[ "$2" == "-y" ]]; then
     input="y"
   else
     echo "The playground requires 2 CPU cores, 8 GB of RAM, and 25 GB of disk 
storage to operate efficiently."
     read -r -p "Confirm the requirement is available in your OS [Y/n]:" input
   fi
 
-  if [[ "$4" == "--enable-ranger" || "$3" == "--enable-ranger" ]]; then
+  if [[ "$3" == "--enable-ranger" || "$3" == "--enable-ranger" ]]; then

Review Comment:
   ```suggestion
     if [[ "$3" == "--enable-ranger" ]]; then
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to