Skip to content

Commit

Permalink
Install GraalVM from archive
Browse files Browse the repository at this point in the history
  • Loading branch information
olyagpl committed Aug 30, 2024
1 parent cd3252e commit 972c787
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
Expand All @@ -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:

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 972c787

Please sign in to comment.