Skip to content

Commit

Permalink
[DOCS] [7.7] Clarifying env variable substitution (#57370) (#57736)
Browse files Browse the repository at this point in the history
* Clarifying environment variable substitution in the ES configuration YAML
* Update code snippet
* Remove extraneous quotes from string example
* Incorporating review feedback
  • Loading branch information
Adam Locke authored Jun 5, 2020
1 parent cd80abd commit 13258e0
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion docs/reference/setup/configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,44 @@ path.logs: /var/log/elasticsearch

Environment variables referenced with the `${...}` notation within the
configuration file will be replaced with the value of the environment
variable, for instance:
variable. For example:

[source,yaml]
--------------------------------------------------
node.name: ${HOSTNAME}
network.host: ${ES_NETWORK_HOST}
--------------------------------------------------

Values for environment variables must be simple strings. Use a comma-separated string to provide values that Elasticsearch will parse as a list. For example, Elasticsearch will split the following string into a list of values for the `${HOSTNAME}` environment variable:

[source,yaml]
----
export HOSTNAME=“host1,host2"
----

[discrete]
[[cluster-setting-types]]
=== Cluster and node setting types

Cluster and node settings can be categorized based on how they are configured:

[[dynamic-cluster-setting]]
Dynamic::
You can configure and update dynamic settings on a running cluster using the
<<cluster-update-settings,cluster update settings API>>.
+
You can also configure dynamic settings locally on an unstarted or shut down
node using `elasticsearch.yml`.
+
TIP: It’s best to set dynamic, cluster-wide settings with the cluster update
settings API and use `elasticsearch.yml` only for local configurations. Using
the cluster update settings API ensures the setting is the same on all nodes. If
you accidentally configure different settings in `elasticsearch.yml` on
different nodes, it can be difficult to notice discrepancies.

[[static-cluster-setting]]
Static::
Static settings can only be configured on an unstarted or shut down node using
`elasticsearch.yml`.
+
Static settings must be set on every relevant node in the cluster.

0 comments on commit 13258e0

Please sign in to comment.