Package org.opennms.smoketest.stacks
Class StackModel.Builder
- java.lang.Object
-
- org.opennms.smoketest.stacks.StackModel.Builder
-
- Enclosing class:
- StackModel
public static final class StackModel.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackModelbuild()Build the stack modelStackModel.BuilderwithBlobStoreStrategy(BlobStoreStrategy blobStoreStrategy)Choose the key value store to use for blobs.StackModel.BuilderwithElasticsearch()Enable Elastiscearch.StackModel.BuilderwithIpcStrategy(IpcStrategy ipcStrategy)Type of service used to communicate between Minion/OpenNMS/SentinelStackModel.BuilderwithJsonStoreStrategy(JsonStoreStrategy jsonStoreStrategy)Choose the key value store to use for JSON documents.StackModel.BuilderwithKafkaCompressionStrategy(KafkaCompressionStrategy kafkaCompressionStrategy)Type of compression used with Kafka messages.StackModel.BuilderwithMinion()Enable one Minion using the default profile.StackModel.BuilderwithMinion(Map<String,String> configuration)Enable a Minion using the given configuration.StackModel.BuilderwithMinions(Map<String,String>... configurations)Enable many Minions using the given configurations.StackModel.BuilderwithMinions(MinionProfile... minions)Enable many Minions using the given profiles.StackModel.BuilderwithOpenNMS(OpenNMSProfile opennms)Profile for the OpenNMS container.StackModel.BuilderwithSentinel()Enable one Sentinel using the default profile.StackModel.BuilderwithSentinels(SentinelProfile... sentinels)Enable many Sentinels using the given profiles.StackModel.BuilderwithTelemetryProcessing()Enable the processing of telemetry & flows.StackModel.BuilderwithTimeSeriesStrategy(TimeSeriesStrategy timeSeriesStrategy)Type of service used to persist time series data.
-
-
-
Method Detail
-
withOpenNMS
public StackModel.Builder withOpenNMS(OpenNMSProfile opennms)
Profile for the OpenNMS container. Right now there can only be one, but we could extend this model to have many connected the same resources but using different database names and prefixes. Could also support different "roles" like a Web only server, etc...- Parameters:
opennms- profile to use- Returns:
- this builder
-
withMinion
public StackModel.Builder withMinion()
Enable one Minion using the default profile.- Returns:
- this builder
-
withMinions
public StackModel.Builder withMinions(MinionProfile... minions)
Enable many Minions using the given profiles.- Parameters:
minions- profiles to use- Returns:
- this builder
-
withMinion
public StackModel.Builder withMinion(Map<String,String> configuration)
Enable a Minion using the given configuration.- Parameters:
minion- configuration to use- Returns:
- this builder
-
withMinions
public StackModel.Builder withMinions(Map<String,String>... configurations)
Enable many Minions using the given configurations.- Parameters:
minions- configurations to use- Returns:
- this builder
-
withSentinel
public StackModel.Builder withSentinel()
Enable one Sentinel using the default profile.- Returns:
- this builder
-
withSentinels
public StackModel.Builder withSentinels(SentinelProfile... sentinels)
Enable many Sentinels using the given profiles.- Parameters:
sentinels- profiles to use- Returns:
- this builder
-
withElasticsearch
public StackModel.Builder withElasticsearch()
Enable Elastiscearch.- Returns:
- this builder
-
withIpcStrategy
public StackModel.Builder withIpcStrategy(IpcStrategy ipcStrategy)
Type of service used to communicate between Minion/OpenNMS/Sentinel- Parameters:
ipcStrategy- JMS vs Kafka, etc...- Returns:
- this builder
-
withTimeSeriesStrategy
public StackModel.Builder withTimeSeriesStrategy(TimeSeriesStrategy timeSeriesStrategy)
Type of service used to persist time series data.- Parameters:
timeSeriesStrategy- RRD vs Newts- Returns:
- this builder
-
withKafkaCompressionStrategy
public StackModel.Builder withKafkaCompressionStrategy(KafkaCompressionStrategy kafkaCompressionStrategy)
Type of compression used with Kafka messages.- Parameters:
kafkaCompressionStrategy- GZIP, SNAPPY, LZ4, ZSTD, or NONE- Returns:
- this builder
-
withTelemetryProcessing
public StackModel.Builder withTelemetryProcessing()
Enable the processing of telemetry & flows. This will automatically enable Elasticsearch and Newts if Sentinel is being used.- Returns:
- this builder
-
withBlobStoreStrategy
public StackModel.Builder withBlobStoreStrategy(BlobStoreStrategy blobStoreStrategy)
Choose the key value store to use for blobs.- Returns:
- this builder
-
withJsonStoreStrategy
public StackModel.Builder withJsonStoreStrategy(JsonStoreStrategy jsonStoreStrategy)
Choose the key value store to use for JSON documents.- Returns:
- this builder
-
build
public StackModel build()
Build the stack model- Returns:
- an immutable stack model
-
-