A Vert.x-based service launcher for deploying and managing microservices with dynamic configuration, service discovery, and template-based configuration management.
The Vertx Service Launcher is a flexible launcher that manages the lifecycle of Vert.x verticles and services. It provides configuration management, service deployment/undeployment, artifact listening, and monitoring capabilities.
In its default mode, the launcher starts as a full-featured service orchestrator that:
- Initializes the Vert.x instance with custom configuration (metrics, worker pool size, etc.)
- Loads configuration from a JSON file
- Manages service lifecycle:
- Deploys services/verticles based on configuration
- Monitors configuration changes and redeploys services accordingly
- Handles service undeployment and cleanup
- Supports service restart operations
- Watches for artifact changes and triggers redeployment when needed
- Provides service discovery integration (Traefik, Zookeeper)
- Configures logging with customizable log levels via environment variables
- Enables monitoring with Micrometer metrics (Prometheus integration)
- Intercepts event bus messages for distributed tracing (trace ID propagation)
The launcher listens on the event bus address service-launcher.deployment for deployment actions like:
restart-module: Restart a specific service module- Other deployment management commands
In export mode (i.e. when EXPORT_CONF_TEMPLATE environment variable is set to true), the launcher operates as a utility to extract configuration templates:
- Exports template.j2 files from
/srv/springboard/modsdirectory structure - Copies templates to a specified export path (
EXPORT_CONF_TEMPLATE_PATH) - Exits immediately after export is complete
This mode is useful for:
- Extracting configuration templates for documentation
- Creating configuration skeletons for new deployments
- Auditing available service configurations
To enable export mode, set the environment variable:
EXPORT_CONF_TEMPLATE=true
EXPORT_CONF_TEMPLATE_PATH=/path/to/export/directoryAdd the dependency to your pom.xml:
<dependency>
<groupId>com.opendigitaleducation</groupId>
<artifactId>vertx-service-launcher</artifactId>
<version>${the.version.you.want}</version>
</dependency>Note: You need to configure the ODE repository in your pom.xml:
<repositories>
<repository>
<id>ode</id>
<name>ODE Repository</name>
<url>https://maven.opendigitaleducation.com/nexus/content/groups/public</url>
</repository>
</repositories>Pull the Docker image:
docker pull opendigitaleducation/vertx-service-launcher:latestOr for a specific version:
docker pull opendigitaleducation/vertx-service-launcher:3.1-SNAPSHOT- Java 8 (not higher)
- Maven 3.9.3
- Git
Build the fat JAR with all dependencies:
mvn clean installmvn clean installmvn clean install -Dmaven.test.skip=trueThe project includes a convenient build script that handles everything:
./build-image.shThis script:
- Extracts the project version from
pom.xml - Builds a multi-architecture Docker image
- Tags the image as
opendigitaleducation/vertx-service-launcher:<version> - If on the
masterbranch, also tags as:latest - Pushes the image to the registry
Build locally without pushing:
# Get the version
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
JAR_FILE="vertx-service-launcher-$VERSION-fat.jar"
# Build the image
docker build -t opendigitaleducation/vertx-service-launcher:$VERSION \
--build-arg JAR_FILE="$JAR_FILE" \
-f Dockerfile .The project is configured with the Spotify Dockerfile Maven plugin:
mvn clean install dockerfile:buildTo skip Docker builds during Maven install:
mvn clean install -DskipMavenDockerBuild=truedocker run -v /path/to/springboard:/srv/springboard \
-e LOG_LEVEL=INFO \
-e VERTX_LOG_LEVEL=INFO \
opendigitaleducation/vertx-service-launcher:latestdocker run -v /path/to/export:/export \
-v /path/to/springboard:/srv/springboard \
-e EXPORT_CONF_TEMPLATE=true \
-e EXPORT_CONF_TEMPLATE_PATH=/export \
opendigitaleducation/vertx-service-launcher:latestjava -jar target/vertx-service-launcher-3.1-SNAPSHOT-fat.jar \
run com.opendigitaleducation.launcher.VertxServiceLauncher \
-conf config.jsonLOG_LEVEL(default:INFO) - General log levelVERTX_LOG_LEVEL(default:INFO) - Vert.x framework log levelHAZELCAST_LOG_LEVEL(default:SEVERE) - Hazelcast log levelNETTY_LOG_LEVEL(default:SEVERE) - Netty log levelACCESS_LOG_LEVEL(default:FINEST) - Access log levelEXPORT_CONF_TEMPLATE(default:false) - Enable export modeEXPORT_CONF_TEMPLATE_PATH- Path for exported templates (required in export mode)
- Dynamic Configuration Management: Support for JSON
- Service Lifecycle Management: Deploy, undeploy, and restart services
- Configuration Hot Reload: Automatically redeploy services on configuration changes
- Artifact Watching: Monitor artifact changes and trigger redeployment
- Service Discovery: Integration with Traefik and Zookeeper
- Metrics & Monitoring: Micrometer integration with Prometheus backend
- Distributed Tracing: Trace ID propagation across event bus
- Customizable Logging: Fine-grained control over log levels
- Multi-tenancy Support: Folder-based service factory
See the parent project for license information.
This project is part of the Edifice ecosystem. For contributions, please follow the organization's guidelines.