Git Product home page Git Product logo

jee-start's Introduction

Note: Git is a prereq

  1. Download the openshift-origin-client-tools for your OS: https://github.com/openshift/origin/releases/tag/v3.6.1

  2. Fork this repo: https://github.com/danmcp/openshift-jee-sample

  3. git clone https://github.com/<userid>/openshift-jee-sample.git

  4. cd openshift-jee-sample

  5. Login to web console

  6. Create a project and give it a unique name

  7. Open Metrics URL and accept the cert warnings

  8. Add To Project -> Browse Catalog -> Java -> Red Hat JBoss EAP -> Red Hat JBoss EAP 7.0

    • Name: somethingcool
    • Git Repository URL: https://github.com/<userid>/openshift-jee-sample.git
    • Blank out Git Reference and Context Dir
  9. oc login

  10. oc set env dc/somethingcool AUTO_DEPLOY_EXPLODED=true

  11. oc get pods

  12. oc rsync target/SampleApp.war/ <pod_name>:/deployments/SampleApp.war --watch

  13. Browse to SampleApp/HelloWorld

  14. Make a change to HelloWorld and/or HelloWorldHelper.java

  15. Browse to SampleApp/HelloWorld

  16. oc set env dc/somethingcool DEBUG=true

  17. oc get pods

  18. oc port-forward <pod_name> 8787:8787

  19. oc rsync target/SampleApp.war/ <pod_name>:/deployments/SampleApp.war

  20. Set a break point and browse to SampleApp/HelloWorld

  21. Change danmcp in pipeline.yaml to be your github login

  22. oc create -f https://raw.githubusercontent.com/<userid>/openshift-jee-sample/master/pipeline.yaml

  23. Modify Jenkinsfile inside of node(maven):

       //stage('build') {
       //  git url: "https://github.com/<userid>/openshift-jee-sample.git"
       //  openshiftBuild(buildConfig: 'somethingcool', showBuildLogs: 'true')
       //}
       stage('test') {
         git url: "https://github.com/<userid>/openshift-jee-sample.git"
         //sh "mvn verify"
         sh "mvn clean"
       }
       stage('approval') {
         input "Approve?"
       }
       stage('deploy') {
         openshiftDeploy(deploymentConfig: 'somethingcool')
       }
       stage('scale') {
         openshiftScale(deploymentConfig: 'somethingcool', replicaCount: '2')
       }
       stage('system test') {
         //sh "sleep 10"
         sh "curl http://somethingcool:8080 | grep WildFly"
       }
    
  24. git add .

  25. git commit -m 'Adding stages'

  26. git push origin master

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.