I'm using two -c yaml files on the docker-compose command line to provide override of Elasticsearch settings. I have the base settings in docker-compose.yml in the services.elasticsearch.environment, and the override in docker-compose.multi.yml.
The base file settings are for a single-node elasticsearch deployment, so include discovery.type=single-node. What config parameter can I use in docker-compose.multi.yml to override this discovery type and do a multi-node
base:
environment:
- cluster.name=cluster_name
- network.host=0.0.0.0
- ELASTIC_PASSWORD=${BOOTSTRAP_PASSWORD}
- node.name={{.Node.Hostname}}
- xpack.security.enabled=true
- discovery.type=single-node
multi override:
environment:
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=$INITIAL_MASTER_NODES
- xpack.security.transport.ssl.enabled=true
- xpack.security.transport.ssl.verification_mode=certificate
- xpack.security.transport.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt
- xpack.security.transport.ssl.certificate=$CERTS_DIR/instance/instance.crt
- xpack.security.transport.ssl.key=$CERTS_DIR/instance/instance.key
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
I tried discover.type=multi-node, and then also tried leaving discovery.type out of the override as I've shown here.
With multi-node ES complains about unknown type.
Without an override discovery.type I get this error
setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]
Is there a discovery.type setting that can override single-node value to work with multi-node deployment?