Giter Site home page Giter Site logo

ibm / application-modernization-javaee-quarkus Goto Github PK

View Code? Open in Web Editor NEW
113.0 12.0 73.0 185.84 MB

Application Modernization Sample - From Java EE (2010) to Cloud-Native (2021)

License: Apache License 2.0

Dockerfile 0.66% Java 62.38% HTML 16.06% Shell 9.29% CSS 1.24% JavaScript 5.91% Python 3.29% Vue 0.79% EJS 0.38%
java javaee websphere opensource quarkus cloudnative microservices strangler openliberty events-triggered

application-modernization-javaee-quarkus's Introduction

Application Modernization - From Java EE in 2010 to Cloud-Native in 2021

This sample demonstrates how to modernize 10+ year-old Java EE applications with cloud-native technologies and the modern Java runtimes Quarkus and Open Liberty. The modernized application is deployed to and operated with OpenShift, the enterprise distribution of Kubernetes.

Project Structure

Demonstrated Capabilities, Technologies and Tools

Application modernization is a journey. The legacy application has been modernized in ten steps.

  1. Monolith - WebSphere Traditional 8.5.5
    • Java EE 6 app from 2008 with Db2 database running in VMs or bare metal.
  2. Monolith - WebSphere Traditional 9 in container
    • Application converted with Transformation Advisor.
  3. Monolith - WebSphere Liberty
    • Application converted with Eclipse Migration Tools.
  4. Separated frontend
    • Dojo frontend in separate container.
  5. Monolith - Open Liberty
    • Modern project structure.
  6. Strangled Catalog Service and remaining Open Liberty Monolith
    • Strangled catalog service (inspired by Mono2Micro) developed with Quarkus and Postgres.
    • Event driven architecture via Kafka.
  7. Strangled Catalog Service and remaining Quarkus Monolith
    • Strangled Quarkus catalog service uses reactive programming model.
    • Remaining Quarkus monolith runs as native executable.
  8. Micro frontend based web application
    • Developed with single-spa and Vue.js. Messaging is done via RxJS.
  9. CI/CD via Tekton
    • Target OpenShift. Via OpenShift Pipelines operator.
  10. CI/CD via Tekton and ArgoCD
    • Target OpenShift. Via OpenShift GitOps operator.

Introduction Video

The following 12 minutes video describes the project on a high level:

Video

Architecture

Architecture of the legacy application:

Screenshot of legacy storefront application:

Architecture of the modernized application:

Screenshot of modernized storefront application:

Documentation

Deployment via Docker Desktop

If you want to run the modernized application locally, you can invoke the following commands. All you need is a local Docker installation and the git CLI.

Notes:

  • Docker requires 14 GB memory, 10 CPUs and 80 GB disk space
  • It takes roughly 15 - 20 minutes to start everything
  • Make sure docker-compose is also installed (sounds like this needs to be installed separately on some systems)
$ git clone https://github.com/nheidloff/application-modernization-javaee-quarkus.git && cd application-modernization-javaee-quarkus
$ ROOT_FOLDER=$(pwd)
$ sh ${ROOT_FOLDER}/scripts-docker/build-and-run.sh

The 'build-and-run.sh' script will launch the following containers.

Once everything has been started, you can open the web applications:

See the documentation how to run the demo.

Deployment to OpenShift on IBM Cloud with Tekton

The following scripts deploy the modernized application on Red Hat OpenShift on IBM Cloud. However the same instructions should work for other OpenShift and OCP deployments, for example CodeReady Containers.

First create an IBM Cloud Account. Then create an OpenShift cluster, for example via the IBM Cloud Dashboard. I've tested classic infrastructure, single zone, OpenShift 4.6.17, b3c.8x32 and 3 worker nodes.

Additionally you need to install Tekton. The easiest option is to use the 'OpenShift Pipelines' operator from the OperatorHub view in the OpenShift Console (screenshots). Simply accept all defaults. No local installations are necessary.

$ git clone https://github.com/nheidloff/application-modernization-javaee-quarkus.git && cd application-modernization-javaee-quarkus
$ ROOT_FOLDER=$(pwd)
$ sh ${ROOT_FOLDER}/scripts-openshift-tekton/check-prerequisites.sh
$ oc login ...
$ sh ${ROOT_FOLDER}/scripts-openshift/deploy-db2.sh
$ sh ${ROOT_FOLDER}/scripts-openshift/deploy-kafka.sh
$ sh ${ROOT_FOLDER}/scripts-openshift/deploy-postgres.sh
$ sh ${ROOT_FOLDER}/scripts-openshift-tekton/deploy-application.sh
$ sh ${ROOT_FOLDER}/scripts-openshift-tekton/show-urls.sh

application-modernization-javaee-quarkus's People

Contributors

imgbotapp avatar johnwalicki avatar nheidloff avatar timonlukas avatar volaka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

application-modernization-javaee-quarkus's Issues

File with incorrect filename

Hello Niklas! I'm currently trying to follow through your tutorials. I noticed that it's not possible to clone the repository on Windows because of this file - the name isn't valid under Windows, and I'm reasonably sure it's meant to be different on other systems as well :)

Feedback: split the first command in to commands -> easier to follow and read

Hi, a very simple and small feedback: Maybe you can split the first command line into two command lines?

$ git clone https://github.com/nheidloff/application-modernization-javaee-quarkus.git && cd application-modernization-javaee-quarkus

I think this is simpler to read and to follow ... ;-)

$ git clone https://github.com/nheidloff/application-modernization-javaee-quarkus.git
$ cd application-modernization-javaee-quarkus
$ ROOT_FOLDER=$(pwd)
$ sh ${ROOT_FOLDER}/scripts-docker/build-and-run.sh

Greetings,
Thomas

Lint files using ShellCheck

When I noticed that some files were erroring because of Dash, I wanted to make sure there's no syntax errors in the scripts. For this purpose I usually use ShellCheck, a very useful shell linter that already saved me from a few mistakes.

It might be a good idea to let it run over this repositories' shell files and to look through the recommendations - this could help with POSIX compatibility, and it might prevent errors from creeping in :) it's also available as an IDE plugin for popular ones like VS Code or Jetbrains IDEs.

Shell files aren't usable on Ubuntu/Debian

Hey! I'm currently trying to deploy parts of this repository for a demo, thank you for the great resource!

Sadly, it's not possible to use the scripts as-is on Ubuntu or Debian machines. Their sh implementation, Dash, is written to be very small, and as such doesn't support many features you'd expect. They already error on the declaration of the out function. If I execute them using bash (as in the shebang line) everything works perfectly.

My solution is now to replace every occurrence of sh [some script] with ./[some script]. On another machine I solved this problem by symlinking /bin/bash to /usr/bin/s, but that's a very dirty solution.

Based on the shebang lines, would anything break on other environments if this change would be implemented?

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.