Skip to content
Cloud Native Starter for Java and Node.js Microservices on Kubernetes and Istio
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
articles-java-jee remove unused config from server.xml Mar 12, 2019
authors-nodejs
images update LocalEnv readme Kiali installation Mar 14, 2019
istio
scripts new bashscript to create some sample Mar 15, 2019
web-api-java-jee
web-app-vuejs update gitignore Mar 21, 2019
.gitignore update gitignore Mar 21, 2019
LICENSE initial commit Feb 26, 2019
LocalEnvironment.md
README.md

README.md

Cloud Native Starter for Java and Node.js

This project contains sample code that shows how to build cloud-native applications with JavaEE and Node.js and deploy them to Kubernetes and Istio.

The project showcases the following functionality:

  • JavaEE (with MicroProfile) and Node.js microservices
  • Distributed tracing
  • Traffic management
  • Resiliency via fallbacks and circuit breakers
  • REST APIs implementations incl. documentation
  • REST API invocations
  • Distributed logging
  • Metrics
  • Authentication and authorization
  • Configuration
  • Deployments

This diagram shows the key components:

The next screenshot shows the web application. More screenshots are in the images folder.

Local Environment Setup

Follow these instructions to set up the local environment with Minikube and Istio. This should not take longer than 30 minutes.

Deployment

Prerequisites:

Deploy (and redeploy):

$ git clone https://github.com/nheidloff/cloud-native-starter.git
$ cd cloud-native-starter
$ scripts/check-prerequisites.sh
$ scripts/deploy-articles-java-jee.sh
$ scripts/deploy-web-api-java-jee.sh
$ scripts/deploy-authors-nodejs.sh
$ scripts/deploy-web-app-vuejs.sh
$ scripts/deploy-istio-ingress-v1.sh
$ scripts/show-urls.sh

Run the Demo

After running the scripts above, you will get a list of all URLs in the terminal.

Example URL to open the web app: http://192.168.99.100:31380

Example API endpoint: http://192.168.99.100:31380/web-api/v1/getmultiple

Traffic Routing

In order to demonstrate traffic routing you can run the following commands. 20 % of the web-api API request to read articles will now return 10 instead of 5 articles which is version 2. 80 % of the requests are still showing only 5 articles which is version 1. This distribution is set in istio/istio-ingress-service-web-api-v1-v2-80-20.yaml (weight: 80 vs. weight: 20).

$ scripts/deploy-web-api-java-jee-v2.sh
$ scripts/deploy-istio-ingress-v1-v2.sh

Resiliency

In order to demonstrate resiliency you can run the following command to delete the authors service:

$ scripts/delete-authors-nodejs.sh

In the next step delete the articles service:

$ scripts/delete-web-api-java-jee.sh

Cleanup

Run these commands to delete the cloud native starter components:

$ scripts/delete-articles-java-jee.sh
$ scripts/delete-web-api-java-jee.sh
$ scripts/delete-authors-nodejs.sh
$ scripts/delete-web-app-vuejs.sh
$ scripts/delete-istio-ingress.sh

Documentation

Here is a series of blog entries about this project:

Here is more information about Microservices, MicroProfile and Istio:

You can’t perform that action at this time.