Thorntail Fat, Thin and Skinny Approach for Running Microservice Applications

14

1785-1-wildfly-swarm-logoThorntail, originally WildFly Swarm, is the most suitable for packaging applications as JAR, WAR or EAR files. The most important value is in the functional agility the Thorntail provides. You can start with the stripped down version of Thorntail adding the required parts and application code on top.

Below we will describe how to build and deploy Thorntail based applications using Fat, Thin and Skinny approaches. The application will be packaged in the Jar/War format automatically with the help of Builder add-ons prepared by Jelastic. The topology will consist of Maven build node and JVM containers for running microservices.

1785-1-jvm-microservice

Thorntail Fat Jar Builder Installation

To get started, log in to Jelastic dashboard, find the Thorntail Fat Jar Builder in the Marketplace and click Install.

1785-1-install-thorntail-fat-jar-builder

Or you can import Thorntail Fat JPS manifest using GitHub link:

https://github.com/jelastic-jps/thorntail/blob/master/microservice-fat-jar/manifest.jps

To do that, open the Import window, paste the link and confirm installation by clicking Import button in the opened window.

1785-1-thorntail-fat-jps-manifest

If required, change installation settings such as environment name or GitHub repository link to a custom Thorntail Fat project. Then press Install.

1785-1-install-fat-jar-package

When the installation and building of the project are completed, a corresponding message appears. You still need to wait a few minutes for deploy to be finished (feel free to track the process in the Tasks panel). In the default implementation, it is done under the api/greeting context.

1785-1-open-thorntail-fat-jar-builder-in-browser

Afterward, you can make sure, that application is up and running by pressing Open in browser button.

1785-1-thorntail-wildfly-swarm-fat-jar-greeting

Thorntail Skinny Jar Builder Installation

Find the Thorntail (WildFly Swarm) Skinny Jar Builder in the Marketplace and click Install.

1785-1-install-thorntail-skinny-jar-builder

Or import Thorntail (WildFly Swarm) Skinny JPS manifest using GitHub link:

https://github.com/jelastic-jps/thorntail/blob/master/microservice-skinny-jar/manifest.jps

1785-1-thorntail-skinny-jps-manifest

If required, change installation settings such as environment name or GitHub repository link to a custom Thorntail Skinny project. Then press Install.

1785-1-install-skinny-jar-package

When the installation and building of the project are completed, a corresponding message appears. You still need to wait a few minutes for deploy to be finished (feel free to track the process in the Tasks panel). In the default implementation, it is done under the api/greeting context.

1785-1-open-skinny-jar-builder-in-browser

Afterward, you can make sure, that application is up and running by pressing Open in browser button.

1785-1-thorntail-wildfly-swarm-skinny-jar-greeting

Thorntail Thin War Builder Installation

Find the Thorntail (WildFly Swarm) Thin War Builder in the Marketplace and click Install.

1785-1-install-thorntail-thin-jar-builder

Or you can import Thorntail (WildFly Swarm) Thin JPS manifest using GitHub link:

https://github.com/jelastic-jps/thorntail/blob/master/microservice-thin-war/manifest.jps

1785-1-thorntail-thin-jps-manifest

If required, change installation settings such as environment name or GitHub repository link to a custom Thorntail Thin project. Then press Install.

1785-1-install-thin-war-package

When the installation and building of the project are completed, a corresponding message appears. You still need to wait a few minutes for deploy to be finished (feel free to track the process in the Tasks panel). In the default implementation, it is done under the api/greeting context.

1785-1-open-thin-war-builder-in-browser

Afterward, you can make sure, that application is up and running by pressing Open in browser button.

1785-1-thorntail-wildfly-swarm-thin-war-greeting

Multiple Thorntail Projects with Microservices

You can use just created Maven node for building extra projects and deploying them to different environments to get a set of distributed microservices.

1785-1-multiple-thorntail-projects-with-microservices

First of all, create a separate environment with Java Engine.

1785-1-separate-environment-with-java-engine

Then click Add Project next to the Maven node in the initial environment.

1785-1-add-project-to-the-maven-node

Specify the name and link to the project, as well as choose the environment where it should be deployed. Additionally, you can activate automatic updates. Then confirm pressing Add + Deploy.

More details on how to build and deploy Java applications can be found at the Maven node documentation.

In this way, you can easily build and deploy your Thorntail (WildFly Swarm) based applications packaged as JAR and War files using Fat, Skinny or Thin approach. Register and try out this implementation for your custom project to feel the benefits of microservices running in the cloud.

SOURCEJelastic, Inc.