Skip to content

Commit 784d453

Browse files
authored
Merge pull request #133 from redhat-developer-demos/win
Make tutorial more Windows friendly
2 parents 4e1e25c + 97cb7f6 commit 784d453

12 files changed

Lines changed: 28 additions & 33 deletions

File tree

99.5 KB
Loading

documentation/modules/ROOT/pages/dev-services.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Maven::
265265
[.console-input]
266266
[source,bash,subs="+macros,+attributes"]
267267
----
268-
./mvnw clean package -DskipTests -Dquarkus.container-image.push=true
268+
./mvnw clean package -DskipTests -D"quarkus.container-image.push=true"
269269
----
270270
271271
--

documentation/modules/ROOT/pages/fault-tolerance.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Maven::
1414
[.console-input]
1515
[source,bash,subs="+macros,+attributes"]
1616
----
17-
./mvnw quarkus:add-extension -Dextensions=quarkus-smallrye-fault-tolerance
17+
./mvnw quarkus:add-extension -D"extensions=quarkus-smallrye-fault-tolerance"
1818
----
1919
2020
--

documentation/modules/ROOT/pages/health.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Maven::
2020
[.console-input]
2121
[source,bash,subs="+macros,+attributes"]
2222
----
23-
./mvnw quarkus:add-extension -Dextension=quarkus-smallrye-health
23+
./mvnw quarkus:add-extension -D"extension=quarkus-smallrye-health"
2424
----
2525
2626
--

documentation/modules/ROOT/pages/kubernetes.adoc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Maven::
2525
[.console-input]
2626
[source,bash,subs="+macros,+attributes"]
2727
----
28-
./mvnw quarkus:add-extension -Dextensions=quarkus-kubernetes,quarkus-container-image-jib
28+
./mvnw quarkus:add-extension -Dextensions="quarkus-kubernetes,quarkus-container-image-jib"
2929
----
3030
3131
--
@@ -90,7 +90,7 @@ Maven::
9090
[.console-input]
9191
[source,bash,subs="+macros,+attributes"]
9292
----
93-
./mvnw clean package -DskipTests -Dquarkus.container-image.push=true -Dquarkus.container-image.builder=jib
93+
./mvnw quarkus:build -DskipTests -D"quarkus.container-image.push=true" -D"quarkus.container-image.builder=jib"
9494
----
9595
9696
--
@@ -100,12 +100,12 @@ Quarkus CLI::
100100
[.console-input]
101101
[source,bash,subs="+macros,+attributes"]
102102
----
103-
quarkus image build jib --no-tests -Dquarkus.container-image.push=true
103+
quarkus image build jib --no-tests -D"quarkus.container-image.push=true"
104104
----
105105
--
106106
====
107107

108-
NOTE: You can also use Docker/Podman to build & push. To do so, just omit 'jib' from the command.
108+
NOTE: If you're having trouble with jib, you can also just use Docker/Podman to build & push. To do so, omit 'jib' from the command.
109109

110110
[.console-output]
111111
[source,text]
@@ -129,7 +129,7 @@ NOTE: You can also use Docker/Podman to build & push. To do so, just omit 'jib'
129129

130130
When a Kubernetes extension is present in the classpath, Quarkus will scaffold a Kubernetes deployment file in your target folder during the package phase. We can apply it to deploy the application to our Kubernetes cluster:
131131

132-
NOTE: You will need the https://kubernetes.io/docs/tasks/tools/[kubectl] or oc cli tool installed locally for the apply command below. https://developers.redhat.com/blog/2021/04/21/access-your-developer-sandbox-for-red-hat-openshift-from-the-command-line#[Here are instructions] to install the oc tool and log in to your Openshift Sandbox.
132+
NOTE: You will need the https://kubernetes.io/docs/tasks/tools/[kubectl] or oc cli tool installed locally for the apply command below. https://developers.redhat.com/blog/2021/04/21/access-your-developer-sandbox-for-red-hat-openshift-from-the-command-line#[Here are instructions] to install the oc tool and log in to your Openshift Sandbox. Hint: your favorite package manager (dnf/brew/choco) can likely be used for the installation. Eg. `dnf install kubectl` or `choco install kubernetes-client` or `choco install openshift-client`
133133

134134
[tabs]
135135
====
@@ -156,22 +156,20 @@ oc apply -f target/kubernetes/kubernetes.yml
156156
[.console-output]
157157
[source,text]
158158
----
159-
serviceaccount/tutorial-app created
160159
service/tutorial-app created
161160
deployment.apps/tutorial-app created
162161
----
163162

164-
[TIP]
165-
=====
163+
166164
With the Quarkus CLI tool deploying is even easier. Instead of the above `kubectl apply` command, you can simply run `quarkus deploy` to deploy the application to your cluster:
167165
[.console-input]
168166
[source,bash,subs="+macros,+attributes"]
169167
----
170168
quarkus deploy
171169
----
172-
=====
173170

174-
You might need to wait a few seconds until your application is up and running. Once it is, let's get the url to test:
171+
172+
After the command has finished, you might need to wait a few more seconds until your application is up and running. Once it is, let's get the url to test. (command prompt and powershell users will need to tweak these commands a little bit)
175173

176174

177175
[tabs]
@@ -239,6 +237,11 @@ curl $IP:$PORT/hello
239237
Hello y'all!
240238
----
241239

240+
If you're using the Openshift Sandbox UI, you can also find the application running in the "Topology" view as seen in the screenshot below:
241+
242+
[.mt-4.center]
243+
image::Openshift.png[Openshift,400,400,align="center"]
244+
242245
[sidebar]
243246
--
244247
TIP: If you're using Openshift (Sandbox) and would like to create a url you can share to the outside world, you can create it like so:

documentation/modules/ROOT/pages/metrics.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Maven::
1616
[.console-input]
1717
[source,bash,subs="+macros,+attributes"]
1818
----
19-
./mvnw quarkus:add-extension -Dextensions=quarkus-micrometer
19+
./mvnw quarkus:add-extension -D"extensions=quarkus-micrometer"
2020
----
2121
2222
--
@@ -41,7 +41,7 @@ Maven::
4141
[.console-input]
4242
[source,bash,subs="+macros,+attributes"]
4343
----
44-
./mvnw quarkus:add-extension -Dextensions=quarkus-micrometer-registry-prometheus
44+
./mvnw quarkus:add-extension -D"extensions=quarkus-micrometer-registry-prometheus"
4545
----
4646
4747
--

documentation/modules/ROOT/pages/panache.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Now you can insert a new fruit by using `curl`:
203203
[.console-input]
204204
[source,bash]
205205
----
206-
curl -d '{"name": "Banana", "season": "Summer"}' -H "Content-Type: application/json" http://localhost:8080/fruit
206+
curl -d "{\"name\": \"Banana\", \"season\": \"Summer\"}" -H "Content-Type: application/json" http://localhost:8080/fruit
207207
----
208208

209209
[.console-output]

documentation/modules/ROOT/pages/rest-client.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Maven::
3737
[.console-input]
3838
[source,bash,subs="+macros,+attributes"]
3939
----
40-
./mvnw quarkus:add-extension -Dextensions=quarkus-rest-client-reactive,quarkus-rest-client-reactive-jsonb
40+
./mvnw quarkus:add-extension -D"extensions=quarkus-rest-client-reactive,quarkus-rest-client-reactive-jsonb"
4141
----
4242
4343
--

documentation/modules/ROOT/pages/security-oidc.adoc

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Maven::
1919
[.console-input]
2020
[source,bash,subs="+macros,+attributes"]
2121
----
22-
./mvnw quarkus:add-extension -Dextensions=quarkus-oidc,quarkus-keycloak-authorization
22+
./mvnw quarkus:add-extension -D"extensions=quarkus-oidc,quarkus-keycloak-authorization"
2323
----
2424
2525
--
@@ -114,12 +114,7 @@ First you need a token valid to authenticate. Run the following command to obtai
114114
[.console-input]
115115
[source,bash]
116116
----
117-
curl -X POST 'http://localhost:34000/realms/quarkus/protocol/openid-connect/token' \
118-
-H 'Content-Type: application/x-www-form-urlencoded' \
119-
-d 'username=jdoe' \
120-
-d 'password=jdoepass' \
121-
-d 'grant_type=password' \
122-
-d 'client_id=admin-cli'
117+
curl -X POST "http://localhost:34000/realms/quarkus/protocol/openid-connect/token" -H "Content-Type: application/x-www-form-urlencoded" -d "username=jdoe" -d "password=jdoepass" -d "grant_type=password" -d "client_id=admin-cli"
123118
----
124119
[IMPORTANT]
125120
--
@@ -139,11 +134,7 @@ Below you can find details on how to do that using `curl` and `jq`:
139134
[.console-input]
140135
[source,bash]
141136
----
142-
token=$(curl -X POST 'http://localhost:34000/realms/quarkus/protocol/openid-connect/token' \
143-
-H 'Content-Type: application/x-www-form-urlencoded' \
144-
-d 'username=jdoe' \
145-
-d 'password=jdoepass' \
146-
-d 'grant_type=password' | jq -r '.access_token')
137+
token=$(curl -X POST "http://localhost:34000/realms/quarkus/protocol/openid-connect/token" -H "Content-Type: application/x-www-form-urlencoded" -d "username=jdoe" -d "password=jdoepass" -d "grant_type=password" | jq -r ".access_token")
147138
148139
curl -H "Authorization: Bearer $token" localhost:8080/api/users/info
149140
----

documentation/modules/ROOT/pages/security.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Maven::
1919
[.console-input]
2020
[source,bash,subs="+macros,+attributes"]
2121
----
22-
./mvnw quarkus:add-extension -Dextension=quarkus-smallrye-jwt
22+
./mvnw quarkus:add-extension -D"extension=quarkus-smallrye-jwt"
2323
----
2424
2525
--
@@ -118,7 +118,7 @@ public class SecureResource {
118118

119119
== Invoke the /secure/claim endpoint
120120

121-
Run the following command:
121+
Run the following command in a bash shell:
122122

123123
[.console-input]
124124
[source,bash]

0 commit comments

Comments
 (0)