TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/wikioasis/salt/llms.txt
Use this file to discover all available pages before exploring further.
opensearch Salt state provisions and manages OpenSearch 1.3.x on every opensearch* server in the WikiOasis fleet. It configures an apt repository, installs the package with the demo security config disabled, renders opensearch.yml from pillar data, tunes the JVM heap via jvm.options.d/heap.options, and keeps the service running. OpenSearch serves as the backend for the MediaWiki CirrusSearch extension.
State overview
APT repository
Creates
/etc/apt/sources.list.d/opensearch.list pointing to the OpenSearch 1.x apt repository with trusted=yes to bypass SHA1 key validation (see note below).Package installation
Runs
apt-get install -y --allow-downgrades opensearch=1.3.* with DISABLE_INSTALL_DEMO_CONFIG=true and DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI=true to skip the interactive post-install scripts. The unless guard prevents re-running if a 1.3.x version is already installed.Main configuration
Renders
/etc/opensearch/opensearch.yml from the Jinja template, owned by root:opensearch, mode 0660.JVM heap options
Renders
/etc/opensearch/jvm.options.d/heap.options to set -Xms and -Xmx from the opensearch:heap_size pillar key.Configuration template (opensearch.yml)
The template derives the node name from the Salt minion ID (the hostname prefix before the first .), and builds the discovery seed host and initial master node lists from the opensearch:nodes pillar key. The OpenSearch security plugin is disabled (plugins.security.disabled: true) since the cluster operates on a private VLAN.
JVM heap configuration
The heap options template produces a minimal options file that sets both the initial (-Xms) and maximum (-Xmx) heap to the same value, which is the recommended configuration for OpenSearch to avoid heap resizing pauses.
Always set
-Xms equal to -Xmx to prevent the JVM from resizing the heap at runtime. As a rule of thumb, set the heap to 50% of available RAM and no more than 31 GB (to stay within the JVM’s compressed oops threshold).Pillar reference
| Key | Default | Description |
|---|---|---|
cluster_name | wikioasis-search | OpenSearch cluster name — must be identical across all nodes |
heap_size | 1g | JVM heap size, written as both -Xms and -Xmx |
http_port | 9200 | REST API port |
transport_port | 9300 | Inter-node transport port |
nodes | [] | List of cluster nodes for discovery and master election |
nodes[].name | — | Node name (matches minion ID prefix) |
nodes[].host | — | Fully-qualified hostname used for seed discovery |
Pillar example
Fleet topology
opensearch-us-east-011
First cluster node. VM ID 150 on
metal-us-east-01 at 10.0.1.50. Runs master, data, and ingest roles.opensearch-us-east-012
Second cluster node. VM ID 151 on
metal-us-east-01 at 10.0.1.51. Runs master, data, and ingest roles.