Skip to content

Commit

Permalink
Fix various issues in 01_setup.adoc (#147)
Browse files Browse the repository at this point in the history
* Fix various issues in 01_setup.adoc

* Switch to Java 21
  • Loading branch information
gsmet authored May 22, 2024
1 parent 361c634 commit 8dfe2a9
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions documentation/modules/ROOT/pages/01_setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ endif::workshop[]

[TIP]
====
Installing GraalVM is only required if you intend to build a https://quarkus.io/guides/building-native-image[native binary] for your local operating system and don't have a container runtime.
Installing GraalVM is only required if you intend to build a https://quarkus.io/guides/building-native-image[native binary] for your local operating system and don't have a container runtime.
Quarkus can simply build the native binary inside a container and this way you don't need to install and configure GraalVM on your machine.
====

NOTE: * You can also use Docker instead of Podman. The advantage of Podman is that it is 100% Free Open Source and does not need to run with elevated privileges.
NOTE: You can also use Docker instead of Podman. The advantage of Podman is that it is 100% Free Open Source and does not need to run with elevated privileges.


[tabs]
Expand All @@ -47,15 +47,15 @@ Please have them installed and configured before you get started with any of the
| https://podman-desktop.io/downloads[Podman Desktop for Mac, window="_blank"]
| https://podman-desktop.io/downloads[Podman Desktop for Linux, window="_blank"]
| https://podman-desktop.io/downloads[Podman Desktop for Windows, window="_blank"]
| **Java 17**
| `brew tap AdoptOpenJDK/openjdk && brew cask install adoptopenjdk17`
| `dnf install java-17-openjdk.x86_64`
| https://adoptopenjdk.net[Windows] (Make sure you set the `JAVA_HOME` environment variable and add `%JAVA_HOME%\bin` to your `PATH`)
| **Apache Maven 3.8.1+**
| **Java 21**
| `brew install --cask temurin@21`
| `dnf install java-21-openjdk.x86_64`
| https://adoptium.net[Windows] (Make sure you set the `JAVA_HOME` environment variable and add `%JAVA_HOME%\bin` to your `PATH`)
| **Apache Maven 3.8.6+**
| `brew install maven`
| `dnf install maven`
| https://maven.apache.org/download.cgi[Windows] (Make sure you set the `MAVEN_HOME` environment variable and add `%MAVEN_HOME%\bin` to your `PATH`)
| **Graal VM [Optional *]**
| **GraalVM [Optional *]**
| https://www.graalvm.org/latest/docs/getting-started/macos/[Download & install GraalVM for MacOS]
| https://www.graalvm.org/latest/docs/getting-started/linux/[Download & install GraalVM for Linux]
| https://www.graalvm.org/latest/docs/getting-started/windows/[Download & install GraalVM for Windows]
Expand All @@ -64,19 +64,19 @@ Please have them installed and configured before you get started with any of the
[TIP]
=====
If you are using Linux, MacOS or WSL on Windows you can also install the required tools using https://sdkman.io[SDKMAN!]. This allows easy version/distribution switching (and you can install the Quarkus CLI with it as well).
If you are using Linux, macOS or WSL on Windows, you can also install the required tools using https://sdkman.io[SDKMAN!]. This allows easy version/distribution switching (and you can install the Quarkus CLI with it as well).
Alternatively on Windows you can also try https://chocolatey.org/[Chocolatey] which works similarly.
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
.
sdk install java
sdk install java
sdk install maven
sdk install quarkus
sdk install java 17.0.8-graalce
sdk install jbang
sdk install java 21.0.3-tem
sdk install jbang
----
=====
--
Expand Down Expand Up @@ -129,7 +129,7 @@ Before we start setting up the environment, let's clone the tutorial sources and
[#cloneRepo]
[source,bash,subs="+macros,+attributes"]
----
git clone https://github.com/redhat-developer-demos/quarkus-tutorial
git clone https://github.com/redhat-developer-demos/quarkus-tutorial
----
The `work` folder in `$TUTORIAL_HOME` can be used to download the demo application resources and refer to them during the exercises. The `work` folder has a README with instructions on the source code repo and git commands to clone the sources.
Expand All @@ -145,7 +145,7 @@ This tutorial was developed and tested with:
- Minikube `{minikube-version}`
- OpenShift `{openshift-version}`
- Minishift `{minishift-version}`
- Graal VM `{graalvm-version}`
- GraalVM `{graalvm-version}`
====
ifndef::workshop[]
Expand Down Expand Up @@ -183,10 +183,10 @@ oc new-project {tutorial-namespace}
[NOTE]
====
On macOS, you might need to install hyperkit and pass it as the main engine adding `--vm-driver=hyperkit` after `--disk-size=50g`.
On macOS, you might need to install hyperkit and pass it as the main engine by adding `--vm-driver=hyperkit` after `--disk-size=50g`.
====
Prepare your shell environment
Prepare your shell environment:
[#quarkus-tutorial-shell-env]
[source,bash,subs="+macros,+attributes"]
Expand All @@ -196,47 +196,45 @@ export TUTORIAL_HOME=pass:[`pwd`]
export GRAALVM_HOME='PUT THE LOCATION WHERE YOU HAVE EXTRACTED GRAAL VM'
----
Prepare your shell environment:
It is not necessary to install GraalVM as the native compilation can be done within a container.
The only limitation, in this case, is to have Podman/Docker installed and the produced native executable will only be runnable inside a container.
GraalVM is already installed in `tutorial-tools`.
If you installed GraalVM, make sure to also install `native-image`
If you installed GraalVM, make sure to also install `native-image`
[#quarkus-tutorial-graalvm-native]
[source,bash,subs="+macros,+attributes"]
----
gu install native-image
----
[#quarkus-tutorial-shell-env]
[source,bash,subs="+macros,+attributes"]
----
cd quarkus-tutorial
export TUTORIAL_HOME=pass:[`pwd`]
export WORKSHOP_USER='PUT YOUR USERNAME HERE'
export GRAALVM_HOME='PUT THE LOCATION WHERE YOU HAVE EXTRACTED GRAAL VM'
export WORKSHOP_OPENSHIFT_SERVER='PUT THE OPENSHIFT SEVER URL HERE'
export GRAALVM_HOME='PUT THE LOCATION WHERE YOU HAVE EXTRACTED GRAAL VM'
export WORKSHOP_OPENSHIFT_SERVER='PUT THE OPENSHIFT SERVER URL HERE'
----
Login into OpenShift
Login into OpenShift:
[#quarkus-tutorial-oc-login]
[source,bash,subs="+macros,+attributes"]
----
oc login --username pass:[$WORKSHOP_USER] --server pass:[$WORKSHOP_OPENSHIFT_SERVER] --insecure-skip-tls-verify=false
----
ifdef::openshift-console-url[]
You can also access the Openshift Console via url {openshift-console-url}
You can also access the OpenShift Console via {openshift-console-url}.
endif::[]
IMPORTANT: If you are in `MAC OSX`, the variable should point to `Home` sub-directory: `export GRAALVM_HOME=$HOME/Development/graalvm/Contents/Home/`
IMPORTANT: If you are using macOS, the variable should point to `Home` sub-directory: `export GRAALVM_HOME=$HOME/Development/graalvm/Contents/Home/`
endif::workshop[]
[#setup-work-folder]
== Work folder (Optional)
The work folder i.e `$TUTORIAL_HOME/work` can be used as a work directory during the build.
The work folder i.e `$TUTORIAL_HOME/work` can be used as a work directory during the build.
////

0 comments on commit 8dfe2a9

Please sign in to comment.