Monday, March 7, 2016

Openshift - deploy Java EE7 application onto Wildlfy10

OpenShift  Wildfly

 Create OpenShift account

Install RedHat RHC  client tools

sudo yum install rubygems
rhc setup

Create application via web console or using RHC tools

Write down admin password to access cloud via SSH

Open application URL in browser

[dave@localhost ee7full.git]$ rhc apps
ee7full @ (uuid: 56d97e36454545636454540026f)
  Domain:          testjavaee
  Created:         Mar 04  1:23 PM
  Gears:           1 (defaults to small)
  Git URL:         ssh://
  Initial Git URL:
  Deployment:      auto (on git push)

  jboss-wildfly-10 (WildFly Application Server 10)
    Gears:   1 small

You have access to 1 application.
[dave@localhost ee7full.git]$ 

Initial source code is taken from existing GitHub code

Clone Git Repository

git clone ssh://

Forward ports to local host

[dave@localhost openshift]$ rhc port-forward -a ee7full
Checking available ports ... done
Forwarding ports ...

To connect to a service running on OpenShift, use the Local address

Service Local               OpenShift
------- -------------- ---- -----------------
java  =>
java  =>
java  =>
java  =>

Press CTRL-C to terminate port forwarding

Deploy application using Maven deploy plugin

dave@localhost dave-java-ee7-wildfly-full]$ pwd
[dave@localhost dave-java-ee7-wildfly-full]$ mvn clean package wildfly:deploy

[INFO] --- wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) @ dave-java-ee7-wildfly-full-ear ---
Mar 08, 2016 7:49:14 AM org.xnio.Xnio <clinit>
INFO: XNIO version 3.2.2.Final
Mar 08, 2016 7:49:14 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.2.2.Final
Mar 08, 2016 7:49:14 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.3.Final
Authenticating against security realm: ManagementRealm

Check application server logs

2016-03-08 01:52:43,915 INFO  [] (management-handler-thread - 5) WFLYDR0001: Content added at location /var/lib/openshift/56d9454545450026f/wildfly/standalone/data/content/62/75d7af5656565656573/content
2016-03-08 01:52:43,934 INFO  [] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "dave-java-ee7-wildfly-full-ear.ear" (runtime-name: "dave-java-ee7-wildfly-full-ear.ear")
2016-03-08 01:52:44,090 INFO  [] (MSC service thread 1-6) WFLYSRV0207: Starting subdeployment (runtime-name: "dave-java-ee7-wildfly-full-ejb.jar")
2016-03-08 01:52:44,091 INFO  [] (MSC service thread 1-2) WFLYSRV0207: Starting subdeployment (runtime-name: "dave-java-ee7-wildfly-full-web.war")

Access application via browser using public URL

No comments:

Post a Comment