From 972c787433fa20d03164c5cf65df637b033f3317 Mon Sep 17 00:00:00 2001 From: Olya Gupalo Date: Fri, 30 Aug 2024 13:00:07 +0300 Subject: [PATCH] Install GraalVM from archive --- README.md | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6054581..7611d84 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Multi-Cloud Apps with GraalVM - Up and Running -This workshop is for developers looking to understand better how to use [GraalVM Native Image](https://docs.oracle.com/en/graalvm/jdk/22/docs/reference-manual/native-image/) via a Maven plugin and **build size-optimized cloud native Java applications**. +This workshop is for developers looking to understand better how to use [GraalVM Native Image](https://www.graalvm.org/latest/reference-manual/native-image/) via a Maven plugin and **build size-optimized cloud native Java applications**. You are going to discover ways to minimize application footprint by taking advantage of different Native Image linking options and packaging into various base container images. -Finally, you will learn how to streamline your development process by automating builds with CI/CD pipelines. [to do] +Finally, you will learn how to streamline your development process by automating builds with CI/CD pipelines. For the demo part, you will run a Spring Boot web server application, hosting the GraalVM website. This application is enhanced with the [GraalVM Native Image Maven plugin](https://graalvm.github.io/native-build-tools/latest/index.html). @@ -21,10 +21,19 @@ In this workshop you will: * x86 Linux * `musl` toolchain * Container runtime such as [Rancher Desktop](https://docs.rancherdesktop.io/getting-started/installation/) or [Docker](https://www.docker.com/gettingstarted/) installed and running -* [GraalVM for JDK 22](https://www.graalvm.org/downloads/). The easiest way to install is with [SDKMAN!](https://sdkman.io/): - ```bash - sdk install java 22.0.2-graal - ``` +Install it from archive, point environment variables to it, and check the `java` version: +```bash +wget -q https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-x64_bin.tar.gz && tar xvzf graalvm-jdk-21_linux-x64_bin.tar.gz && rm -f graalvm-jdk-21_linux-x64_bin.tar.gz +``` +```bash +export JAVA_HOME=/home/opc/graalvm-jdk-23+36.1 +``` +```bash +export PATH=/home/opc/graalvm-jdk-23+36.1/bin:$PATH +``` +```bash +java -version +``` Below see the summary of base images that will/can be used in this workshop: @@ -261,9 +270,18 @@ Note that the static resources are "baked" into this native executable and added _This is where the fun begins._ -> Requires [GraalVM for JDK 23 Early Access Build](https://github.com/graalvm/oracle-graalvm-ea-builds/releases). The easiest way to install is with [SDKMAN!](https://sdkman.io/): +> Requires [GraalVM for JDK 23 Early Access Build](https://github.com/graalvm/oracle-graalvm-ea-builds/releases). Install it from archive, point environment variables to it, and check the `java` version: +```bash +wget -q https://github.com/graalvm/oracle-graalvm-ea-builds/releases/download/jdk-23.0.0-ea.23/graalvm-jdk-23.0.0-ea.23_linux-x64_bin.tar.gz && tar -xzf graalvm-jdk-23.0.0-ea.23_linux-x64_bin.tar.gz && rm -f graalvm-jdk-23.0.0-ea.23_linux-x64_bin.tar.gz +``` +```bash +export JAVA_HOME=/home/opc/graalvm-jdk-23+36.1 +``` +```bash +export PATH=/home/opc/graalvm-jdk-23+36.1/bin:$PATH +``` ```bash -sdk install java 23.ea.23-graal +java -version ``` Alternatively, you can install it from archive: