Dai MIKURUBE
Dai MIKURUBE

Reputation: 183

Varieties of packaging a Vert.x application, and deploying it

I recently started to try developing a Vert.x application. Its reactive manner is good and understandable for me, but I was not very sure about patterns of packaging a Vert.x application, and patterns of deploying it. ("Deploying" here means deploying the entire application, not deploying a verticle.)

I looked for some documents and articles, then I saw at least :

It is interesting that those kinds of deployment are possible, but I was not very sure of any other packaging/deployment method, and how many variations of packaging/deployment styles are available for Vert.x.

Some of them did not look like, to be honest, good production-ready deployment methods to me especially in terms of the manner of immutable deployment.

Q1. Does Vert.x have a good summary / document for patterns of packaging and deploying an entire Vert.x application, especially in production?

Q2. What are advantages and disadvantages for each pattern?

Q3. Any commentary how a Vert.x application starts up internally? (I looked into some code under io/vertx/core/cli/, and I saw it is spawning another JVM process. It was not very to understand its bootstrapping architecture quickly...)

Upvotes: 0

Views: 384

Answers (2)

Dai MIKURUBE
Dai MIKURUBE

Reputation: 183

I got some information about the "Embedding" approach from the Vert.x mailing list and a GitHub Issue. Let me share it as one of answers.

http://vert-x.github.io/embedding_manual.html is so old and obsolete, which is about Vert.x v2. The Vert.x lead said :

that's very old, nobody should ever read this anymore.

(But, I still keep this question open so that the question could collect some more other patterns for knowlege.)

Upvotes: 0

Asad Awadia
Asad Awadia

Reputation: 1521

I avoid the vert.x launcher and use regular deployment patterns.

  1. Compile the code into a fat jar using maven or gradle
  2. Put the fat jar into a docker image
  3. Deploy the docker image

This way everything runs from your main function

Here is a starter app for vertx that you can clone and run the following commands on : https://github.com/asad-awadia/vertx-starter

mvn clean compile install package to create the fat jar

mvn compile jib:dockerBuild to build the docker image

mvn compile jib:buildTar to build the tar of the docker image

Upvotes: 1

Related Questions