Giter Site home page Giter Site logo

leoterry-ulrica / openshift-tomcat-svn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nichochen/openshift-tomcat-svn

0.0 2.0 0.0 0 B

Openshift Tomcat 7 S2I Image which supports WAR deployment and Subversion source download and compile

Shell 93.39% Makefile 6.61%

openshift-tomcat-svn's Introduction

openshift-tomcat-svn

This is an experimental Tomcat 7 S2I Image for OpenShift, which supports WAR deployment and Subversion source checkout and build.

How to setup###

Downlaod the source to a Linux host with docker, make and Openshift S2I installed.

####Step 1#### Download Apache Tomcat 7 from Apache Tomcat homepage. Please download the tar.gz format.

####Step 2#### Extract the content of the Tomcat 7 tar.gz file into folder openshift-tomcat7-svn/tomcat7

####Step 3#### Build the image

    $ cd openshift-tomcat7-svn
    $ make

After the build is completed successfully, you can see the newly created image by running:

    $ docker images

####Step 4#### Tag and push the image to your own registry

    $ docker tag openshift-tomcat7-svn <your registry>/openshift-tomcat7-svn  
    $ docker push <your registry>/openshift-tomcat7-svn  

####Step #### To use the image in OpenShift, you need to create ImageStream and Template for the image. Sample ImageStream and Template JSON files are provided in openshift-tomcat7-svn/ose-json. Please modify them according to your need, before importing into OpenShift.

    $oc create -n openshift -f openshift-tomcat7-svn-is.json
    $oc create -n openshift -f openshift-tomcat7-svn-template.json

####Step 6#### Now you can create a new project in OpenShift and add a new app to the project, remember to select the template we just created.

#####Subversion Source Checkout & build##### After selecting the template, you will be navigated to a UI to enter detail information. In there, you can enter your Subversion endpoint which pointing to your Java source. You also need to enter a valid Git URI, because OpenShift S2I needs to do a Git clone during S2I anyway (yes, I might fix that in the future), in this case we can just enter a valid Git URI, no need to care about what content the Git URI is pointing to. Finish filling up the form and submit. The image will checkout source code from the Subversion URI you provided and run mvn package to build the source. The output WAR file of the Maven build will be copied to the webapps of Tomcat 7.

#####WAR Deployment##### If you want the image to just deploy your WAR file. Just put your WAR file to a Git repo, then enter the URI of your Git repo in the application detail page. Leave the Subversion URI blank and proceed. The image is smart enough to know that you want to do a WAR deployment, instead of a Subverion one.

Sit back and relax, your application should be up and running in no time.

###YOU NEED TO KNOW### This image is just something I came up with during my exploration on OpenShift S2I, please don't expect it to be perfect.

Enjoy, have fun!

openshift-tomcat-svn's People

Contributors

nichochen avatar

Watchers

James Cloos avatar leoterry 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.