The run command (Code) is a command of the launcher.
It will:
Via the vertx command line
cd /verticles # the location of the verticle jar
vertx run io.vertx.sample.RandomGeneratorVerticle
-cp /verticles/MY_VERTICLE.jar
Via a fat jar
java -jar my-vertx-fat.jar run \
-cluster \
-conf myconf.json \
-cp path/to/dir/conf/cluster_xml
Via the docker vertx-exec image
docker run -i -t -p 8080:8080 \
-v $PWD:/verticles vertx/vertx3-exec \
run io.vertx.sample.RandomGeneratorVerticle \
-cp /verticles/MY_VERTICLE.jar
Runs a Verticle called <main-verticle> in its own instance of vert.x.
(launcher) run \
[-cp <classpath>] \
[--cluster] \
[--cluster-host <host>] \
[--cluster-port <port>] \
[--cluster-public-host <public-host>] \
[--cluster-public-port <public-port>] \
[--conf <config>] \
[--ha] \
[--hagroup <group>] \
[--instances <instances>] \
[--on-redeploy <cmd>] \
[--options <options>] \ #vertx options
[--quorum <q>] \
[--redeploy <includes>] \
[--redeploy-grace-period <period>] \
[--redeploy-scan-period <period>] \
[--redeploy-termination-period <period>] \
[--worker] \
main-verticle
where:
There is a mapping between system properties and Vert.x Options as in:
-Dvertx.options.workerPoolSize=20
The deployment options of the main verticle can also be configured from system properties:
-Dvertx.deployment.options.worker=true
-Dvertx.deployment.options.instances=2 # 1 by default
Vert.x - Hot reloading / Live redeploy