justinmclean commented on code in PR #6659: URL: https://github.com/apache/gravitino/pull/6659#discussion_r1990396372
########## docs/how-to-build.md: ########## @@ -4,244 +4,232 @@ slug: /how-to-build license: "This software is licensed under the Apache License version 2." --- -- [Prerequisites](#prerequisites) -- [Quick start](#quick-start) -- [How to Build Apache Gravitino on Windows (Using WSL)](#how-to-build-apache-gravitino-on-windows-using-wsl) - ## Prerequisites -+ Linux or macOS operating system -+ Git -+ A Java Development Kit, version 8 to 17, installed in your environment to launch Gradle -+ Python 3.8, 3.9, 3.10, or 3.11 to build the Gravitino Python client -+ Optionally, Docker to run integration tests - -:::info Please read the following notes before trying to build Gravitino. - -+ Gravitino requires a minimum of JDK8 and supports up to JDK17 to run Gradle, so you need to install a JDK, version 8 to 17, to launch the build environment. -+ Gravitino itself supports using JDK 8, 11, or 17 to build. The Gravitino Trino connector uses JDK17 to build (to avoid vendor-related issues on some platforms, Gravitino uses the specified Amazon Corretto OpenJDK 17 to build the Trino connector on macOS). - You don't have to preinstall the specified JDK environment, as Gradle detects the JDK version needed and downloads it automatically. -+ Gravitino uses the Gradle Java Toolchain to detect and manage JDK versions, and it checks the installed JDK by running the `./gradlew javaToolchains` command. See [Gradle Java Toolchain](https://docs.gradle.org/current/userguide/toolchains.html#sec:java_toolchain). -+ Gravitino excludes all Docker-related tests by default. To run Docker-related tests, make sure you have installed Docker in your environment and either (1) set `skipDockerTests=false` in the `gradle.properties` file (or use `-PskipDockerTests=false` in the command) or (2) `export SKIP_DOCKER_TESTS=false` in the shell. Otherwise, all tests requiring Docker will be skipped. -+ macOS uses `docker-connector` to make the Gravitino Trino connector work with Docker for macOS. See [docker-connector](https://github.com/wenjunxiao/mac-docker-connector), `$GRAVITINO_HOME/dev/docker/tools/mac-docker-connector.sh`, and `$GRAVITINO_HOME/dev/docker/tools/README.md` for more details. -+ You can use OrbStack as a replacement for Docker for macOS. See [OrbStack](https://orbstack.dev/). With OrbStack, you can run Gravitino integration tests without needing to install `docker-connector`. -+ Depending on how you deploy Gravitino, other software used in conjunction with Gravitino may contain known security vulnerabilities. -::: - -## Quick start +- Linux, macOS or Windows operating system +- Git +- JDK 8 (default), 11 or 17 for running Gradle, the build environment for Gravitino. +- Python 3.8 (default), 3.9, 3.10, or 3.11, for building the Gravitino Python client +- Docker (optional), for running the integration tests -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). +:::note +Depending on how you deploy Gravitino, there may be contain known security vulnerabilities +in other software used in conjunction with Gravitino. +::: - ```shell - git clone g...@github.com:apache/gravitino.git - ``` +### Install WSL on Windows -2. Build the Gravitino project. Running this for the first time can take 15 minutes or more. +If you are building Gravitino on a Linux or macOS machine, you can proceed to the [next section](#install-jdk). +To build Apache Gravitino on Windows, you need to install the Windows Subsystem for Linux (WSL) +from Microsoft which provides you a Linux-like environment for development. +For installing WSL, refer to the [WSL Installation Guide](https://learn.microsoft.com/en-us/windows/wsl/install). +The following steps assume that you have installed Unbuntu which is the default distribution for WSL. - ```shell - cd gravitino - ./gradlew build - ``` +*Note: Gravitino can run successfully on Ubuntu 22.04.* - The default specified JDK version is 8, but if you want to use JDK 11 or 17 to build, modify the property `jdkVersion` to 11 or 17 in the `gradle.properties` file, or specify the version with `-P`, like: +Make sure you have fresh information about the latest versions of Ubuntu packages and their dependencies: - ```shell - ./gradlew build -PjdkVersion=11 - ``` +```shell +sudo apt update +``` - Or: +Install the prerequisite packages required by later software installation: - ```shell - ./gradlew build -PjdkVersion=17 - ``` +```shell +sudo apt install apt-transport-https ca-certificates curl software-properties-common +``` - The `./gradlew build` command builds all the Gravitino components, including the Gravitino server, Java and Python clients, Trino and Spark connectors, and more. +### Install JDK - For the Python client, the `./gradlew build` command builds the Python client with Python 3.8 by default. If you want to use Python 3.9, 3.10, or 3.11 to build, please modify the property `pythonVersion` to 3.9, 3.10, or 3.11 in the `gradle.properties` file, or specify the version with `-P` like: +You don't have to preinstall the JDK environment. Review Comment: "pre-install" -- 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