Back to Conductor

OpenSearch 2.x Persistence

os-persistence-v2/README.md

2019-04-12-13004.2 KB
Original Source

OpenSearch 2.x Persistence

This module provides OpenSearch 2.x persistence for indexing workflows and tasks in Conductor.

Overview

The os-persistence-v2 module targets OpenSearch 2.x clusters (2.0 through 2.18+). It uses the opensearch-java 2.18.0 client with dependency shading to prevent classpath conflicts when the server is deployed alongside the os-persistence-v3 module.

Configuration

Set the following properties to enable OpenSearch 2.x indexing:

properties
conductor.indexing.enabled=true
conductor.indexing.type=opensearch2

# URL of the OpenSearch cluster (comma-separated for multiple nodes)
conductor.opensearch.url=http://localhost:9200

# Index prefix (default: conductor)
conductor.opensearch.indexPrefix=conductor

All Configuration Properties

PropertyDefaultDescription
conductor.opensearch.urllocalhost:9201Comma-separated list of OpenSearch node URLs. Supports http:// and https:// schemes.
conductor.opensearch.indexPrefixconductorPrefix used when creating indices.
conductor.opensearch.clusterHealthColorgreenCluster health color to wait for before starting (green, yellow).
conductor.opensearch.indexBatchSize1Number of documents per batch when async indexing is enabled.
conductor.opensearch.asyncWorkerQueueSize100Size of the async indexing task queue.
conductor.opensearch.asyncMaxPoolSize12Maximum threads in the async indexing pool.
conductor.opensearch.asyncBufferFlushTimeout10sHow long async buffers are held before being flushed.
conductor.opensearch.indexShardCount5Number of shards per index.
conductor.opensearch.indexReplicasCount0Number of replicas per index.
conductor.opensearch.taskLogResultLimit10Maximum task log entries returned per query.
conductor.opensearch.restClientConnectionRequestTimeout-1Connection request timeout in ms (-1 = unlimited).
conductor.opensearch.autoIndexManagementEnabledtrueWhether Conductor creates and manages indices automatically.
conductor.opensearch.username(none)Username for basic authentication.
conductor.opensearch.password(none)Password for basic authentication.

Basic Authentication

To connect to a secured OpenSearch cluster:

properties
conductor.opensearch.username=myuser
conductor.opensearch.password=mypassword

Single-Node / Development Clusters

A single-node cluster cannot achieve green health because replica shards have nowhere to be assigned. Set:

properties
conductor.opensearch.clusterHealthColor=yellow
conductor.opensearch.indexReplicasCount=0

External Index Management

If you manage OpenSearch indices externally (e.g., via ILM policies or Terraform):

properties
conductor.opensearch.autoIndexManagementEnabled=false

Migration from Legacy opensearch Type

If you previously used conductor.indexing.type=opensearch, update to opensearch2:

properties
# Before
conductor.indexing.type=opensearch
conductor.elasticsearch.url=http://localhost:9200

# After
conductor.indexing.type=opensearch2
conductor.opensearch.url=http://localhost:9200

The conductor.elasticsearch.* namespace is still accepted for backward compatibility but is deprecated. A warning is logged at startup when legacy properties are detected.

Docker Compose

shell
docker compose -f docker/docker-compose-redis-os2.yaml up

This starts Conductor, Redis, and OpenSearch 2.18.0.

Dependency Isolation

OpenSearch 2.x and 3.x use identical Java package names (org.opensearch.client.*). This module uses the Shadow plugin to relocate all OpenSearch client classes to an isolated namespace:

org.opensearch.client → org.conductoross.conductor.os2.shaded.opensearch.client

This allows both os-persistence-v2 and os-persistence-v3 to coexist on the same classpath without conflicts.

See Also