Quick Start: Spring Boot and WildfFly 8.2 on OpenShift

A really “Quick Start” with Spring Boot, WildFly and OpenShift as opposed to my last, more descriptive article.


Before we can start building the application, we need to have an OpenShift free account and client tools installed.

Step 1: Create WildFly application

To create an application using client tools, type the following command:

rhc create-app <app-name> jboss-wildfly-8 --scaling

This command creates an application using WildFly 8.2 cartridge with scalability option and clones the repository to <app-name> directory.

Step 2: Delete Template Application Source code

OpenShift creates a template project that can be freely removed:

git rm -rf .openshift deployments src README.md pom.xml

Commit the changes:

git commit -am "Removed template application source code"

Step 3: Pull Source code from GitHub

git remote add upstream https://github.com/kolorobot/openshift-wildfly-spring-boot.git
git pull -s recursive -X theirs upstream master

Step 4: Push changes

The basic template is ready to be pushed to OpenShift:

git push

The initial deployment (build and application startup) will take some time (up to several minutes). Subsequent deployments are a bit faster.

You can now browse to: http://<app-name>-<domain>.rhcloud.com and you should see home page with the form.


  1. This comment has been removed by the author.

  2. Please can you provide the steps to extend your code and architecture to support https on OpenShift cloud . Your help will be extremely useful .


    Thank you very much!!

  3. I mean with shared SSL cert (free account) for testing/demo :-)

    1. "Support for enabling HTTPS connections to custom, aliased hostnames is available for users of OpenShift Online’s premium plans."

      "You can always take advantage of our *.rhcloud.com wildcard certificate in order to securely connect to any application via it’s original, OpenShift-provided hostname URL."

      So if you deploy your application to let's say myapp-mydomain.rhcloud.com the SSL will be enabled by default, you can check this: https://myapp-mydomain.rhcloud.com.

      Please refer to OS documentation.

  4. I wonder if the title of this blog post is wrong. It seems to be about OpenShift and WildFly - I don't see anything related to Spring Boot at all right? I was initially excited; thinking someone had figured out how to reuse JEE components from WildFly in Spring Boot - but it doesn't look like it ;)

    1. Hi, Thanks for the comment. Have a look at the full article that is more descriptive (http://blog.codeleak.pl/2015/02/openshift-build-spring-boot-application.html). This one is really "Quick Start" as explained on top.

      I am describiing how to deploy Spring Boot app on JEE server and that's it.

      I am sorry for making you confused.


Post a Comment

Popular posts from this blog

Different ways of validating @RequestBody in Spring MVC with @Valid annotation