Coder Social home page Coder Social logo

blueperf / acmeair-monolithic-java Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 36.0 2.28 MB

This version of Acme air is redesigned removing hardcoded components to WXS and also optimized for Cloud Data Services

License: Apache License 2.0

HTML 34.77% CSS 1.87% JavaScript 2.60% Java 59.48% Shell 1.14% Dockerfile 0.13%

acmeair-monolithic-java's Introduction

Acme Air Sample and Benchmark (monolithic simple version)

This application shows an implementation of a fictitious airline called "Acme Air". The application was built with some key business requirements: the ability to scale to billions of web API calls per day, the need to develop and deploy the application targeting multiple cloud platforms (including Public, Private and hybrid). The application can be deployed both on-prem as well as on Cloud platforms.

This version of acmeair supports:

  • WebSphere Liberty Profile to Mongodb

Setup/Build

Use maven to build the project

Quick Setup with docker-compose Instructions

Prereq: Install Docker, docker-compose, and start Docker daemon on your local machine

  1. cd acmeair-monolithic-java
  2. Create docker network
  • docker network create --driver bridge my-net
  1. Build/Start Containers. This will build all the micro-services, mongo db instances, and an nginx proxy.

    • docker-compose --pull build
    • NETWORK=my-net docker-compose up
  2. Go to http://docker_machine_ip/

  3. Go to the Configuration Page and Load the Database

Other Setups - Setup DB

  • First, create a Compost account, then create a Mongo DB Deployment (It is a paid service with 30 days free trial)
  • Create a database with the name "acmeair"
  • get these information:
    • "hostname
    • "port"
    • "db"
    • "username"
    • "password"

For CF

  • mkdir apps
  • cp target/aacmeair-monolithic-jakarta.war apps
  • ibmcloud cf push acme-java-myname -p ../acmeair -m 512M

Add these environment variables and restage

  • MONGO_MANUAL : true
  • MONGO_HOST :
  • MONGO_PORT :
  • MONGO_DBNAME :
  • MONGO_USER :
  • MONGO_PASSWORD :

(Alternative) Create user provided DB Service

  • Create a string using Compose database information:

    • "url": "mongodb://username:password@hostname:port/db"
    • e.g. mongodb://acmeuser:[email protected]:27017/acmeair
  • Use CF command to create DB:

    • cf cups mongodbCompose -p "url"
    • At the URL prompt, enter above URL that was created:
    • url>mongodb://acmeuser:[email protected]:27017/acmeair
  • On IBM Cloud Dasboard, bind the created mongodbCompose service to Acmeair

    • restage/restart Acmeair application

For Kubernetes Services

  • docker build -f ./Dockerfile_KS -t registry.REGION.bluemix.net/NAMESPACE/IMAGENAME .
  • docker push registry.REGION.bluemix.net/NAMESPACE/IMAGENAME
  • Modify acmeair-monolithic-java.yaml to add registry.REGION.bluemix.net/NAMESPACE/IMAGENAME as the image name
  • Modify acmeair-monolithic-java.yaml to add DB connection information (Note: If there is no user setup for this DB, REMOVE MONGO_USER & MONGO_PASSWORD entries)
  • kubectl create -f ./acmeair-monolithic-java.yaml

Database loading

  • Go to the home page http://hostname:port
  • At the bottom of the page, click the link : Configure the Acme Air Environment > Click Load the database

Driving the load

  • Follow the instruction here
  • Use AcmeAir-v5.jmx insread of AcmeAir-microservices.jmx (Note: there is a limitation for JAX-RS to use root directory)
  • jmeter -n -t AcmeAir-v5.jmx -DusePureIDs=true -JHOST=hostname -JPORT=80 -j logName -JTHREAD=1 -JUSER=999 -JDURATION=60 -JRAMP=0 ;

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.