Coder Social home page Coder Social logo

mono2micro's Introduction

CoolStore Monolith

This repository has the complete coolstore monolith built as a Java EE 7 application. To deploy it on OpenShift Container Platform (OCP) follow the instructions below

Pre requisite

  • Access to a OCP cluster using 3.5 or later.

  • OpenShift Command Client tool (eg. oc) installed locally

  • Authenticated from the command line client to the cluster

      oc login <url>
    

Build and deploy using the GitHub repo

To build and deploy using the github repo there is no need to clone this repo locally. All that is required is to create a project and process and create the application according to the template.

NOTE: A source deployment takes longer than a binary deployment

Create a new project (or use an existing)

oc new-project coolstore

Deploy and start the build

oc process -f https://raw.githubusercontent.com/coolstore/monolith/master/src/main/openshift/template.json | oc create -f -

Build and deploy using the binary deployment

Clone the project to a local directory

git clone https://github.com/coolstore/monolith.git coolstore-monolith
cd coolstore-monolith

Build the project using openshift profile

mvn -Popenshift package

Create a new project (or use an existing)

oc new-project coolstore

Create the app

oc process -f src/main/openshift/template-binary.json | oc create -f -

Start the build

oc start-build coolstore --from-file=deployments/ROOT.war

To deploy the production environment and Jenkins pipeline

oc process -f src/main/openshift/template-prod.json | oc create -f -

Manually start the pipeline

oc start-build monolith-pipeline

Run standalone

The application can also be deploy to a local JBoss EAP, which is great for development, but requires JMS Queues etc to be configured. The pom.xml does however support adding that through the maven-wildfly-plugin.

First time

  1. Download JBoss EAP 7.x from developers.redhat.com.

  2. Unzip the installation in a suitable locations (e.g. /opt)

  3. Set the JBOSS_HOME environment variable (in windows right click on my computer and add system environment variable)

     export JBOSS_HOME=/opt/jboss-eap-7.0
    
  4. Run the following maven command

     mvn clean package wildfly:start wildfly:add-resource wildfly:deploy
    
  5. Test the application by going to http://localhost:8080

  6. To stop the application run the following command

     mvn wildfly:shutdown
    

Second time

If you want to redeploy the application there is no need to use the wildfly:add-resource goal and if the JBoss is running then there is also possible to skip wildfly:start and just execute the following command

    mvn clean package wildfly:deploy

mono2micro's People

Contributors

gestrem avatar

Watchers

 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.