Skip to content

Flux setup and initialisation

Regunath B edited this page Aug 10, 2021 · 1 revision

This page gives details about how to setup Flux cluster.

MySQL setup

Flux uses MySQL for storage. To setup mysql database and tables use the below script.

./setup_db.sh

Flux needs two databases in MySQL.

  1. flux - contains tables StateMachines, States, Events and AuditRecords.
  2. flux_redriver - contains table ScheduledMessages and used by Redriver.

The relevant schema can be found in flux/persistence-mysql/src/main/resources/flux/migrations and flux/persistence-mysql/src/main/resources/flux_redriver/migrations

configuration.yml

Located at flux/runtime/src/main/resources/packaged/configuration.yml and contains all flux runtime related configuration like Hibernate, API and Dashboard Jetty servers, Deployment Unit and Redriver configs.

Using system property flux.configurationFile you can mention the path of the file.

-Dflux.configurationFile = /etc/flux/configuration.yml
application.conf

Located at flux/task/src/main/resources/application.conf and contains Akka specific configuration. Akka is used in Flux for task execution.

For cluster setup, change akka.remote.netty.tcp.hostname to current host IP and mention the seed nodes. The seed nodes are configured contact points for initial, automatic, join of the cluster. Refer to Akka Cluster Usage documentation for more details.

log4j2.xml

Located at flux/runtime/src/main/resources/log4j2.xml and contains all logging configuration. Using system property log4j.configurationFile you can mention the path of the file.

-Dlog4j.configurationFile = /etc/flux/log4j2.xml
FluxInitializer

com.flipkart.flux.initializer.FluxInitializer is the Flux initialisation class. Run it by specifying the relevant mode or none for a combined runtime.

Clone this wiki locally