Skip to content

Commit 44e6f40

Browse files
author
Colleen McGinnis
authored
[docs] Use version variables (elastic#45510)
* use version variables * fix remaining version sub * fix variable syntax
1 parent 6e0aa1f commit 44e6f40

57 files changed

Lines changed: 273 additions & 277 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/docset.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ toc:
1414
- toc: release-notes
1515
- toc: extend
1616
subs:
17-
version: "9.0.0"
1817
beats-ref: "https://www.elastic.co/guide/en/beats/libbeat/current"
1918
ecloud: "Elastic Cloud"
2019
ess: "Elasticsearch Service"
@@ -46,8 +45,5 @@ subs:
4645
elastic-sec: "Elastic Security"
4746
monitoring: "X-Pack monitoring"
4847
monitor-features: "monitoring features"
49-
stack-version: "9.0.0"
50-
major-version: "9.0"
51-
major-release: "9.x"
5248
beats-pull: "https://github.com/elastic/beats/pull/"
5349
beats-issue: "https://github.com/elastic/beats/issues/"

docs/reference/auditbeat/auditbeat-installation-configuration.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,38 +48,38 @@ To download and install Auditbeat, use the commands that work with your system:
4848
::::::{tab-item} DEB
4949
:sync: deb
5050
```shell subs=true
51-
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{stack-version}}-amd64.deb
52-
sudo dpkg -i auditbeat-{{stack-version}}-amd64.deb
51+
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{version.stack}}-amd64.deb
52+
sudo dpkg -i auditbeat-{{version.stack}}-amd64.deb
5353
```
5454
::::::
5555

5656
::::::{tab-item} RPM
5757
:sync: rpm
5858
```shell subs=true
59-
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{stack-version}}-x86_64.rpm
60-
sudo rpm -vi auditbeat-{{stack-version}}-x86_64.rpm
59+
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{version.stack}}-x86_64.rpm
60+
sudo rpm -vi auditbeat-{{version.stack}}-x86_64.rpm
6161
```
6262
::::::
6363

6464
::::::{tab-item} MacOS
6565
:sync: macos
6666
```shell subs=true
67-
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{stack-version}}-darwin-x86_64.tar.gz
68-
tar xzvf auditbeat-{{stack-version}}-darwin-x86_64.tar.gz
67+
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{version.stack}}-darwin-x86_64.tar.gz
68+
tar xzvf auditbeat-{{version.stack}}-darwin-x86_64.tar.gz
6969
```
7070
::::::
7171

7272
::::::{tab-item} Linux
7373
:sync: linux
7474
```shell subs=true
75-
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{stack-version}}-linux-x86_64.tar.gz
76-
tar xzvf auditbeat-{{stack-version}}-linux-x86_64.tar.gz
75+
curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{version.stack}}-linux-x86_64.tar.gz
76+
tar xzvf auditbeat-{{version.stack}}-linux-x86_64.tar.gz
7777
```
7878
::::::
7979

8080
::::::{tab-item} Windows
8181
:sync: windows
82-
1. Download the [Auditbeat Windows zip file](https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{stack-version}}-windows-x86_64.zip).
82+
1. Download the [Auditbeat Windows zip file](https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{{version.stack}}-windows-x86_64.zip).
8383

8484
2. Extract the contents of the zip file into `C:\Program Files`.
8585

docs/reference/auditbeat/auditbeat-template.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ auditbeat setup --index-management -E output.logstash.enabled=false -E 'output.e
9797
**docker:**
9898

9999
```sh subs=true
100-
docker run --rm docker.elastic.co/beats/auditbeat:{{stack-version}} setup --index-management -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'
100+
docker run --rm docker.elastic.co/beats/auditbeat:{{version.stack}} setup --index-management -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'
101101
```
102102

103103
**win:**
@@ -171,58 +171,58 @@ auditbeat export template > auditbeat.template.json
171171
**win:**
172172

173173
```sh subs=true
174-
PS > .\auditbeat.exe export template --es.version {{stack-version}} | Out-File -Encoding UTF8 auditbeat.template.json
174+
PS > .\auditbeat.exe export template --es.version {{version.stack}} | Out-File -Encoding UTF8 auditbeat.template.json
175175
```
176176

177177
To install the template, run:
178178

179179
**deb and rpm:**
180180

181181
```sh subs=true
182-
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_index_template/auditbeat-{{stack-version}} -d@auditbeat.template.json
182+
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_index_template/auditbeat-{{version.stack}} -d@auditbeat.template.json
183183
```
184184

185185
**mac:**
186186

187187
```sh subs=true
188-
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_index_template/auditbeat-{{stack-version}} -d@auditbeat.template.json
188+
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_index_template/auditbeat-{{version.stack}} -d@auditbeat.template.json
189189
```
190190

191191
**linux:**
192192

193193
```sh subs=true
194-
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_index_template/auditbeat-{{stack-version}} -d@auditbeat.template.json
194+
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_index_template/auditbeat-{{version.stack}} -d@auditbeat.template.json
195195
```
196196

197197
**win:**
198198

199199
```sh subs=true
200-
PS > Invoke-RestMethod -Method Put -ContentType "application/json" -InFile auditbeat.template.json -Uri http://localhost:9200/_index_template/auditbeat-{{stack-version}}
200+
PS > Invoke-RestMethod -Method Put -ContentType "application/json" -InFile auditbeat.template.json -Uri http://localhost:9200/_index_template/auditbeat-{{version.stack}}
201201
```
202202

203-
Once you have loaded the index template, load the data stream as well. If you do not load it, you have to give the publisher user `manage` permission on auditbeat-{{stack-version}} index.
203+
Once you have loaded the index template, load the data stream as well. If you do not load it, you have to give the publisher user `manage` permission on auditbeat-{{version.stack}} index.
204204

205205
**deb and rpm:**
206206

207207
```sh subs=true
208-
curl -XPUT http://localhost:9200/_data_stream/auditbeat-{{stack-version}}
208+
curl -XPUT http://localhost:9200/_data_stream/auditbeat-{{version.stack}}
209209
```
210210

211211
**mac:**
212212

213213
```sh subs=true
214-
curl -XPUT http://localhost:9200/_data_stream/auditbeat-{{stack-version}}
214+
curl -XPUT http://localhost:9200/_data_stream/auditbeat-{{version.stack}}
215215
```
216216

217217
**linux:**
218218

219219
```sh subs=true
220-
curl -XPUT http://localhost:9200/_data_stream/auditbeat-{{stack-version}}
220+
curl -XPUT http://localhost:9200/_data_stream/auditbeat-{{version.stack}}
221221
```
222222

223223
**win:**
224224

225225
```sh subs=true
226-
PS > Invoke-RestMethod -Method Put -Uri http://localhost:9200/_data_stream/auditbeat-{{stack-version}}
226+
PS > Invoke-RestMethod -Method Put -Uri http://localhost:9200/_data_stream/auditbeat-{{version.stack}}
227227
```
228228

docs/reference/auditbeat/command-line-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Also see [Global flags](#global-flags).
9191

9292
```sh subs=true
9393
auditbeat export config
94-
auditbeat export template --es.version {{stack-version}}
94+
auditbeat export template --es.version {{version.stack}}
9595
auditbeat export dashboard --id="a7b35890-8baa-11e8-9676-ef67484126fb" > dashboard.json
9696
```
9797

docs/reference/auditbeat/http-endpoint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ curl -XGET 'localhost:5066/?pretty'
6666
"hostname": "example.lan",
6767
"name": "example.lan",
6868
"uuid": "34f6c6e1-45a8-4b12-9125-11b3e6e89866",
69-
"version": "{{stack-version}}"
69+
"version": "{{version.stack}}"
7070
}
7171
```
7272

docs/reference/auditbeat/load-kibana-dashboards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ auditbeat setup --dashboards
4444

4545
::::::{tab-item} Docker
4646
```sh subs=true
47-
docker run --rm --net="host" docker.elastic.co/beats/auditbeat:{{stack-version}} setup --dashboards
47+
docker run --rm --net="host" docker.elastic.co/beats/auditbeat:{{version.stack}} setup --dashboards
4848
```
4949
::::::
5050

@@ -120,7 +120,7 @@ auditbeat setup -e \
120120

121121
::::::{tab-item} Docker
122122
```sh subs=true
123-
docker run --rm --net="host" docker.elastic.co/beats/auditbeat:{{stack-version}} setup -e \
123+
docker run --rm --net="host" docker.elastic.co/beats/auditbeat:{{version.stack}} setup -e \
124124
-E output.logstash.enabled=false \
125125
-E output.elasticsearch.hosts=['localhost:9200'] \
126126
-E output.elasticsearch.username=auditbeat_internal \

docs/reference/auditbeat/logstash-output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Every event sent to {{ls}} contains the following metadata fields that you can u
3838
...
3939
"@metadata": { <1>
4040
"beat": "auditbeat", <2>
41-
"version": "{{stack-version}}" <3>
41+
"version": "{{version.stack}}" <3>
4242
}
4343
}
4444
```

docs/reference/auditbeat/running-on-docker.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ These images are free to use under the Elastic license. They contain open source
1616
Obtaining Auditbeat for Docker is as simple as issuing a `docker pull` command against the Elastic Docker registry.
1717

1818
% ::::{warning} subs=true
19-
% Version {{stack-version}} of Auditbeat has not yet been released. No Docker image is currently available for Auditbeat {{stack-version}}.
19+
% Version {{version.stack}} of Auditbeat has not yet been released. No Docker image is currently available for Auditbeat {{version.stack}}.
2020
% ::::
2121

2222

2323
```sh subs=true
24-
docker pull docker.elastic.co/beats/auditbeat:{{stack-version}}
24+
docker pull docker.elastic.co/beats/auditbeat:{{version.stack}}
2525
```
2626

2727
Alternatively, you can download other Docker images that contain only features available under the Apache 2.0 license. To download the images, go to [www.docker.elastic.co](https://www.docker.elastic.co).
2828

2929
As another option, you can use the hardened [Wolfi](https://wolfi.dev/) image. Using Wolfi images requires Docker version 20.10.10 or higher. For details about why the Wolfi images have been introduced, refer to our article [Reducing CVEs in Elastic container images](https://www.elastic.co/blog/reducing-cves-in-elastic-container-images).
3030

3131
```bash subs=true
32-
docker pull docker.elastic.co/beats/auditbeat-wolfi:{{stack-version}}
32+
docker pull docker.elastic.co/beats/auditbeat-wolfi:{{version.stack}}
3333
```
3434

3535

@@ -38,19 +38,19 @@ docker pull docker.elastic.co/beats/auditbeat-wolfi:{{stack-version}}
3838
You can use the [Cosign application](https://docs.sigstore.dev/cosign/installation/) to verify the Auditbeat Docker image signature.
3939

4040
% ::::{warning} subs=true
41-
% Version {{stack-version}} of Auditbeat has not yet been released. No Docker image is currently available for Auditbeat {{stack-version}}.
41+
% Version {{version.stack}} of Auditbeat has not yet been released. No Docker image is currently available for Auditbeat {{version.stack}}.
4242
% ::::
4343

4444

4545
```sh subs=true
4646
wget https://artifacts.elastic.co/cosign.pub
47-
cosign verify --key cosign.pub docker.elastic.co/beats/auditbeat:{{stack-version}}
47+
cosign verify --key cosign.pub docker.elastic.co/beats/auditbeat:{{version.stack}}
4848
```
4949

5050
The `cosign` command prints the check results and the signature payload in JSON format:
5151

5252
```sh subs=true
53-
Verification for docker.elastic.co/beats/auditbeat:{{stack-version}} --
53+
Verification for docker.elastic.co/beats/auditbeat:{{version.stack}} --
5454
The following checks were performed on each of these signatures:
5555
- The cosign claims were validated
5656
- Existence of the claims in the transparency log was verified offline
@@ -71,7 +71,7 @@ Running Auditbeat with the setup command will create the index pattern and load
7171
docker run --rm \
7272
--cap-add="AUDIT_CONTROL" \
7373
--cap-add="AUDIT_READ" \
74-
docker.elastic.co/beats/auditbeat:{{stack-version}} \
74+
docker.elastic.co/beats/auditbeat:{{version.stack}} \
7575
setup -E setup.kibana.host=kibana:5601 \
7676
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
7777
```
@@ -96,7 +96,7 @@ For example:
9696
docker run --rm \
9797
--mount type=bind,source=$(pwd)/data,destination=/usr/share/auditbeat/data \
9898
--read-only \
99-
docker.elastic.co/beats/auditbeat:{{stack-version}}
99+
docker.elastic.co/beats/auditbeat:{{version.stack}}
100100
```
101101

102102

@@ -109,7 +109,7 @@ The Docker image provides several methods for configuring Auditbeat. The convent
109109
Download this example configuration file as a starting point:
110110

111111
```sh subs=true
112-
curl -L -O https://raw.githubusercontent.com/elastic/beats/{{major-version}}/deploy/docker/auditbeat.docker.yml
112+
curl -L -O https://raw.githubusercontent.com/elastic/beats/{{ version.stack | M.M }}/deploy/docker/auditbeat.docker.yml
113113
```
114114

115115

@@ -125,7 +125,7 @@ docker run -d \
125125
--cap-add="AUDIT_CONTROL" \
126126
--cap-add="AUDIT_READ" \
127127
--pid=host \
128-
docker.elastic.co/beats/auditbeat:{{stack-version}} -e \
128+
docker.elastic.co/beats/auditbeat:{{version.stack}} -e \
129129
--strict.perms=false \
130130
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
131131
```
@@ -145,7 +145,7 @@ The `auditbeat.docker.yml` downloaded earlier should be customized for your envi
145145
It’s possible to embed your Auditbeat configuration in a custom image. Here is an example Dockerfile to achieve this:
146146

147147
```dockerfile subs=true
148-
FROM docker.elastic.co/beats/auditbeat:{{stack-version}}
148+
FROM docker.elastic.co/beats/auditbeat:{{version.stack}}
149149
COPY auditbeat.yml /usr/share/auditbeat/auditbeat.yml
150150
```
151151

@@ -158,7 +158,7 @@ Under Docker, Auditbeat runs as a non-root user, but requires some privileged ca
158158
It is also essential to run Auditbeat in the host PID namespace.
159159

160160
```sh subs=true
161-
docker run --cap-add=AUDIT_CONTROL --cap-add=AUDIT_READ --user=root --pid=host docker.elastic.co/beats/auditbeat:{{stack-version}}
161+
docker run --cap-add=AUDIT_CONTROL --cap-add=AUDIT_READ --user=root --pid=host docker.elastic.co/beats/auditbeat:{{version.stack}}
162162
```
163163

164164

docs/reference/auditbeat/running-on-kubernetes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Running {{ecloud}} on Kubernetes? See [Run {{beats}} on ECK](docs-content://depl
1212
::::
1313

1414

15-
% However, version {{stack-version}} of Auditbeat has not yet been released, so no Docker image is currently available for this version.
15+
% However, version {{version.stack}} of Auditbeat has not yet been released, so no Docker image is currently available for this version.
1616

1717

1818
## Kubernetes deploy manifests for Auditbeat [_kubernetes_deploy_manifests]
@@ -24,7 +24,7 @@ Everything is deployed under `kube-system` namespace, you can change that by upd
2424
To get the manifests just run:
2525

2626
```sh subs=true
27-
curl -L -O https://raw.githubusercontent.com/elastic/beats/{{major-version}}/deploy/kubernetes/auditbeat-kubernetes.yaml
27+
curl -L -O https://raw.githubusercontent.com/elastic/beats/{{ version.stack | M.M }}/deploy/kubernetes/auditbeat-kubernetes.yaml
2828
```
2929

3030
::::{warning}

docs/reference/auditbeat/setup-repositories.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ To add the Beats repository for APT:
3131
sudo apt-get install apt-transport-https
3232
```
3333

34-
3. Save the repository definition to _/etc/apt/sources.list.d/elastic-{{major-release}}.list_:
34+
3. Save the repository definition to _/etc/apt/sources.list.d/elastic-{{ version.stack | M.x }}.list_:
3535

3636
```shell subs=true
37-
echo "deb https://artifacts.elastic.co/packages/{{major-release}}/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-{{major-release}}.list
37+
echo "deb https://artifacts.elastic.co/packages/{{ version.stack | M.x }}/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-{{ version.stack | M.x }}.list
3838
```
3939

4040
:::{note}
4141
The package is free to use under the Elastic license. An alternative package which contains only features that are available under the Apache 2.0 license is also available. To install it, use the following sources list:
4242

4343
```shell subs=true
44-
echo "deb https://artifacts.elastic.co/packages/oss-{{major-release}}/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-{{major-release}}.list
44+
echo "deb https://artifacts.elastic.co/packages/oss-{{ version.stack | M.x }}/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-{{ version.stack | M.x }}.list
4545
```
4646
:::
4747

@@ -83,9 +83,9 @@ To add the Beats repository for YUM:
8383
2. Create a file with a `.repo` extension (for example, `elastic.repo`) in your `/etc/yum.repos.d/` directory and add the following lines:
8484

8585
```shell subs=true
86-
[elastic-{{major-release}}]
87-
name=Elastic repository for {{major-release}} packages
88-
baseurl=https://artifacts.elastic.co/packages/{{major-release}}/yum
86+
[elastic-{{ version.stack | M.x }}]
87+
name=Elastic repository for {{ version.stack | M.x }} packages
88+
baseurl=https://artifacts.elastic.co/packages/{{ version.stack | M.x }}/yum
8989
gpgcheck=1
9090
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
9191
enabled=1
@@ -97,7 +97,7 @@ To add the Beats repository for YUM:
9797
The package is free to use under the Elastic license. An alternative package which contains only features that are available under the Apache 2.0 license is also available. To install it, use the following `baseurl` in your `.repo` file:
9898

9999
```shell subs=true
100-
baseurl=https://artifacts.elastic.co/packages/oss-{{major-release}}/yum
100+
baseurl=https://artifacts.elastic.co/packages/oss-{{ version.stack | M.x }}/yum
101101
```
102102
:::
103103

0 commit comments

Comments
 (0)