GithubHelp home page GithubHelp logo

fredgcosta / cloud-native-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/cloud-native-starter

0.0 1.0 0.0 63.29 MB

Cloud Native Starter for Java/Jakarta EE based Microservices on Kubernetes and Istio

License: Apache License 2.0

Dockerfile 0.83% Java 28.47% JavaScript 5.65% HTML 0.70% Shell 59.43% Vue 4.91%

cloud-native-starter's Introduction

Cloud Native Starter for Java/Jakarta EE based Microservices on Kubernetes and Istio

This project contains sample code that demonstrates how to get started with cloud-native applications and microservice based architectures.

The project focusses on how to build microservices with Java EE and the open source technologies Eclipse MicroProfile, Eclipse OpenJ9, AdoptOpenJDK and Open Liberty.

The microservices can be easily deployed on Kubernetes environments running Istio like Minikube, Minishift (single-node OpenShift cluster inside a VM), or the IBM Cloud Kubernetes Service.

The project showcases the following functionality:

  • REST APIs implementations incl. documentation
  • REST API invocations
  • Traffic management
  • Resiliency via fallbacks and circuit breakers
  • Authentication and authorization
  • Distributed tracing and logging
  • Monitoring and metrics
  • Persistence for Java microservices via JPA

This diagram shows the key components:

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

Demos

This project demonstrates several Java EE and Istio key functionality.

Setup

The sample application can be run in four different environments:

  1. Minikube (locally): See instructions below.
  2. IBM Cloud Kubernetes Service - see instructions
  3. Minishift (locally) - see instructions
  4. OpenShift on the IBM Cloud - see instructions

The following instructions describe how to install everything locally on Minikube.

Before the microservices can be installed, make sure you've set up Minikube and Istio correctly or follow these instructions to set up Minikube and Istio from scratch. This should not take longer than 30 minutes.

Before deploying the application, get the code:

$ git clone https://github.com/nheidloff/cloud-native-starter.git
$ cd cloud-native-starter
$ ROOT_FOLDER=$(pwd)

The microservices can be installed via scripts. In addition to Minikube and Istio you need the following tools to be available.

Prerequisites:

Docker always needs to be installed locally. The tools git, curl and kubectl (and ibmcloud) can be installed locally or you can use a Docker image that comes with these tools.

$ cd ${ROOT_FOLDER}
$ docker run -v $ROOT_FOLDER/:/cloud-native-starter -it --rm ibmcom/ibm-cloud-developer-tools-amd64

Deploy (and redeploy):

$ cd ${ROOT_FOLDER}
$ 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

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

Cleanup

Run the following command to delete all cloud-native-starter components from Istio.

$ scripts/delete-all.sh

You can also delete single components:

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

Authors

Documentation

The following slides summarize this repo:

Slides

Here is a series of blog entries about this project:

Here is more information about Microservices, MicroProfile and Istio:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.