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.
OpenShift was the first PaaS to offer support for WildFly, naturally! As WildFly CR1 was released recently with 100% Java EE 7 TCK passing, the developer cartridge has been updated as well.
Lets take a look at how to get started with WildFly CR1 using the CLI tools. Alternatively, Web Console or IDE can be used as explained in Getting Started Guide.
- 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 (54.224.212.243)' 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,54.224.212.243' (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>[email protected]<span style="font-size: 16px;"> Git remote: ssh://[email protected]/~/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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<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:
http://mywildfly-milestogo.rhcloud.com/snoop.jsp
Do you want to try deploying one of the Java EE 7 samples on this application now ? May be a WebSocket one
Nice post !
In five minutes I created a wildfly8 cartridge and I deployed my Java EE 7 / WebSocket application thanks to the “rhc port-forward” command.
It’s a Tennis Game Tournament app demo : http://wildfly8-mgreau.rhcloud.com/usopen/live.html
Thanks.
Maxime