Dropwizard Automatic Build and Deploy to Cloud-Native Microservices

DZone 's Guide to

Dropwizard Automatic Build and Deploy to Cloud-Native Microservices

Learn how to set up and eun multiple microservices projects with Dropwizard, a popular framework for Java microservices.

· Microservices Zone ·
Free Resource

Today we keep covering the topic of building Java microservices, so decided to pay heed to a popular framework, called Dropwizard. Comparing to alternatives, this framework is pretty lightweight and rapid in getting web-services up and running. This makes it a perfect choice for microservice architecture.

In this article, we will go through the steps of building a that creates Maven build node with a set of JVM servers and initiates the application deployment. Dropwizard based Java application as a JAR file and deploying it as a scalable microservice to the cloud. The process will be automated with a help of Dropwizard Fat JAR Builder.

Dropwizard Fat JAR Builder Installation

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

Or you can import Dropwizard Fat manifest from GitHub. To do that, press button in the opened window. Import within a dashboard, paste the link in the URL tab, and confirm installation by clicking Import.

Change the installation settings if you need to (for example, you can use the link to the custom project in the Git Repo field). Then press Install.

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 context in the Tasks panel). In the default implementation, it is done under api/greeting.

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

Running Multiple Microservices With Dropwizard Projects

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

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

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

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 by pressing Add + Deploy.

More details on how to build and deploy Java applications can be found in the Maven node documentation. In this way, you can easily build and deploy your Dropwizard-based applications.

cloud native ,dropwizard ,java ,microservices ,tutorial

Published at DZone with permission of Tetiana Fydorenchyk , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}