This repository contains a microservices architecture with Kafka support and includes docker-compose configuration for running the services locally. The tutorial for creating this example is available on Okta Developer Blog.
Prerequisites:
To install this example, run the following commands:
git clone https://github.com/indiepopart/jhipster-kafka.git
cd jhipster-kafka
Log in to your Okta Developer account (or sign up if you don’t have an account).
- From the Applications page, choose Add Application.
- On the Create New Application page, select Web.
Configure the following authentication settings for the new Web App:
- Name: give a name for your application
- Login redirect URIs: http://localhost:8080/login/oauth2/code/oidc,http://localhost:8761/login/oauth2/code/oidc
- Logout redirect URIs: http://localhost:8080,http://localhost:8761
- Grant Type Allowed: Authorization Code and Refresh Token
Copy the Client ID and Client secret, and find the Org URL at the top right corner in the Okta Dashboard.
Create an docker-compose\.env
file with the following content:
OIDC_CLIENT_ID={yourClientId}
OIDC_CLIENT_SECRET={yourClientSecret}
RESOURCE_ISSUER_URI={yourOrgUrl}/oauth2/default
MAIL_USERNAME{yourGmailUsername}
MAIL_PASSWORD={yourGmailPassword}
DISTRIBUTION_LIST={anotherEmailAccount}
Build the services docker images for blog, store and gateway with the following command:
./mvnw -ntp -Pprod verify jib:dockerBuild
Once all the services are built, run docker-compose:
docker-compose up
Login to the JHipster Registry at http://localhost:8761 with Okta user credentials and check the service's health.
Once everything is up, go to the gateway at http://localhost:8080 and login. Create store entity and then update it. The alert
microservice should log entries when processing the received message from the store
service.
Please post any questions as comments on the blog post, or on the Okta Developer Forums.
Apache 2.0, see LICENSE.