Skip to content

Commit 9edba5c

Browse files
authored
Merge pull request #161 from OpenLiberty/staging
Merge staging to prod - Update the curl instructions (#160)
2 parents aafd6eb + d5f32b2 commit 9edba5c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.adoc

+15-15
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@ ifdef::cloud-hosted[]
8989
Open another command-line session by selecting **Terminal** > **New Terminal** from the menu of the IDE.
9090
To access the **system** service, run the following curl command:
9191
```
92-
curl http://localhost:9080/system/properties
92+
curl -s http://localhost:9080/system/properties | jq
9393
```
9494
{: codeblock}
9595

9696
To access the **inventory** service, run the following curl command:
9797
```
98-
curl http://localhost:9080/inventory/systems
98+
curl -s http://localhost:9080/inventory/systems | jq
9999
```
100100
{: codeblock}
101101

102102
Visit the http://localhost:9080/health URL to see the
103103
overall health status of the application, as well as the aggregated data of the liveness
104104
and readiness checks. Run the following curl command:
105105
```
106-
curl http://localhost:9080/health
106+
curl -s http://localhost:9080/health | jq
107107
```
108108
{: codeblock}
109109

@@ -114,14 +114,14 @@ checks show the state of the **inventory** service. As you might expect, both se
114114
You can also access the **/health/ready** endpoint by visiting the http://localhost:9080/health/ready
115115
URL to view the data from the readiness health checks. Run the following curl command:
116116
```
117-
curl http://localhost:9080/health/ready
117+
curl -s http://localhost:9080/health/ready | jq
118118
```
119119
{: codeblock}
120120

121121
Similarly, access the **/health/live** endpoint by visiting the http://localhost:9080/health/live
122122
URL to view the data from the liveness health checks. Run the following curl command:
123123
```
124-
curl http://localhost:9080/health/live
124+
curl -s http://localhost:9080/health/live | jq
125125
```
126126
{: codeblock}
127127
endif::[]
@@ -183,7 +183,7 @@ include::finish/src/main/liberty/config/server.xml[]
183183
----
184184

185185
SystemReadinessCheck.java
186-
[source, java, linenums, role='code_column hide_tags=copyright tags=SystemReadinessCheck']
186+
[source, java, linenums, role='code_column tags=SystemReadinessCheck hide_tags=copyright']
187187
----
188188
include::finish/src/main/java/io/openliberty/guides/system/SystemReadinessCheck.java[]
189189
----
@@ -220,7 +220,7 @@ health checks.
220220
----
221221

222222
SystemLivenessCheck.java
223-
[source, java, linenums, role='code_column hide_tags=copyright tags=SystemLivenessCheck']
223+
[source, java, linenums, role='code_column tags=SystemLivenessCheck hide_tags=copyright']
224224
----
225225
include::finish/src/main/java/io/openliberty/guides/system/SystemLivenessCheck.java[]
226226
----
@@ -242,7 +242,7 @@ is being used, a status of `DOWN` is returned.
242242
----
243243

244244
InventoryReadinessCheck.java
245-
[source, java, linenums, role='code_column hide_tags=copyright tags=InventoryReadinessCheck']
245+
[source, java, linenums, role='code_column tags=InventoryReadinessCheck hide_tags=copyright']
246246
----
247247
include::finish/src/main/java/io/openliberty/guides/inventory/InventoryReadinessCheck.java[]
248248
----
@@ -270,7 +270,7 @@ https://openliberty.io/guides/microprofile-config.html[Configuring microservices
270270
----
271271

272272
InventoryLivenessCheck.java
273-
[source, java, linenums, role='code_column hide_tags=copyright tags=InventoryLivenessCheck']
273+
[source, java, linenums, role='code_column tags=InventoryLivenessCheck hide_tags=copyright']
274274
----
275275
include::finish/src/main/java/io/openliberty/guides/inventory/InventoryLivenessCheck.java[]
276276
----
@@ -315,19 +315,19 @@ ifdef::cloud-hosted[]
315315
While the server is running, run the following curl command to find
316316
the aggregated liveness and readiness health reports on the two services:
317317
```
318-
curl http://localhost:9080/health
318+
curl -s http://localhost:9080/health | jq
319319
```
320320
{: codeblock}
321321

322322
You can also run the following curl command to view the readiness health report:
323323
```
324-
curl http://localhost:9080/health/ready
324+
curl -s http://localhost:9080/health/ready | jq
325325
```
326326
{: codeblock}
327327

328328
or run the following curl command to view the liveness health report:
329329
```
330-
curl http://localhost:9080/health/live
330+
curl -s http://localhost:9080/health/live | jq
331331
```
332332
{: codeblock}
333333

@@ -348,14 +348,14 @@ property to **true** in the **resources/CustomConfigSource.json** file.
348348
Because this configuration file is picked up dynamically, simply refresh the http://localhost:9080/health
349349
URL to see that the state of the **inventory** service changed to **DOWN**. Run the following curl command:
350350
```
351-
curl http://localhost:9080/health
351+
curl -s http://localhost:9080/health | jq
352352
```
353353
{: codeblock}
354354

355355
The overall state of the application also changed to **DOWN** as a result. Run the following curl command
356356
to verify that the **inventory** service is indeed in maintenance:
357357
```
358-
curl http://localhost:9080/inventory/systems
358+
curl -s http://localhost:9080/inventory/systems | jq
359359
```
360360
{: codeblock}
361361

@@ -395,7 +395,7 @@ You will implement several test methods to validate the health of the `system` a
395395
----
396396

397397
HealthIT.java
398-
[source, java, linenums, role='code_column hide_tags=copyright tags=HealthIT']
398+
[source, java, linenums, role='code_column tags=HealthIT hide_tags=copyright']
399399
----
400400
include::finish/src/test/java/it/io/openliberty/guides/health/HealthIT.java[]
401401
----

0 commit comments

Comments
 (0)