adam bien's blog

How To Push Java EE 6 Applications To The Cloud In 5 Minutes 📎

  1. Sign up: http://openshift.redhat.com/app/ (~ 1 min)
  2. Create environment https://openshift.redhat.com/app/express#quickstart (~2 min on Mac)
  3. Bind a domain name to your account:
    rhc-create-domain -n adambien -l [USER_NAME] -p [PASSWORD]
  4. Create an application. It will create a (git) repository remotely and clone it:
    rhc-create-app -l [USER_NAME] -p [PASSWORD] -t jbossas-7.0 -a [APP_NAME] (serversmoke)

    (...)
    Confirming application serversmoke is available
      Attempt # 1
    
    Success!  Your application is now published here:
    
          http://serversmoke-adambien.rhcloud.com/
    
    

  5. Remove maven artifacts to deploy a WAR: git rm -r src pom.xml
  6. Rename your war into ROOT.war and copy it into the ./deployments folder (this is important)
  7. Deploy your application with: git push
    
    remote: Stopping application...
    remote: done
    remote: Found .openshift/config/standalone.xml... copying to /var/lib/libra/...1/serversmoke/jbossas-7.0/standalone/configuration/
    remote: running .openshift/action_hooks/build
    remote: Starting application...done
    To ssh:/...@serversmoke-adambien.rhcloud.com/~/git/serversmoke.git/
       0959209..c2d3edd  master -> master
    
    
After ~2 seconds the application becomes available under http://[APPLICATION-NAME]-[DOMAIN-NAME].rhcloud.com. The ServerSmokeTest application used for this class test is available under: http://serversmoke-adambien.rhcloud.com/: it is the same application used for smoke tests of the other Java EE 6 servers previously: Glassfish v3, JBoss 6m5, SIwpas-1.0.0-CR4, resin-4.0.12 and "on premise" JBoss 7

So there is no smoke in the clouds: it works almost identical to a local Jboss 7 deployment.

What can be improved:
  1. The documentation at the website is out of sync with the implementation. E.g. the jbossas-7.0 application type is not even mentioned in the docs
  2. The domain registration offered in the website seems to be useless - use the command line. It is easier and works immediately.
  3. I would expect with "git pull" to get the actual log files. It is not the case.

Good news: The installation process and command line tools are easy and intuitive. The command line help is good and accurate. So do not read too much docs for now and enjoy hacking and deploying your Java EE 6 apps into the cloud! :-)