Skip to content

Commit

Permalink
Merge pull request #16 from redhat-scholars/rhds67
Browse files Browse the repository at this point in the history
update rhds
  • Loading branch information
alexgroom authored Oct 3, 2024
2 parents 4f7db51 + e06fa2f commit 1ee8645
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 145 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- "rhds"
- "6.5"
- "6.7"
env:
SITE_DIR: "gh-pages"
jobs:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/app-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ image::config-psql-secret.png[Secrets as Env Vars,900]
== Test your Service (again)

Having made all those changes with adding databases and the application configuration you should now
test that the Coolstore application still works. Just like you did a couple of chapters ago you need to use the toplogy
test that the Coolstore application still works. Just like you did a couple of chapters ago you need to use the topology
display in the web console.

In the OpenShift Web Console, from the **Developer view**,
Expand Down
6 changes: 3 additions & 3 deletions documentation/modules/ROOT/pages/app-health.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ image::openshift-inventory-delete-pod.png[OpenShift Inventory Delete Pod, 700]
A new instance (pod) will be redeployed very quickly. Once deleted `*try to access your Inventory application test page*`.

However, imagine the _Inventory Service_ is stuck in a state (Stopped listening, Deadlock, etc)
where it cannot perform as it should. In this case, the pod will not immeditaely die, it will be in a zombie state.
where it cannot perform as it should. In this case, the pod will not immediately die, it will be in a zombie state.

To make your application more robust and reliable, a **Liveness check** will be used to check
if the container itself has become unresponsive. If the liveness probe fails due to a condition such as a deadlock,
Expand Down Expand Up @@ -206,7 +206,7 @@ Wait till the build is complete then, `*Delete the Inventory Pod*` to make it st
oc delete pod -l component=inventory
----

It will take a few seconds to retstart, then verify that the health endpoint works for the **Inventory Service** using `*curl*`
It will take a few seconds to restart, then verify that the health endpoint works for the **Inventory Service** using `*curl*`

In your Workspace,
`*execute the following commands in the terminal window*` - it may take a few attempts while the pod restarts.
Expand Down Expand Up @@ -384,7 +384,7 @@ image::openshift-catalog-edit-health.png[Che - Catalog Add Health Check, 700]
== Understanding Startup Probes

**Startup probes** are similar to liveness probes but only executed at startup.
When a startup probe is configured, the other probes are disabled until it suceeds.
When a startup probe is configured, the other probes are disabled until it succeeds.

Sometimes, some (legacy) applications might need extra times for their first initialization.
In such cases, setting a longer liveness internal might compromise the main benefit of this probe ie providing
Expand Down
6 changes: 3 additions & 3 deletions documentation/modules/ROOT/pages/catalog-spring-boot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ NOTE: To open a terminal window, `*click on 'Terminal' -> 'New Terminal'*`
--
====

Once done, you can conviently run your service using **Spring Boot maven plugin** and test the endpoint.
Once done, you can conveniently run your service using **Spring Boot maven plugin** and test the endpoint.

[tabs, subs="attributes+,+macros"]
====
Expand Down Expand Up @@ -342,8 +342,8 @@ This time the configuration for the Catalog application is present in its *pom.x
<artifactId>openshift-maven-plugin</artifactId>
<version>1.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<source>1.8</source>
<target>1.8</target>
<enricher>
<includes>
<include>jkube-openshift-deploymentconfig</include>
Expand Down
4 changes: 2 additions & 2 deletions documentation/modules/ROOT/pages/developer-workspace.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ image::openshift-empty-project.png[OpenShift - Empty Project, 700]
[#what_is_codeready_workspaces]
== What is Red Hat OpenShift Dev Spaces?

.Red Hat OpenShift DevSpaces
.Red Hat OpenShift Dev Spaces
****
[window=_blank, align="center"]
https://access.redhat.com/products/red-hat-openshift-dev-spaces[OpenShift Dev Spaces^] is a Kubernetes-native IDE and developer collaboration platform.
Expand Down Expand Up @@ -95,7 +95,7 @@ to this file.

[window=_blank, align="center"]
[role='params-link']
image::launch-crw.png[Launch Dev Spaces, 300]
image::developer-workspace-button.png[Developer Workspace - Button, 300]

Then `*Click 'Log in with OpenShift'*`

Expand Down
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Monitor its health.

Discover OpenShift service resilience, scale and fault tolerance.

Finally utilise external configuration to leverage OpenShift database access.
Finally utilize external configuration to leverage OpenShift database access.

=== Audience

Expand Down
4 changes: 2 additions & 2 deletions documentation/modules/ROOT/pages/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ During the various steps of the the workshop you will use OpenShift Dev Spaces,
* **Catalog Service** exposes using a REST API content of a catalog stored in a relational database
* **Inventory Service** exposes using a REST API the inventory stored in a relational database
* **Gateway Service** calls the **Catalog Service** and **Inventory Service** in an efficient way
* **WebUI Service** calls **Gateway Service** to retrieve all the informations.
* **WebUI Service** calls **Gateway Service** to retrieve all the information.
The outcome is an online store with a catalog of product items and an inventory of stock:

image::coolstore-web.png[CoolStore Shop,840]

In addition to the application code, you will learn how to deploy the various services to OpenShift and how to use it to route the trafic to these services and monitor them.
In addition to the application code, you will learn how to deploy the various services to OpenShift and how to use it to route the traffic to these services and monitor them.

You will also have the opportunity to look at probes and externalized configuration.

Expand Down
40 changes: 27 additions & 13 deletions documentation/modules/ROOT/pages/inventory-quarkus.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,28 @@ Your browser will be directed to **your Inventory Service running inside your Wo

image::che-quarkus-preview.png[Che - Quarkus Preview, 500]

[NOTE]
If the Quarkus app is unavailable then you need to be patient, the app hasn't quite launched yet to handle the
request. `*Click on the browser Refresh icon`* to try again. If it still fails see the section below.


=== Fix up the Browser URL

If you are still seeing the following result in the browser window then its likely your (Chromium)
browser is upgrading the simple *http://* based URL to *https* - but the inventory app doesn't support that.

image::inventory-quarkus-url-unavailable.png[Che - Preview Not Available, 600]

To fix this you need to `*click in the URL bar*` in the browser

image::inventory-quarkus-edit-url.png[Che - Preview Not Available, 600]
and `*remove that "s"*` making it *Not Secure* - like this:

image::inventory-quarkus-edited-url.png[Che - Preview Not Available, 600]

[TIP]
====
If you see the following result in the browser window you may just be too early, please `*click on the browser Refresh icon`*,
image::che-preview-na.png[Che - Preview Not Available, 500]
You will need to do this with all your application URLs, but fortunately the browser quickly remembers.
====

[NOTE]
Expand All @@ -239,7 +256,9 @@ If by accident you close that browser tab then you should be able to reopen it f
It will likely be called *Inventory Service*
====

`*Modify the 'src/main/resources/META-INF/resources/index.html' file*` as follows
=== Now Make a Code Change

So now back in the Dev Spaces IDE `*modify the 'src/main/resources/META-INF/resources/index.html' file*` as follows

[source,html,role=copypaste]
----
Expand All @@ -258,14 +277,14 @@ It will likely be called *Inventory Service*
<body>
<div class="jumbotron">
<div class="container">
<h1 class="display-3"><img src="https://camo.githubusercontent.com/be1e4ea465298c7e05b1378ff38d463cfef120a3/68747470733a2f2f64657369676e2e6a626f73732e6f72672f717561726b75732f6c6f676f2f66696e616c2f504e472f717561726b75735f6c6f676f5f686f72697a6f6e74616c5f7267625f3132383070785f64656661756c742e706e67" alt="Quarkus" width="400"> Inventory Service</h1>
<h1 class="display-3"><img src="quarkus_icon_512px_default.png" alt="Quarkus" width="100"> Inventory Service</h1>
<p>This is a Quarkus Microservice for the CoolStore Demo. (<a href="/api/inventory/329299">Test it</a>)
</p>
</div>
</div>
<div class="container">
<footer>
<p>&copy; Red Hat 2020</p>
<p>&copy; Red Hat 2024</p>
</footer>
</div>
</body>
Expand Down Expand Up @@ -352,9 +371,7 @@ quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.sql-load-script=import.sql
quarkus.http.host=0.0.0.0
%prod.quarkus.package.type=uber-jar#<1>
# these value are required for a quarkus openshift plugin build<2>
# these value are required for a quarkus openshift plugin build<1>
%prod.quarkus.openshift.route.expose=true
%prod.quarkus.openshift.deployment-kind=Deployment
%prod.quarkus.openshift.labels.app=coolstore
Expand All @@ -367,10 +384,7 @@ quarkus.http.host=0.0.0.0
%prod.quarkus.openshift.labels."app.kubernetes.io/instance"=inventory
----
<1> An **uber-jar** contains all the dependencies required packaged in the **jar** to enable running the
application with **java -jar**. By default, in Quarkus, the generation of the uber-jar is disabled. With the
**%prod** prefix, this option is only activated when building the jar intended for deployments.
<2> There is a lot of additional configuration here to allow the quarkus-maven-plugin to build
<1> There is a lot of additional configuration here to allow the quarkus-maven-plugin to build
and then deploy this application to OpenShift - but more of that later

`*Update the 'src/main/resources/import.sql' file`* as follows:
Expand Down
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/webui-deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ image::openshift-add-http-route.png[OpenShift - Add route, 600]

`*Click on 'Create' button*`

Now wait a few minutes for the application to built by OpenShift and deployed to your project. In the toplogy view,
Now wait a few minutes for the application to built by OpenShift and deployed to your project. In the topology view,
the web application pod will not be ready until the blue ring goes dark blue.

[#test_your_service]
Expand Down
2 changes: 1 addition & 1 deletion site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ content:
sources:
- url: git@github.com:redhat-scholars/inner-loop-guide.git
tags: []
branches: ["rhds"]
branches: ["rhds", "6.5", "6.7"]
start_path: documentation

asciidoc:
Expand Down

0 comments on commit 1ee8645

Please sign in to comment.