[jbosstools-issues] [JBoss JIRA] (JBDS-3298) Push changes to Existing OpenShift Project

Jeff Cantrill (JIRA) issues at jboss.org
Tue Feb 17 08:38:49 EST 2015


    [ https://issues.jboss.org/browse/JBDS-3298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040866#comment-13040866 ] 

Jeff Cantrill commented on JBDS-3298:
-------------------------------------

[~rruss] [~maxandersen] I got side-tracked on something else, but here is something https://github.com/bparees/javaee7-hol/blob/master/application-template-jeebuild.json that went around on libra-devel.  It is an app server with mysql database.  Per Ben's email:

{quote}
Arun forced my hand, so we have a hacked up JEE example now that uses a mysql pod/service as a JEE datasource and the wildfly STI image for building/running:
https://github.com/bparees/javaee7-hol

the steps to run it are:
1) run steps 1-9 from the regular sample-app here:
https://github.com/openshift/origin/blob/master/examples/sample-app/README.md
2) "osc process -n test -f application-template-jeebuild.json | osc create -n test -f -"   (using the template json from the app repo)
3) "osc start-build -n test jee-sample-build"
4) steps 15-18 from the regular sample-app readme
  - the app url is http://<ip address from 'osc get services -n test'>:8080/movieplex7-1.0-SNAPSHOT/

what's hacky about it?
a) it uses a custom STI assemble script because the wildfly assemble script tries to deploy the app as part of the build (this is intentional to save startup time later) and this particular app barfs if the DB isn't available during deployment, so the build "fails"
b) it uses a custom standalone.xml in the source repo because it looks like the default standalone.xml in the wildfly image isn't quite the right one we should be using (doesn't have the full profile available).  

That said, the fact that I was able to get it running despite those challenges w/ our STI wildfly builder speaks to the fact that we've built an appropriate amount of customizability into our build system, even though it also shows we don't have the right "out of the box" experience yet.

I don't plan to maintain this sample to the level of the sample ruby app, but hopefully it helps other people who've been looking to create java apps on openshift.


Ben Parees | OpenShift
{quote}

> Push changes to Existing OpenShift Project
> ------------------------------------------
>
>                 Key: JBDS-3298
>                 URL: https://issues.jboss.org/browse/JBDS-3298
>             Project: Developer Studio (JBoss Developer Studio)
>          Issue Type: Feature Request
>          Components: openshift, requirements
>    Affects Versions: 8.0.0.GA
>            Reporter: Burr Sutter
>            Assignee: Max Rydahl Andersen
>            Priority: Blocker
>             Fix For: 9.0.0.GA
>
>
> Use Case #2 Push changes to Existing OpenShift Project
> a) assumes the steps in Use Case #1 JBDS-3297
> b) assumes the end-user has uploaded his SSH keys (to allow for git push)
> c) Eclipse user will add, edit and delete files from the originally downloaded/imported set of files - leveraging Eclipse specialized editors, content-assist, etc
> d) Eclipse user will run (deploy) Maven-based Java projects on a local EAP
> e) Eclipse user will test (JUnit, Arquillian) 
> f) Eclipse user will debug with the local EAP (run on localhost or from Docker Image)
> g) Eclipse user will git add and git commit as appropriate
> h) Eclipse user will git push to the original URL provided in Use Case #1
> i) Eclipse user will await the automatic rebuild of a new image, deployment of the same
> j) Eclipse user will then be provided a URL and the browser can be opened automatically
> Note: 
> i) auto-build=true, auto-deploy=true
> assumes the auto-build (.war and docker image) upon git push enabled in Use Case #1c (JBDS-3297). This step also assumes the auto-deploy upon build is enabled in 1c.
> A future variation of #2 should allow for "auto-build=false" and "auto-deploy=true" with hot deployment of the binary .war or .ear. 
> If auto-build=false and auto-deploy=false then the Eclipse user will simply receive a message that his git push was successful, no URL, no browser opening. 



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jbosstools-issues mailing list