Modules

Discover Legolas modules

Follow below wich modules you can use with Legolas

Module

Status

Apache Ignite

Not Available Yet

Apache Kafka

Not Available Yet

Confluence KSQL

Not Available Yet

Microsoft SQL Server

MySQL Database

Oracle XE Database

PostgreSQL Database

Creating your own module

Starters

Regular Starters can be created by implementing the legolas.starter.api.interfaces.Starter interface.

Starters that depends on network port availability can be created by implementing the legolas.starter.api.interfaces.PortStarter interface.

Both interfaces can be found in the legolas-core module.

<dependency>
    <groupId>org.archmix</groupId>
    <artifactId>legolas-core</artifactId>
    <version>${legolasVersion}</version>
</dependency>

Docker-based Starters

In order to create docker-based Starters you need to import legolas-docker module. In this module you can find legolas.docker.interfaces.DockerStarter class. Just extends this class and implement abstract methods.

Examples of Docker Starters

SQLServerStarter

OracleStarter

PostgreSQLStarter

Bootstrappers

Bootstrappers can be created by implementing legolas.bootstrapper.api.interfaces.Bootstrapper interface.

Bootstrappers that depends on network port availability can be created by implementing the legolas.bootstrapper.api.interfaces.NetworkBootstrapper interface.

What is the difference between Starters and Bootstrappers?

Starters has the puporse to be a replacement for an infrastructural component (databases, message brokers, storage, caches, etc).

Bootstrappers has the puporse to be a required component for the application to run that can be a network service (http server, web socket server, graphql engine) or a JVM object (jdbc client, cache client, http client, etc).

Migrations

Migrations can be created by implementing legolas.migration.api.interfaces.Migration. Migrations can have dependencies with another migrations. If is the case of your Migration, so you can do it by getting it using the legolas.migration.api.interfaces.MigrationId.

General behaviour of Legolas Modules

  • If the network port needed by a PortStarter is not available, the starter will not run because Legolas understands that another instance is already running in another JVM Session.

  • If the network port needed by a NetworkBootstrapper is not available, Legolas will find another port by incrementing 1 by 1 until an available port is found, then this port will be used to start NetworkBootstrapper instance.

Last updated

Was this helpful?