Skip to content

Commit d89d10d

Browse files
author
Matt Raible
committed
Updates after QA
1 parent b94ed02 commit d89d10d

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

reactive-jhipster/demo.adoc

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55

66
== Reactive Java Microservices with JHipster Demo Steps
77

8-
Today, I'd like to show you how to use the JHipster 7 to create a reactive Java microservices architecture.
8+
Today, I'd like to show you how to use the JHipster 7 to create a reactive Java microservices architecture with Spring Boot, Spring Cloud, Spring Cloud Gateway, and Spring WebFlux.
99

1010
**Prerequisites:**
1111

12-
* https://adoptopenjdk.net/[Java 11]+
13-
* https://nodejs.org/[Node 14]+
14-
* https://docs.docker.com/get-docker/[Docker]
15-
16-
TIP: The brackets at the end of some steps indicate the IntelliJ Live Templates to use. You can find the template definitions at https://github.com/mraible/idea-live-templates[mraible/idea-live-templates].
12+
- https://adoptopenjdk.net/[Java 11]+
13+
- https://nodejs.org/[Node 14]+
14+
- https://docs.docker.com/get-docker/[Docker]
1715

1816
toc::[]
1917

@@ -28,8 +26,6 @@ In this demo, I'll show you how to generate a microservice architecture that use
2826
npm i -g generator-jhipster@beta
2927
----
3028

31-
=== Design a Micronaut Data Model with JHipster's JDL
32-
3329
. Create a directory called `reactive-stack` and initialize `git`.
3430
+
3531
[source,shell]
@@ -195,7 +191,7 @@ docker-compose -f src/main/docker/mongodb.yml up -d #jhmongoup
195191
+
196192
NOTE: JHipster has support for https://www.cypress.io/[Cypress], but it https://github.com/jhipster/generator-jhipster/issues/12686[doesn't work with Okta] yet.
197193

198-
== Prepare Your Reactive Java Stack for Production
194+
=== Prepare Your Reactive Java Stack for Production
199195

200196
Keycloak is a superb open source identity provider. It has excellent support for OAuth 2.0 and OpenID Connect (OIDC) and easily runs in a Docker container. I greatly appreciate Keycloak's ease-of-use. I also ❤️ Spring Security's OAuth and OIDC support.
201197

@@ -214,14 +210,19 @@ spring:
214210

215211
. Install the https://cli.okta.com[Okta CLI] and run `okta register`.
216212

217-
. In the gateway project's directory, run `okta apps create jhipster`. Accept the default redirect URIs.
213+
. In the gateway project's directory, run the command below. Accept the default redirect URIs.
214+
+
215+
[source,shell]
216+
----
217+
okta apps create jhipster
218+
----
218219

219-
=== Update the JHipster Registry to Distribute OIDC Configuration
220+
==== Update the JHipster Registry to Distribute OIDC Configuration
220221

221222
Spring Cloud Config allows you to distribute Spring's configuration between apps. In this section, you'll configure JHipster's Spring Security settings to use Okta across all your services.
222223

223224
. Add the following YAML to `gateway/src/main/docker/central-server-config/localhost-config/application.yml`. You can find the values for each property in the `.okta.env` file.
224-
225+
+
225226
[source,yaml]
226227
----
227228
spring:
@@ -247,7 +248,7 @@ jhregistryup
247248

248249
. Use kbd:[Ctrl + C] to kill all your `./gradlew` processes and start them again.
249250

250-
. Open a new incognito browser window, go to `http://localhost:8080`, and sign in. Rejoice that using Okta for authentication works!
251+
. Open an incognito window, go to `http://localhost:8080`, and sign in. Rejoice that using Okta for authentication works!
251252

252253
. If you're feeling lucky, you can set your Okta credentials as environment variables and run end-to-end tests (from the `gateway` directory).
253254
+
@@ -258,7 +259,7 @@ export E2E_PASSWORD=<your-password>
258259
npm run e2e
259260
----
260261

261-
== Create Docker Images for Your Microservice Apps
262+
=== Create Docker Images for Your Microservice Apps
262263

263264
. Stop all your apps with kbd:[Ctrl + C]. Stop all your Docker instances too.
264265
+
@@ -276,7 +277,7 @@ TIP: Bump up the memory and CPU that Docker uses in Docker > Preferences > Resou
276277
./gradlew -Pprod bootJar jibDockerBuild
277278
----
278279

279-
== Run Your Microservices Stack with Docker Compose
280+
=== Run Your Microservices Stack with Docker Compose
280281

281282
Once your Docker containers are finished building, you'll want to add your Okta settings to Spring Cloud Config in JHipster Registry.
282283

@@ -329,7 +330,7 @@ JHipster creates a cloud-native microservices architecture that can be deployed
329330

330331
However, if you're doing microservices, you'll probably want to leverage Docker as you did in this tutorial. When your apps are containerized, they can be orchestrated with Kubernetes.
331332

332-
JHipster has a https://www.jhipster.tech/kubernetes/[Kubernetes] sub-generator that you can use to deploy it to the cloud. I'll cover this in a future tutorial.
333+
JHipster has a https://www.jhipster.tech/kubernetes/[Kubernetes] sub-generator that you can use to deploy it to the cloud. I'll cover this in a future demo.
333334

334335
In the meantime, you can watch a presentation that https://twitter.com/saturnism[Ray Tsang] and I did recently that shows how to deploy JHipster microservices with Kubernetes. If you start watching from https://youtu.be/AG4z18qePEw?t=2778[46:18], you'll see Ray show how to deploy to Google Cloud using Kubernetes.
335336

@@ -347,7 +348,7 @@ Are you dealing with massive amounts of steaming data and millions of customers?
347348

348349
What about https://wiki.openjdk.java.net/display/loom/Main[Project Loom]? Will it allow you to write regular non-reactive code that performs as good as reactive frameworks? I'm not sure. I'm betting on reactive for now. I think it's a good skill to have for Java developers.
349350

350-
== Stay hip with JHipster!
351+
== Stay Hip with JHipster!
351352

352353
⛑ Find the code on GitHub: https://github.com/oktadeveloper/java-microservices-examples/tree/main/reactive-jhipster[@oktadeveloper/java-microservices-examples/reactive-jhipster].
353354

0 commit comments

Comments
 (0)