mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-08 03:49:38 +00:00
Merge pull request #9474 from AndreKR/export-hostname-for-config
Export the hostname as environment variable
This commit is contained in:
commit
a806314e2c
@ -148,6 +148,8 @@ launch_service()
|
||||
LANG=en_US.UTF-8
|
||||
LC_ALL=en_US.UTF-8
|
||||
|
||||
export HOSTNAME=`hostname -s`
|
||||
|
||||
# The es-foreground option will tell Elasticsearch not to close stdout/stderr, but it's up to us not to daemonize.
|
||||
if [ "x$daemonized" = "x" ]; then
|
||||
es_parms="$es_parms -Des.foreground=yes"
|
||||
|
Binary file not shown.
@ -208,6 +208,17 @@ node:
|
||||
name: <NAME OF YOUR NODE>
|
||||
--------------------------------------------------
|
||||
|
||||
The hostname of the machine is provided in an
|
||||
environment variable, so you can set the node name
|
||||
to the hostname, if on that machine you only run _a
|
||||
single elasticsearch node_ for that cluster.
|
||||
|
||||
[source,yaml]
|
||||
--------------------------------------------------
|
||||
node:
|
||||
name: ${HOSTNAME}
|
||||
--------------------------------------------------
|
||||
|
||||
Internally, all settings are collapsed into "namespaced" settings. For
|
||||
example, the above gets collapsed into `node.name`. This means that
|
||||
its easy to support other configuration formats, for example,
|
||||
|
Loading…
x
Reference in New Issue
Block a user