Coder Social home page Coder Social logo

ibm-cloud-architecture / refarch-jee-monolith-to-microservices Goto Github PK

View Code? Open in Web Editor NEW
4.0 8.0 5.0 15.13 MB

A component of the https://github.com/ibm-cloud-architecture/refarch-jee reference application. This repository contains the detail for evolving an existing JEE monolith to microservices.

License: Apache License 2.0

Java 100.00%

refarch-jee-monolith-to-microservices's Introduction

Customer Order Services - Microservices based application

This GitHub repository contains the information for the Customer Order Services microservices based application. This application is now composed of several microservices. Best practices for microservices is that each of them have their own GitHub repository and be as independent of any other component as possible. Hence, this repository serves as the umbrella for all the microservices that make up the final Customer Order Services application.

Phase 4 Application Architecture

Repositories

Steps followed to Build and Deploy the application

Building and deploying the Backend Application on Websphere Application Server

Follow the steps mentioned here to build and deploy the Backend applications

Building and Deploying the Microservices on Kubernetes

Follow the below steps to build and deploy the Microservices.

Continuous Delivery service on Bluemix is used to create end-to-end deployment of 3 microservices on Bluemix Kubernetes Container Service.

Steps

  1. Create a Kubernetes Cluster on Bluemix. Follow steps here : https://console.bluemix.net/docs/containers/cs_tutorials.html#cs_tutorials to create the cluster

  2. On Bluemix Dashboard, create a toolchain.

  3. Add Github Tool integration and mention git repository URL for CustomerOrderService micro service

  4. Add Github Tool integration and mention git repository URL for ProductSearchService micro service

  5. Add Github Tool integration and mention git repository URL for ShoppingWebBFFService micro service

  6. Add Delivery Pipeline Tool integration and follow below steps to create deployment flow for CustomerOrderService microservice

    1. Click on Delivery Pipeline toll integration which is just added
    2. Add a stage to build the microservice code
    3. In Input tab, select git repository for CustomerOrderService which was added in step 2
    4. Make sure Stage Trigger is set to “Run jobs whenever a change is pushed to Git”
    5. In Jobs tab, Add a Build Job
    6. Select Builder type as “Maven” and Working Directory as “CustomerOrderService” and Save it
    7. Add another stage to build docker image
    8. In Input tab, select Stage and Build from the previous stage added above
    9. Make sure Stage trigger is set to “Run jobs when the previous stage is completed”
    10. In Jobs tab, add a new Build job
    11. Select Builder type as “IBM Container Service” and select rest of the input parameters appropriately (like Organization, space, etc). Secify image name as customerorderservice.
    12. In Build script, add below script towards the end
    if [ -f customerorderservice.yaml ]; then
    		#Update customerorderservice.yml with image name
    		echo "UPDATING DEPLOYMENT MANIFEST:"
    		sed -i "s~^\([[:blank:]]*\)image: ${IMAGE_NAME}*$~\1image: ${FULL_REPOSITORY_NAME}~" customerorderservice.yaml
    		cat customerorderservice.yaml
    		cp customerorderservice.yaml $ARCHIVE_DIR/
    	else
    		echo -e "${red}Kubernetes deployment file 'customerorderservice.yaml' not found at the repository root${no_color}"
    		exit 1
    	fi
    

    This script is required to update images name in Kubernetes deployment file with the image which is built in this step. Save it 13. Add another stage to trigger kubernetes deployment. 14. In Input tab, select Stage and Job from the previous stage of Container build 15. Make sure Stage trigger is set to “Run jobs when the previous stage is completed” 16. Add a new Deploy job. 17. Select Deployer type as Kubernetes and specify input parameters as appropriate 18. In deploy script add below lines in place of “kubectl create -f pods.yml” and save

     `kubectl delete -f customerorderservice.yaml`
     `kubectl create -f customerorderservice.yaml`
    
  7. Add Delivery Pipeline Tool integration and follow below steps to create deployment flow for ProductSearchService microservice. Specify image and filename as “productsearchservice” in step 5.11

  8. Add Delivery Pipeline Tool integration and follow below steps to create deployment flow for ShoppingWebBFFService microservice. Specify image and filename as “shoppingwebbffservice” in step 5.11

refarch-jee-monolith-to-microservices's People

Contributors

debasisdas1976 avatar jesusmah avatar osowski avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.