World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#3812] improve(docs): Add Windows build instructions to how-to-build.md (#3736)
Lance Lin1f347bbcb3af
diff --git a/docs/how-to-build.md b/docs/how-to-build.mdindex c1d248e103..7c2c46299c 100644--- a/docs/how-to-build.md+++ b/docs/how-to-build.md@@ -5,6 +5,10 @@ license: "Copyright 2023 Datastrato Pvt Ltd.This software is licensed under the Apache License version 2."---+- [Prerequisites](#prerequisites)+- [Quick start](#quick-start)+- [How to Build Gravitino on Windows (Using WSL)](#how-to-build-gravitino-on-windows-using-wsl)+## Prerequisites+ Linux or macOS operating system@@ -35,6 +39,8 @@ This software is licensed under the Apache License version 2."1. Clone the Gravitino project.+If you want to contribute to this open-source project, please fork the project on GitHub first. After forking, clone the forked project to your local environment, make your changes, and submit a pull request (PR).+```shellgit clone [email protected]:datastrato/gravitino.git```@@ -93,11 +99,11 @@ This software is licensed under the Apache License version 2."This creates `gravitino-spark-connector-runtime-{sparkVersion}_{scalaVersion}-{version}.jar`under the `spark-connector/v3.4/spark-runtime/build/libs` directory. You could replace `3.4` with- `3.3` or `3.5` to specify different Spark versions, replace `2.12` with `2.13` for different Scala- version. The default Scala version is `2.12` if not specifying `-PscalaVersion`.+ `3.3` or `3.5` to specify different Spark versions, and replace `2.12` with `2.13` for different Scala+ versions. The default Scala version is `2.12` if not specifying `-PscalaVersion`.:::info- Gravitino Spark connector doesn't support Scala 2.13 for Spark3.3.+ Gravitino Spark connector doesn't support Scala 2.13 for Spark 3.3.::::::note@@ -157,3 +163,99 @@ This software is licensed under the Apache License version 2."This creates `gravitino-trino-connector-{version}.tar.gz` and`gravitino-trino-connector-{version}.tar.gz.sha256` under the `distribution` directory. Youcan uncompress and deploy it to Trino to use the Gravitino Trino connector.++## How to Build Gravitino on Windows (Using WSL)++### Download WSL (Ubuntu)++**On Windows:**++Refer to this guide for installation: [WSL Installation Guide](https://learn.microsoft.com/en-us/windows/wsl/install)++*Note: Ubuntu 22.04 can successfully run Gravitino*++This step involves setting up the Windows Subsystem for Linux (WSL) on your Windows machine. WSL allows you to run a Linux distribution alongside Windows, providing a Linux-like environment for development.++### Update Package List and Install Necessary Packages++**On Ubuntu (WSL):**++```shell+sudo apt update+sudo apt install apt-transport-https ca-certificates curl software-properties-common+```++Updating the package list ensures you have the latest information on the newest versions of packages and dependencies. Installing the necessary packages sets up your system to securely download and manage additional software.++### Download and Setup Java SDK 17 (11 or 8 also works)++**On Ubuntu (WSL):**++1. Edit your `~/.bashrc` file using any editor. Here, `vim` is used:++ ```shell+ vim ~/.bashrc+ ```++2. Add the following lines at the end of the file. Replace `/usr/lib/jvm/java-11-openjdk-amd64` with your actual Java installation path:++ ```sh+ export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"+ export PATH=$PATH:$JAVA_HOME/bin+ ```++3. Save and quit in vim using `:wq`.++4. Run `source ~/.bashrc` to update the `.bashrc` file in your current shell session.++ Editing the `~/.bashrc` file allows you to set environment variables that will be available in every terminal session. Setting `JAVA_HOME` and updating `PATH` ensures that your system uses the correct Java version for development.++### Install Docker++**On Ubuntu (WSL):**++```shell+curl -fsSL https+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -+sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"+sudo apt update+sudo apt install docker-ce+sudo service docker start+sudo docker run hello-world+sudo usermod -aG docker $USER+```++These commands install Docker. Running `hello-world` verifies the installation. Adding your user to the Docker group allows you to run Docker commands without `sudo`.++### Install Python 3.11++**On Ubuntu (WSL):**++```shell+sudo apt update+sudo apt install software-properties-common+sudo add-apt-repository ppa:deadsnakes/ppa+sudo apt update+sudo apt install python3.11+python3.11 --version+```++These commands add a repository that provides the latest Python versions and then installs Python 3.11.++### Download Gravitino Project to WSL++**On Ubuntu (WSL):**++```shell+git clone https://github.com/datastrato/gravitino.git+cd gravitino+./gradlew compileDistribution -x test+cd distribution/package/+./bin/gravitino.sh start+```++Access [http://localhost:8090](http://localhost:8090)++Building the Gravitino project compiles the necessary components, and starting the server allows you to access the application in your browser.++For instructions on how to run the project using VSCode or IntelliJ on Windows, please refer to [CONTRIBUTING.md](CONTRIBUTING.md).