Skip to content

Commit 1301995

Browse files
authored
[DOCS] Remove unneeded ifevals from install docs (#98952)
Problem: The current install docs contain several `ifeval` statements that hide commands and code snippets based on the branch's release state. These statements make the Asciidoc hard to read and maintain. It also makes doc changes difficult to preview. Solution: Remove `ifeval` statements that hide commands or code snippets. Leave in any `ifeval` statements used to add warnings.
1 parent 73293dc commit 1301995

File tree

7 files changed

+14
-69
lines changed

7 files changed

+14
-69
lines changed

docs/plugins/install_remove.asciidoc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
ifeval::["{release-state}"=="unreleased"]
66

7-
Version {version} of the Elastic Stack has not yet been released.
7+
WARNING: Version {version} of the Elastic Stack has not yet been released.
88

99
endif::[]
1010

11-
ifeval::["{release-state}"!="unreleased"]
12-
1311
This plugin can be installed using the plugin manager:
1412

1513
["source","sh",subs="attributes,callouts"]
@@ -25,7 +23,6 @@ install>> from {plugin_url}/{plugin_name}/{plugin_name}-{version}.zip. To verify
2523
the `.zip` file, use the
2624
{plugin_url}/{plugin_name}/{plugin_name}-{version}.zip.sha512[SHA hash] or
2725
{plugin_url}/{plugin_name}/{plugin_name}-{version}.zip.asc[ASC key].
28-
endif::[]
2926

3027
[discrete]
3128
[id="{plugin_name}-remove"]

docs/reference/setup/install/deb.asciidoc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearm
3030

3131
ifeval::["{release-state}"=="unreleased"]
3232

33-
Version {version} of Elasticsearch has not yet been released.
33+
WARNING: Version {version} of Elasticsearch has not yet been released.
3434

3535
endif::[]
3636

37-
ifeval::["{release-state}"!="unreleased"]
38-
3937
You may need to install the `apt-transport-https` package on Debian before proceeding:
4038

4139
[source,sh]
@@ -52,8 +50,6 @@ ifeval::["{release-state}"=="released"]
5250
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/{major-version}/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-{major-version}.list
5351
--------------------------------------------------
5452

55-
endif::[]
56-
5753
ifeval::["{release-state}"=="prerelease"]
5854

5955
["source","sh",subs="attributes,callouts"]
@@ -110,12 +106,10 @@ include::skip-set-kernel-parameters.asciidoc[]
110106

111107
ifeval::["{release-state}"=="unreleased"]
112108

113-
Version {version} of Elasticsearch has not yet been released.
109+
WARNING: Version {version} of Elasticsearch has not yet been released.
114110

115111
endif::[]
116112

117-
ifeval::["{release-state}"!="unreleased"]
118-
119113
The Debian package for Elasticsearch v{version} can be downloaded from the website and installed as follows:
120114

121115
["source","sh",subs="attributes"]
@@ -128,8 +122,6 @@ sudo dpkg -i elasticsearch-{version}-amd64.deb
128122
<1> Compares the SHA of the downloaded Debian package and the published checksum, which should output
129123
`elasticsearch-{version}-amd64.deb: OK`.
130124

131-
endif::[]
132-
133125
// Set a `distro` attribute so we can reuse files containing anchors
134126
:distro: deb
135127
[id="deb-security-configuration"]

docs/reference/setup/install/docker.asciidoc

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,11 @@ Docker image is currently available for this version.
3333

3434
endif::[]
3535

36-
ifeval::["{release-state}"!="unreleased"]
37-
3836
[source,sh,subs="attributes"]
3937
----
4038
docker pull {docker-repo}:{version}
4139
----
4240

43-
endif::[]
44-
4541
[[docker-verify-signature]]
4642
==== Optional: Verify the image signature
4743

@@ -57,8 +53,6 @@ Docker image signature is currently available for this version.
5753

5854
endif::[]
5955

60-
ifeval::["{release-state}"!="unreleased"]
61-
6256
Install the appropriate https://docs.sigstore.dev/cosign/installation/[Cosign application]
6357
for your operating system.
6458

@@ -83,8 +77,6 @@ The following checks were performed on each of these signatures:
8377
- The signatures were verified against the specified public key
8478
--------------------------------------------
8579

86-
endif::[]
87-
8880

8981
[[docker-cli-run-dev-mode]]
9082
==== Run {es} in Docker
@@ -123,7 +115,6 @@ Docker image is currently available for this version.
123115

124116
endif::[]
125117

126-
ifeval::["{release-state}"!="unreleased"]
127118
[source,sh,subs="attributes"]
128119
----
129120
docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB {docker-image}
@@ -132,8 +123,6 @@ docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB {docker-image}
132123
TIP: Use the `-m` flag to set a memory limit for the container.
133124

134125
The command prints the `elastic` user password and an enrollment token for {kib}.
135-
136-
endif::[]
137126
--
138127

139128
. Copy the generated `elastic` password and enrollment token. These credentials
@@ -193,13 +182,10 @@ Docker image is currently available for this version.
193182

194183
endif::[]
195184

196-
ifeval::["{release-state}"!="unreleased"]
197185
[source,sh,subs="attributes"]
198186
----
199187
docker run -e ENROLLMENT_TOKEN="<token>" --name es02 --net elastic -it {docker-image}
200188
----
201-
202-
endif::[]
203189
--
204190

205191
. Call the <<cat-nodes,cat nodes API>> to verify the node was added to the cluster.
@@ -265,15 +251,13 @@ repository on GitHub.
265251

266252
--
267253
ifeval::["{release-state}"=="unreleased"]
268-
NOTE: Version {version} of {es} has not been released,
269-
so the sample Docker Compose and configuration files are not yet available for
270-
this version. See the {stack-gs-current}/get-started-docker.html[current version]
271-
for the latest sample files.
254+
WARNING: Version {version} of {es} has not been released,
255+
so the following Docker Compose and configuration files won't work.
256+
See the {stack-gs-current}/get-started-docker.html[current version]
257+
for the latest working files.
272258
endif::[]
273259
--
274260

275-
--
276-
ifeval::["{release-state}"!="unreleased"]
277261

278262
[discrete]
279263
[[docker-env-file]]
@@ -315,8 +299,6 @@ then only be accessible from the host machine itself.
315299
include::docker/docker-compose.yml[]
316300
----
317301

318-
endif::[]
319-
--
320302

321303
===== Start your cluster with security enabled and configured
322304

@@ -687,7 +669,6 @@ instead. The command must:
687669
* Use the `elasticsearch-keystore` tool with the `create -p` option. You'll be
688670
prompted to enter a password for the keystore.
689671

690-
ifeval::["{release-state}"!="unreleased"]
691672
For example:
692673

693674
[source,sh,subs="attributes"]
@@ -711,7 +692,6 @@ bin/elasticsearch-keystore \
711692
add my.secure.setting \
712693
my.other.secure.setting
713694
----
714-
endif::[]
715695

716696
If you've already created the keystore and don't need to update it, you can
717697
bind-mount the `elasticsearch.keystore` file directly. You can use the

docs/reference/setup/install/rpm.asciidoc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
3434

3535
ifeval::["{release-state}"=="unreleased"]
3636

37-
Version {version} of Elasticsearch has not yet been released.
37+
WARNING: Version {version} of Elasticsearch has not yet been released.
3838

3939
endif::[]
4040

41-
ifeval::["{release-state}"!="unreleased"]
42-
4341
Create a file called `elasticsearch.repo` in the `/etc/yum.repos.d/` directory
4442
for RedHat based distributions, or in the `/etc/zypp/repos.d/` directory for
4543
OpenSuSE based distributions, containing:
@@ -58,8 +56,6 @@ autorefresh=1
5856
type=rpm-md
5957
--------------------------------------------------
6058

61-
endif::[]
62-
6359
ifeval::["{release-state}"=="prerelease"]
6460

6561
["source","sh",subs="attributes,callouts"]
@@ -101,12 +97,10 @@ endif::[]
10197

10298
ifeval::["{release-state}"=="unreleased"]
10399

104-
Version {version} of Elasticsearch has not yet been released.
100+
WARNING: Version {version} of Elasticsearch has not yet been released.
105101

106102
endif::[]
107103

108-
ifeval::["{release-state}"!="unreleased"]
109-
110104
The RPM for Elasticsearch v{version} can be downloaded from the website and installed as follows:
111105

112106
["source","sh",subs="attributes"]
@@ -119,8 +113,6 @@ sudo rpm --install elasticsearch-{version}-x86_64.rpm
119113
<1> Compares the SHA of the downloaded RPM and the published checksum, which should output
120114
`elasticsearch-{version}-x86_64.rpm: OK`.
121115

122-
endif::[]
123-
124116
include::skip-set-kernel-parameters.asciidoc[]
125117

126118
// Set a `distro` attribute so we can reuse files containing anchors

docs/reference/setup/install/targz.asciidoc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ see the <<jvm-version, JVM version requirements>>
1919

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

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

2424
endif::[]
2525

26-
ifeval::["{release-state}"!="unreleased"]
27-
2826
The Linux archive for {es} v{version} can be downloaded and installed as follows:
2927

3028
["source","sh",subs="attributes"]
@@ -39,19 +37,15 @@ cd elasticsearch-{version}/ <2>
3937
`elasticsearch-{version}-linux-x86_64.tar.gz: OK`.
4038
<2> This directory is known as `$ES_HOME`.
4139

42-
endif::[]
43-
4440
[[install-macos]]
4541
==== Download and install archive for MacOS
4642

4743
ifeval::["{release-state}"=="unreleased"]
4844

49-
Version {version} of {es} has not yet been released.
45+
WARNING: Version {version} of {es} has not yet been released.
5046

5147
endif::[]
5248

53-
ifeval::["{release-state}"!="unreleased"]
54-
5549
The MacOS archive for {es} v{version} can be downloaded and installed as follows:
5650

5751
["source","sh",subs="attributes"]
@@ -67,8 +61,6 @@ cd elasticsearch-{version}/ <2>
6761
`elasticsearch-{version}-darwin-x86_64.tar.gz: OK`.
6862
<2> This directory is known as `$ES_HOME`.
6963

70-
endif::[]
71-
7264
ifdef::include-xpack[]
7365
[role="xpack"]
7466
[[targz-enable-indices]]

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ see the <<jvm-version, JVM version requirements>>
2929

3030
ifeval::["{release-state}"=="unreleased"]
3131

32-
Version {version} of {es} has not yet been released.
32+
WARNING: Version {version} of {es} has not yet been released.
3333

3434
endif::[]
3535

36-
ifeval::["{release-state}"!="unreleased"]
37-
3836
Download the `.zip` archive for {es} {version} from: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-windows-x86_64.zip
3937

4038
Unzip it with your favorite unzip tool. This will create a folder called
@@ -46,8 +44,6 @@ window, `cd` to the `%ES_HOME%` directory, for instance:
4644
cd C:\elasticsearch-{version}
4745
----------------------------
4846

49-
endif::[]
50-
5147
ifdef::include-xpack[]
5248
[role="xpack"]
5349
[[windows-enable-indices]]

docs/reference/setup/run-elasticsearch-locally.asciidoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,16 @@ Desktop]. Go to **Preferences > Resources > Advanced** and set Memory to at leas
3434
. Start an Elasticsearch container:
3535
ifeval::["{release-state}"=="unreleased"]
3636
+
37-
NOTE: Version {version} of {es} has not yet been released, so no
37+
WARNING: Version {version} of {es} has not yet been released, so no
3838
Docker image is currently available for this version.
3939
endif::[]
40-
ifeval::["{release-state}"!="unreleased"]
4140
+
4241
[source,sh,subs="attributes"]
4342
----
4443
docker network create elastic
4544
docker pull docker.elastic.co/elasticsearch/elasticsearch:{version}
4645
docker run --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -t docker.elastic.co/elasticsearch/elasticsearch:{version}
4746
----
48-
endif::[]
4947
+
5048
When you start Elasticsearch for the first time, the generated `elastic` user password and
5149
Kibana enrollment token are output to the terminal.
@@ -65,17 +63,15 @@ Kibana enables you to easily send requests to Elasticsearch and analyze, visuali
6563
. In a new terminal session, start Kibana and connect it to your Elasticsearch container:
6664
ifeval::["{release-state}"=="unreleased"]
6765
+
68-
NOTE: Version {version} of {kib} has not yet been released, so no
66+
WARNING: Version {version} of {kib} has not yet been released, so no
6967
Docker image is currently available for this version.
7068
endif::[]
71-
ifeval::["{release-state}"!="unreleased"]
7269
+
7370
[source,sh,subs="attributes"]
7471
----
7572
docker pull docker.elastic.co/kibana/kibana:{version}
7673
docker run --name kibana --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:{version}
7774
----
78-
endif::[]
7975
+
8076
When you start Kibana, a unique URL is output to your terminal.
8177

0 commit comments

Comments
 (0)