OpenShift is Red Hat’s PaaS platform and comes in three flavors:
- Origin is the Community PaaS offering. You can explore the community-driven open source upstream of OpenShift. Join the community.
- Online is the Public PaaS offering. Host your applications in the public cloud with automated provisioning, management, and scaling of applications. Sign up for free.
- Enterprise is the Private PaaS offering. Leverage PaaS in your own data centers and private cloud. Request evaluation.
With 1.5m+ total apps created, 2400 apps created each day, 2100 new users each week, OpenShift provides the best PaaS experience for Java with JBoss EAP, Tomcat, Jenkins, Maven, Eclipse, MongoDB, MySQL, and a whole variety of pluggable cartridges. OpenShift provides great velocity by providing support for devops, Node.js, Ruby, Mobile, NoSQL. In addition it also offers stability by offering multi-tenancy, security, auto-scaling, no lock-in, and Red Hat Enterprise Linux.
- Install the client: sudo gem install rhc
- Setup your environment: rhc setup
- Create your application as shown
12345678910111213141516171819202122232425262728293031323334353637383940<strong>rhc app create mywildfly https://raw.github.com/developercorey/openshift-wildfly-cartridge/master/metadata/manifest.yml</strong>The cartridge 'https://raw.github.com/developercorey/openshift-wildfly-cartridge/master/metadata/manifest.yml' will be downloaded and installedApplication Options-------------------Domain: milestogoCartridges: https://raw.github.com/developercorey/openshift-wildfly-cartridge/master/metadata/manifest.ymlGear Size: defaultScaling: noCreating application 'mywildfly' ... Artifacts deployed: ./ROOT.wardoneWaiting for your DNS name to be available ... doneCloning into 'mywildfly'...The authenticity of host 'mywildfly-milestogo.rhcloud.com (188.8.131.52)' can't be established.RSA key fingerprint is XXXXXXXXXXXXXX.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'mywildfly-javaee6.rhcloud.com,184.108.40.206' (RSA) to the list of known hosts.Checking connectivity... doneYour application 'mywildfly' is now available.URL: http://mywildfly-javaee6.rhcloud.com/<span style="font-size: 16px;"> SSH to: </span>XXXXXXXXXXXXXXXXXX@mywildfly-milestogo.rhcloud.com<span style="font-size: 16px;"> Git remote: ssh://XXXXXXXXXXXXXXXXX@mywildfly-javaee6.rhcloud.com/~/git/mywildfly.git/</span>Cloned to: /Users/arungupta/mywildflyRun 'rhc show-app mywildfly' for more details about your app.
And now you have your first application running on OpenShift and deployed on WildFly. Console should show the following output:
The application is now accessible at:
http://mywildfly-milestogo.rhcloud.com and looks like:
Port forwarding can be enabled by issuing the following command:
<strong>rhc port-forward mywildfly</strong>
Checking available ports ... done
Forwarding ports ...
To connect to a service running on OpenShift, use the Local address
Service Local OpenShift
------- -------------- ---- ---------------
java 127.0.0.1:8080 => 127.2.54.1:8080
java 127.0.0.1:9990 => 127.2.54.1:9990
java 127.0.0.1:9999 => 127.2.54.1:9999
Press CTRL-C to terminate port forwarding
Now WildFly’s wonderful admin console is accessible at http://localhost:9090 and is automatically redirected to your instance running on OpenShift.
You can also get some more details about the service at:
Do you want to try deploying one of the Java EE 7 samples on this application now ? May be a WebSocket one 😉