Skip to content

Commit b13df02

Browse files
author
Adam Locke
authored
[DOCS] Update archive install docs for security ON by default (#80375)
* [DOCS] Update archive install docs for security ON by default * Remove extra attribute references that aren't needed * Incorporate security info into start page * Update heading
1 parent 36ebac3 commit b13df02

File tree

9 files changed

+84
-28
lines changed

9 files changed

+84
-28
lines changed

docs/reference/setup/install/check-running.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
==== Checking that Elasticsearch is running
1+
==== Check that Elasticsearch is running
22

33
You can test that your {es} node is running by sending an HTTPS request to port
44
`9200` on `localhost`:
55

6-
[source,shell]
6+
["source","sh",subs="attributes"]
77
----
8-
curl --cacert /etc/elasticsearch/tls_auto_config_<timestamp>/http_ca.crt \
8+
curl --cacert {os-dir}/tls_auto_config_<timestamp>/http_ca.crt \
99
-u elastic https://localhost:9200 <1>
1010
----
1111
// NOTCONSOLE

docs/reference/setup/install/deb.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ endif::include-xpack[]
146146
include::systemd.asciidoc[]
147147

148148
[[deb-check-running]]
149+
150+
:os-dir: /etc/elasticsearch
151+
149152
include::check-running.asciidoc[]
150153

151154
[[deb-configuring]]

docs/reference/setup/install/rpm.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ endif::include-xpack[]
139139
include::systemd.asciidoc[]
140140

141141
[[rpm-check-running]]
142+
143+
:os-dir: /etc/elasticsearch
144+
142145
include::check-running.asciidoc[]
143146

144147
[[rpm-configuring]]

docs/reference/setup/install/security-files-reference.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
===== Security certificates and keys
33

44
When you install {es}, the following certificates and keys are
5-
generated in the `/etc/elasticsearch/tls_auto_config_<timestamp>` directory,
6-
which are used to connect a {kib} instance to your secured {es} cluster and
7-
to encrypt internode communication. The files are listed here for reference.
5+
generated in the {es} configuration directory, which are used to connect a {kib}
6+
instance to your secured {es} cluster and to encrypt internode communication.
7+
The files are listed here for reference.
88

99
`http_ca.crt`::
1010
The CA certificate that is used to sign the certificates for the HTTP layer of

docs/reference/setup/install/targz-daemon.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
==== Running as a daemon
1+
==== Run as a daemon
22

33
To run Elasticsearch as a daemon, specify `-d` on the command line, and record
44
the process ID in a file using the `-p` option:
Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,65 @@
1-
==== Running Elasticsearch from the command line
1+
==== Run {es} from the command line
22

3-
Elasticsearch can be started from the command line as follows:
3+
Run the following command to start {es} from the command line:
44

55
[source,sh]
6-
--------------------------------------------
6+
----
77
./bin/elasticsearch
8-
--------------------------------------------
8+
----
9+
10+
When starting {es} for the first time, security features are enabled and
11+
configured by default. The following security configuration occurs
12+
automatically:
13+
14+
* Authentication and authorization are enabled, and a password is generated for
15+
the `elastic` built-in superuser.
16+
* Certificates and keys for TLS are generated for the transport and HTTP layer,
17+
and TLS is enabled and configured with these keys and certificates.
18+
* An enrollment token is generated for {kib}, which is valid for 30 minutes.
19+
20+
The password for the `elastic` user and the enrollment token for {kib} are
21+
output to your terminal. For example:
22+
23+
[source,sh]
24+
----
25+
The generated password for the elastic built-in superuser is:
26+
H16Wd=K4dcmgZVA-GE2I
27+
28+
The enrollment token for Kibana instances, valid for the next 30 minutes:
29+
eyJ2ZXIiOiI4LjAuMCIsImFkciI6WyIxOTIuMTY4Ljg2LjEyMjo5MjAwIl0sImZnciI6ImU5MmVhYWM0ZWMzMGExY2EzMDA0MzM4NDgyM2I3Y2YwNTFkMWQ3OTdkNGJlNTQxYzE3ZWY4NGFiMzBjMjlmNGUiLCJrZXkiOiJFM05YNFh3QkVYOVV2SUs0QlU2YTphVEhESktYRVFEbTctUjlFYlBneGlnIn0=
30+
31+
The hex-encoded SHA-256 fingerprint of the generated HTTPS CA DER-encoded certificate:
32+
e92eaac4ec30a1ca30043384823b7cf051d1d797d4be541c17ef84ab30c29f4e
33+
34+
You can complete the following actions at any time:
35+
Reset the password of the elastic built-in superuser with
36+
'bin/elasticsearch-reset-password -u elastic'.
37+
38+
Generate an enrollment token for Kibana instances with
39+
'bin/elasticsearch-create-enrollment-token -s kibana'.
40+
41+
Generate an enrollment token for Elasticsearch nodes with
42+
'bin/elasticsearch-create-enrollment-token -s node'.
43+
----
944

1045
If you have password-protected the {es} keystore, you will be prompted
1146
to enter the keystore's password. See <<secure-settings>> for more
1247
details.
1348

1449
By default {es} prints its logs to the console (`stdout`) and to the `<cluster
1550
name>.log` file within the <<path-settings,logs directory>>. {es} logs some
16-
information while it is starting up, but once it has finished initializing it
51+
information while it is starting, but after it has finished initializing it
1752
will continue to run in the foreground and won't log anything further until
1853
something happens that is worth recording. While {es} is running you can
19-
interact with it through its HTTP interface which is on port 9200 by default.
54+
interact with it through its HTTP interface which is on port `9200` by default.
55+
2056
To stop {es}, press `Ctrl-C`.
2157

22-
NOTE: All scripts packaged with Elasticsearch require a version of Bash
58+
NOTE: All scripts packaged with {es} require a version of Bash
2359
that supports arrays and assume that Bash is available at `/bin/bash`.
2460
As such, Bash should be available at this path either directly or via a
2561
symbolic link.
2662

63+
To enroll additional nodes in your cluster, create an enrollment token with the
64+
`elasticsearch-create-enrollment-token` tool. You can then start a node with the `--enrollment-token` parameter so that it
65+
{ref}/configuring-stack-security.html#stack-enroll-nodes[joins an existing cluster].

docs/reference/setup/install/targz.asciidoc

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[[targz]]
2-
=== Install Elasticsearch from archive on Linux or MacOS
2+
=== Install {es} from archive on Linux or MacOS
33

4-
Elasticsearch is as a `.tar.gz` archive for Linux and MacOS.
4+
{es} is available as a `.tar.gz` archive for Linux and MacOS.
55

66
include::license.asciidoc[]
77

8-
The latest stable version of Elasticsearch can be found on the
9-
link:/downloads/elasticsearch[Download Elasticsearch] page.
8+
The latest stable version of {es} can be found on the
9+
link:/downloads/elasticsearch[Download {es}] page.
1010
Other versions can be found on the
1111
link:/downloads/past-releases[Past Releases page].
1212

13-
NOTE: Elasticsearch includes a bundled version of https://openjdk.java.net[OpenJDK]
13+
NOTE: {es} includes a bundled version of https://openjdk.java.net[OpenJDK]
1414
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
1515
see the <<jvm-version, JVM version requirements>>
1616

@@ -19,13 +19,13 @@ see the <<jvm-version, JVM version requirements>>
1919

2020
ifeval::["{release-state}"=="unreleased"]
2121

22-
Version {version} of Elasticsearch has not yet been released.
22+
Version {version} of {es} has not yet been released.
2323

2424
endif::[]
2525

2626
ifeval::["{release-state}"!="unreleased"]
2727

28-
The Linux archive for Elasticsearch v{version} can be downloaded and installed as follows:
28+
The Linux archive for {es} v{version} can be downloaded and installed as follows:
2929

3030
["source","sh",subs="attributes"]
3131
--------------------------------------------
@@ -46,13 +46,13 @@ endif::[]
4646

4747
ifeval::["{release-state}"=="unreleased"]
4848

49-
Version {version} of Elasticsearch has not yet been released.
49+
Version {version} of {es} has not yet been released.
5050

5151
endif::[]
5252

5353
ifeval::["{release-state}"!="unreleased"]
5454

55-
The MacOS archive for Elasticsearch v{version} can be downloaded and installed as follows:
55+
The MacOS archive for {es} v{version} can be downloaded and installed as follows:
5656

5757
["source","sh",subs="attributes"]
5858
--------------------------------------------
@@ -80,6 +80,8 @@ endif::include-xpack[]
8080
[[targz-running]]
8181
include::targz-start.asciidoc[]
8282

83+
:os-dir: $ES_HOME
84+
8385
include::check-running.asciidoc[]
8486

8587
Log printing to `stdout` can be disabled using the `-q` or `--quiet`
@@ -89,9 +91,9 @@ option on the command line.
8991
include::targz-daemon.asciidoc[]
9092

9193
[[targz-configuring]]
92-
==== Configuring Elasticsearch on the command line
94+
==== Configure {es} on the command line
9395

94-
Elasticsearch loads its configuration from the `$ES_HOME/config/elasticsearch.yml`
96+
{es} loads its configuration from the `$ES_HOME/config/elasticsearch.yml`
9597
file by default. The format of this config file is explained in
9698
<<settings>>.
9799

@@ -115,7 +117,7 @@ directories are, by default, contained within `$ES_HOME` -- the directory
115117
created when unpacking the archive.
116118

117119
This is very convenient because you don't have to create any directories to
118-
start using Elasticsearch, and uninstalling Elasticsearch is as easy as
120+
start using {es}, and uninstalling {es} is as easy as
119121
removing the `$ES_HOME` directory. However, it is advisable to change the
120122
default locations of the config directory, the data directory, and the logs
121123
directory so that you do not delete important data later on.
@@ -125,7 +127,7 @@ directory so that you do not delete important data later on.
125127
|=======================================================================
126128
| Type | Description | Default Location | Setting
127129
| home
128-
| Elasticsearch home directory or `$ES_HOME`
130+
| {es} home directory or `$ES_HOME`
129131
d| Directory created by unpacking the archive
130132
|
131133

@@ -140,6 +142,11 @@ directory so that you do not delete important data later on.
140142
| $ES_HOME/config
141143
| <<config-files-location,ES_PATH_CONF>>
142144

145+
| conf
146+
| Generated TLS keys and certificates for the transport and HTTP layer.
147+
| $ES_HOME/config/tls_auto_config_<timestamp>
148+
d|
149+
143150
| data
144151
| The location of the data files of each index / shard allocated
145152
on the node.
@@ -163,5 +170,5 @@ directory so that you do not delete important data later on.
163170

164171
|=======================================================================
165172

166-
173+
include::security-files-reference.asciidoc[]
167174
include::next-steps.asciidoc[]

docs/reference/setup/install/windows.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ TIP: Typically, any cluster-wide settings (like `cluster.name`) should be
368368
added to the `elasticsearch.yml` config file, while any node-specific settings
369369
such as `node.name` could be specified on the command line.
370370

371+
:os-dir: %ES_HOME%
372+
371373
include::check-running.asciidoc[]
372374

373375
[[msi-installer-windows-service]]

docs/reference/setup/install/zip-windows.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ TIP: Typically, any cluster-wide settings (like `cluster.name`) should be
8585
added to the `elasticsearch.yml` config file, while any node-specific settings
8686
such as `node.name` could be specified on the command line.
8787

88+
:os-dir: %ES_HOME%
89+
8890
include::check-running.asciidoc[]
8991

9092
[[windows-service]]

0 commit comments

Comments
 (0)