Openshift WildFly War Deployment
Openshift helps people for an open source cloud application platform. Openshift enables polyglot applications to be deployed on a public,private, and a hybrid cloud easily. This provides an extensible cartridge-based architecture which allows a wide range of functionality such as frameworks, databases, monitoring services. WildFly cartridge allows people to start a wildfly instance in openshift.
Openshift provides S2I enabled wildfly images to build and run java applications. The image merges the source of the application with the required dependencies for creating a new image which contains a java application. This resulting image can be run either openshift or by docker.
In this article, how to create war file from a spring boot project and how to deploy that war file on openshift will be shown. At the beginning, tomcat must be pulled out because wildfly will be used. To eject tomcat, some codes must be added to the pom file as follows.
Packaging tag has also to be altered as war.
To create war file, following codes must be written in the pom file.
After all this handled, open maven project section, choose clean and package part then click the run button.
When maven build is finished, open project file and find warfile. Upload that file in the github. Finally, in openshift web console, click wildfly.
Fill in the blanks, then click create. In git repository path, give the address of the application in the github. That is it. The application is ready.
As can be seen, route are ready, so click route.