Skip to content

Commit d82bcdc

Browse files
committed
Merge branch 'master' of github.com:redhat-developer-demos/quarkus-tutorial
2 parents edfe2ed + 4fa54b6 commit d82bcdc

7 files changed

Lines changed: 40 additions & 44 deletions

File tree

documentation/modules/ROOT/pages/01_setup.adoc

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ endif::workshop[]
2424

2525
[TIP]
2626
====
27-
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.
27+
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.
2828
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.
2929
====
3030

31-
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.
31+
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.
3232

3333

3434
[tabs]
@@ -47,15 +47,15 @@ Please have them installed and configured before you get started with any of the
4747
| https://podman-desktop.io/downloads[Podman Desktop for Mac, window="_blank"]
4848
| https://podman-desktop.io/downloads[Podman Desktop for Linux, window="_blank"]
4949
| https://podman-desktop.io/downloads[Podman Desktop for Windows, window="_blank"]
50-
| **Java 17**
51-
| `brew tap AdoptOpenJDK/openjdk && brew cask install adoptopenjdk17`
52-
| `dnf install java-17-openjdk.x86_64`
53-
| https://adoptopenjdk.net[Windows] (Make sure you set the `JAVA_HOME` environment variable and add `%JAVA_HOME%\bin` to your `PATH`)
54-
| **Apache Maven 3.8.1+**
50+
| **Java 21**
51+
| `brew install --cask temurin@21`
52+
| `dnf install java-21-openjdk.x86_64`
53+
| https://adoptium.net[Windows] (Make sure you set the `JAVA_HOME` environment variable and add `%JAVA_HOME%\bin` to your `PATH`)
54+
| **Apache Maven 3.8.6+**
5555
| `brew install maven`
5656
| `dnf install maven`
5757
| https://maven.apache.org/download.cgi[Windows] (Make sure you set the `MAVEN_HOME` environment variable and add `%MAVEN_HOME%\bin` to your `PATH`)
58-
| **Graal VM [Optional *]**
58+
| **GraalVM [Optional *]**
5959
| https://www.graalvm.org/latest/docs/getting-started/macos/[Download & install GraalVM for MacOS]
6060
| https://www.graalvm.org/latest/docs/getting-started/linux/[Download & install GraalVM for Linux]
6161
| https://www.graalvm.org/latest/docs/getting-started/windows/[Download & install GraalVM for Windows]
@@ -64,19 +64,19 @@ Please have them installed and configured before you get started with any of the
6464
6565
[TIP]
6666
=====
67-
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).
67+
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).
6868
Alternatively on Windows you can also try https://chocolatey.org/[Chocolatey] which works similarly.
6969
[.console-input]
7070
[source,bash,subs="+macros,+attributes"]
7171
----
7272
curl -s "https://get.sdkman.io" | bash
7373
source "$HOME/.sdkman/bin/sdkman-init.sh"
7474
.
75-
sdk install java
75+
sdk install java
7676
sdk install maven
7777
sdk install quarkus
78-
sdk install java 17.0.8-graalce
79-
sdk install jbang
78+
sdk install java 21.0.3-tem
79+
sdk install jbang
8080
----
8181
=====
8282
--
@@ -129,7 +129,7 @@ Before we start setting up the environment, let's clone the tutorial sources and
129129
[#cloneRepo]
130130
[source,bash,subs="+macros,+attributes"]
131131
----
132-
git clone https://github.com/redhat-developer-demos/quarkus-tutorial
132+
git clone https://github.com/redhat-developer-demos/quarkus-tutorial
133133
----
134134
135135
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.
@@ -145,7 +145,7 @@ This tutorial was developed and tested with:
145145
- Minikube `{minikube-version}`
146146
- OpenShift `{openshift-version}`
147147
- Minishift `{minishift-version}`
148-
- Graal VM `{graalvm-version}`
148+
- GraalVM `{graalvm-version}`
149149
====
150150
151151
ifndef::workshop[]
@@ -183,10 +183,10 @@ oc new-project {tutorial-namespace}
183183
184184
[NOTE]
185185
====
186-
On macOS, you might need to install hyperkit and pass it as the main engine adding `--vm-driver=hyperkit` after `--disk-size=50g`.
186+
On macOS, you might need to install hyperkit and pass it as the main engine by adding `--vm-driver=hyperkit` after `--disk-size=50g`.
187187
====
188188
189-
Prepare your shell environment
189+
Prepare your shell environment:
190190
191191
[#quarkus-tutorial-shell-env]
192192
[source,bash,subs="+macros,+attributes"]
@@ -196,47 +196,45 @@ export TUTORIAL_HOME=pass:[`pwd`]
196196
export GRAALVM_HOME='PUT THE LOCATION WHERE YOU HAVE EXTRACTED GRAAL VM'
197197
----
198198
199-
Prepare your shell environment:
200-
201199
It is not necessary to install GraalVM as the native compilation can be done within a container.
202200
The only limitation, in this case, is to have Podman/Docker installed and the produced native executable will only be runnable inside a container.
203201
GraalVM is already installed in `tutorial-tools`.
204202
205-
If you installed GraalVM, make sure to also install `native-image`
203+
If you installed GraalVM, make sure to also install `native-image`
206204
207205
[#quarkus-tutorial-graalvm-native]
208206
[source,bash,subs="+macros,+attributes"]
209207
----
210208
gu install native-image
211209
----
212210
213-
214211
[#quarkus-tutorial-shell-env]
215212
[source,bash,subs="+macros,+attributes"]
216213
----
217214
cd quarkus-tutorial
218215
export TUTORIAL_HOME=pass:[`pwd`]
219216
export WORKSHOP_USER='PUT YOUR USERNAME HERE'
220-
export GRAALVM_HOME='PUT THE LOCATION WHERE YOU HAVE EXTRACTED GRAAL VM'
221-
export WORKSHOP_OPENSHIFT_SERVER='PUT THE OPENSHIFT SEVER URL HERE'
217+
export GRAALVM_HOME='PUT THE LOCATION WHERE YOU HAVE EXTRACTED GRAAL VM'
218+
export WORKSHOP_OPENSHIFT_SERVER='PUT THE OPENSHIFT SERVER URL HERE'
222219
----
223220
224-
Login into OpenShift
221+
Login into OpenShift:
222+
225223
[#quarkus-tutorial-oc-login]
226224
[source,bash,subs="+macros,+attributes"]
227225
----
228226
oc login --username pass:[$WORKSHOP_USER] --server pass:[$WORKSHOP_OPENSHIFT_SERVER] --insecure-skip-tls-verify=false
229227
----
230228
231229
ifdef::openshift-console-url[]
232-
You can also access the Openshift Console via url {openshift-console-url}
230+
You can also access the OpenShift Console via {openshift-console-url}.
233231
endif::[]
234232
235-
IMPORTANT: If you are in `MAC OSX`, the variable should point to `Home` sub-directory: `export GRAALVM_HOME=$HOME/Development/graalvm/Contents/Home/`
233+
IMPORTANT: If you are using macOS, the variable should point to `Home` sub-directory: `export GRAALVM_HOME=$HOME/Development/graalvm/Contents/Home/`
236234
endif::workshop[]
237235
238236
[#setup-work-folder]
239237
== Work folder (Optional)
240238
241-
The work folder i.e `$TUTORIAL_HOME/work` can be used as a work directory during the build.
239+
The work folder i.e `$TUTORIAL_HOME/work` can be used as a work directory during the build.
242240
////

documentation/modules/ROOT/pages/02_basics.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The scaffolding process also creates a test case for the example endpoint.
7676

7777
Check the file `GreetingResourceTest.java` in the folder `src/test/java` to see what a Quarkus integration test looks like.
7878

79-
When running this test, the application is started once, then all tests are executed, and finally, the application stops. Although it is not mandatory, by default the RestAssured project is used to test Rest endpoints but it is up to you to change that.
79+
When running this test, the application is started once, then all tests are executed, and finally, the application stops. Although it is not mandatory, by default the RestAssured project is used to test REST endpoints but it is up to you to change that.
8080

8181
You can run the test in your IDE or by running the following:
8282

@@ -101,15 +101,15 @@ Quarkus CLI::
101101
quarkus test
102102
----
103103
104-
NOTE: `quarkus test` starts tests in continuous testing mode (more about this below) so to return to the command line after the tests ran you will need to press (q)
104+
NOTE: `quarkus test` starts tests in continuous testing mode (more about this below) so to return to the command line after the tests ran you will need to press `q`.
105105
--
106106
====
107107

108108
== Open the Project in your IDE
109109

110110
Open or import the generated project into your IDE.
111111

112-
If you are using **vscode** you can open the project with:
112+
If you are using VS Code, you can open the project with:
113113

114114
[.console-input]
115115
[source,bash,subs="+macros,+attributes"]
@@ -121,13 +121,13 @@ NOTE: If you use `tutorial-tools`, your host `quarkus-tutorial/work` contains th
121121

122122
== Live Coding (Development mode)
123123

124-
Stop the Quarkus application that might be running in `jvm` or `native` mode.
124+
Stop the Quarkus application that might be running in JVM or native mode.
125125

126126
_Live Coding_ or _Development mode_ enables hot deployment with background compilation, which means that when you modify your Java files and/or your resource files and refresh your browser, these changes will automatically take effect.
127127

128128
This is probably one of the best features of Quarkus: enabling a very fast and productive iterative feedback loop.
129129

130-
Let's start the _Live Coding_ mode by invoking `mvn`. You probably won't need to stop/start Quarkus again during this tutorial:
130+
Let's start the _Live Coding_ mode by using the `dev` command. You probably won't need to stop/start Quarkus again during this tutorial:
131131

132132
[tabs%sync]
133133
====
@@ -182,6 +182,6 @@ Press `r` and the tests will start running. You should see the status change dow
182182
All 1 test is passing (0 skipped), 1 test was run in 11705ms. Tests completed at 16:02:32.
183183
----
184184

185-
TIP: If you don’t want to have continuous testing enabled, you can change this by adding `quarkus.test.continuous-testing=disabled` in `application.properties`.
185+
TIP: If you don’t want to have continuous testing enabled, you can change this by adding `quarkus.test.continuous-testing=disabled` to your `src/main/resources/application.properties`.
186186

187-
You can find more details about controlling continuous testing in https://quarkus.io/guides/continuous-testing#controlling-continuous-testing[this guide].
187+
You can find more details about controlling continuous testing in https://quarkus.io/guides/continuous-testing#controlling-continuous-testing[this guide].

documentation/modules/ROOT/pages/03_configuration.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
= Configuration
22

3-
:project-name: fruits-app
4-
53
Hardcoded values in your code is a no go, so let's see how to add configuration to your application.
64
Quarkus relies on the MicroProfile Config specification and the main configuration file is `application.properties`.
75

@@ -121,9 +119,9 @@ public class GreetingResourceTest {
121119
}
122120
----
123121

124-
NOTE: If you're still running in live testing mode you will already see that the tests pass again and you can ignore the rest of this page and move on to the next step.
122+
NOTE: If you're still running in continuous testing mode, you will already see that the tests pass again and you can ignore the rest of this page and move on to the next step.
125123

126-
Stop your current Live Coding session of Quarkus in the terminal by sending a `CTRL+C`:
124+
Stop your current Live Coding session of Quarkus in the terminal by sending a `Ctrl+C`:
127125

128126

129127

documentation/modules/ROOT/pages/04_panache.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[#quarkusp-demo-overview]
66
== Demo Overview
77

8-
You'll learn how easy and productive is Quarkus with Hibernate with Panache. For this, we'll develop a simple CRUD REST API that handles information about fruits.
8+
You'll learn how easy and productive Quarkus is with Hibernate with Panache. For this, we'll develop a simple CRUD REST API that handles information about fruits.
99

1010
We'll use http://www.h2database.com[H2,window="_blank"] as our backing database in this section, but it's very easy to use other database engines with Quarkus as you will see in the Dev Services chapter. As an exercise for later, we suggest to try your favorite database engine with the documentation found https://quarkus.io/guides/datasource[here,window="_blank"].
1111
@@ -57,7 +57,7 @@ quarkus extension add rest-jsonb jdbc-h2 hibernate-orm-panache smallrye-openapi
5757
[INFO] ------------------------------------------------------------------------
5858
----
5959
60-
You'll notice that by running this command the Quarkus maven plugin added some dependencies to your `pom.xml` file. And best of all: Quarkus will autodetect and apply the changes, and you don't even need to restart Quarkus!
60+
You'll notice that by running this command the Quarkus Maven plugin added some dependencies to your `pom.xml` file. And best of all: Quarkus will autodetect and apply the changes, and you don't even need to restart Quarkus!
6161
6262
== Adding database properties to your configuration
6363
@@ -75,7 +75,7 @@ quarkus.datasource.db-kind=h2
7575
quarkus.hibernate-orm.database.generation=drop-and-create
7676
----
7777
78-
NOTE: With <<Dev Services>> enabled, no JDBC URL needs to be provided in Dev Mode. In this case, we input the URL to ensure consistency across all application run modes.
78+
NOTE: With <<Dev Services>> enabled, no JDBC URL needs to be provided in dev mode. In this case, we input the URL to ensure consistency across all application run modes.
7979
8080
== Create Fruit Entity
8181
@@ -139,7 +139,7 @@ public class FruitResource {
139139
}
140140
----
141141

142-
Now we should everything in place to query our *GET* REST endpoint:
142+
Now we should have everything in place to query our *GET* REST endpoint:
143143

144144
[.console-input]
145145
[source,bash]

documentation/modules/ROOT/pages/08_rest-client.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= REST Client
22

3-
An atypical scenario in a Microservices architecture is the remote invocation of remote REST HTTP endpoints. Quarkus provides a typed REST client that follows the https://github.com/eclipse/microprofile-rest-client[MicroProfile REST Client, window=_blank] specification.
3+
A typical scenario in a Microservices architecture is the remote invocation of remote REST HTTP endpoints. Quarkus provides a typed REST client that follows the https://github.com/eclipse/microprofile-rest-client[MicroProfile REST Client, window=_blank] specification.
44
55
Let's create a REST client that accesses https://fruityvice.com[window=_blank] to get nutrition information about our fruits. The endpoint we're interested in is this one:
66

documentation/modules/ROOT/pages/09_fault-tolerance.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public interface FruityViceService {
240240
Now, if 3 (4 x 0.75) failures occur among the rolling window of 4 consecutive invocations, then the circuit is opened for 5000 ms and then will be back to half open.
241241
If the invocation succeeds, then the circuit is back to closed again.
242242

243-
Run the following command at least 5 times:
243+
Run the following command at least 5 times (without network connectivity):
244244

245245
[.console-input]
246246
[source,bash]

documentation/modules/ROOT/pages/12_security.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ We are providing a valid token that can be verified by the configured public key
8888

8989
You can inject any defined claim into an object by using `@Claim` annotation:
9090

91-
Change the `SecureResource` Java class in `src/main/java` in the `com.redhat.developers` package with the following contents:
91+
Create the `SecureResource` Java class in `src/main/java` in the `com.redhat.developers` package with the following contents:
9292

9393
[.console-input]
9494
[source,java]

0 commit comments

Comments
 (0)