Experimental feature flags
Lucenia releases may contain experimental features that you can enable or disable as needed. There are several methods for enabling feature flags, depending on the installation type.
Enable in lucenia.yml
If you are running an Lucenia cluster and want to enable feature flags in the config file, add the following line to lucenia.yml
:
lucenia.experimental.feature.<feature_name>.enabled: true
Enable on Docker containers
If you’re running Docker, add the following line to docker-compose.yml
under the lucenia-node
> environment
section:
LUCENIA_JAVA_OPTS="-lucenia.experimental.feature.<feature_name>.enabled=true"
Enable on a tarball installation
To enable feature flags on a tarball installation, provide the new JVM parameter either in config/jvm.options
or LUCENIA_JAVA_OPTS
.
Option 1: Modify jvm.options
Add the following lines to config/jvm.options
before starting the lucenia
process to enable the feature and its dependency:
-Dlucenia.experimental.feature.<feature_name>.enabled=true
Then run Lucenia:
./bin/lucenia
Option 2: Enable with an environment variable
As an alternative to directly modifying config/jvm.options
, you can define the properties by using an environment variable. This can be done using a single command when you start Lucenia or by defining the variable with export
.
To add the feature flags inline when starting Lucenia, run the following command:
LUCENIA_JAVA_OPTS="-Dlucenia.experimental.feature.<feature_name>.enabled=true" ./lucenia-0.1.0/bin/lucenia
If you want to define the environment variable separately prior to running Lucenia, run the following commands:
export LUCENIA_JAVA_OPTS="-Dlucenia.experimental.feature.<feature_name>.enabled=true"
./bin/lucenia
Enable for Lucenia development
To enable feature flags for developing Lucenia plugins, you must add the correct properties to run.gradle
before running Lucenia. See the Developer Guide for information about to use how Gradle to build Lucenia.
Add the following properties to run.gradle to enable the feature:
testClusters {
runTask {
testDistribution = 'archive'
if (numZones > 1) numberOfZones = numZones
if (numNodes > 1) numberOfNodes = numNodes
systemProperty 'lucenia.experimental.feature.<feature_name>.enabled', 'true'
}
}