Skip to content

Commit afec3c6

Browse files
authored
chore: Update NGINX Agent includes (#1568)
* chore: clean up NGINX Agent includes * fix: linting
1 parent 1ff4912 commit afec3c6

File tree

24 files changed

+422
-989
lines changed

24 files changed

+422
-989
lines changed

content/agent/installation-upgrade/installation-oss.md

Lines changed: 31 additions & 303 deletions
Large diffs are not rendered by default.

content/agent/installation-upgrade/installation-plus.md

Lines changed: 31 additions & 363 deletions
Large diffs are not rendered by default.

content/agent/installation-upgrade/uninstall.md

Lines changed: 7 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -30,119 +30,28 @@ Complete the following steps on each host where you’ve installed NGINX Agent
3030

3131
### Uninstalling NGINX Agent on RHEL, CentOS, Rocky Linux, AlmaLinux, and Oracle Linux
3232

33-
Complete the following steps on each host where you've installed NGINX Agent:
34-
35-
1. Stop NGINX Agent:
36-
37-
```bash
38-
sudo systemctl stop nginx-agent
39-
```
40-
41-
2. To uninstall NGINX Agent, run the following command:
42-
43-
```bash
44-
sudo yum remove nginx-agent
45-
```
33+
{{< include "agent/installation/uninstall/uninstall-rhel.md" >}}
4634

4735
### Uninstalling NGINX Agent on Ubuntu
4836

49-
Complete the following steps on each host where you've installed NGINX Agent:
50-
51-
1. Stop NGINX Agent:
52-
53-
```bash
54-
sudo systemctl stop nginx-agent
55-
```
56-
57-
2. To uninstall NGINX Agent, run the following command:
58-
59-
```bash
60-
sudo apt-get remove nginx-agent
61-
```
62-
63-
> **Note:** The `apt-get remove <package>` command will remove the package from your system, while keeping the associated configuration files for possible future use. If you want to completely remove the package and all of its configuration files, you should use `apt-get purge <package>`.
37+
{{< include "agent/installation/uninstall/uninstall-ubuntu.md" >}}
6438

6539
### Uninstalling NGINX Agent on Debian
6640

67-
Complete the following steps on each host where you've installed NGINX Agent:
68-
69-
1. Stop NGINX Agent:
70-
71-
```bash
72-
sudo systemctl stop nginx-agent
73-
```
74-
75-
2. To uninstall NGINX Agent, run the following command:
76-
77-
```bash
78-
sudo apt-get remove nginx-agent
79-
```
80-
81-
> **Note:** The `apt-get remove <package>` command will remove the package from your system, while keeping the associated configuration files for possible future use. If you want to completely remove the package and all of its configuration files, you should use `apt-get purge <package>`.
41+
{{< include "agent/installation/uninstall/uninstall-debian.md" >}}
8242

8343
### Uninstalling NGINX Agent on SLES
8444

85-
Complete the following steps on each host where you've installed NGINX Agent:
86-
87-
1. Stop NGINX agent:
88-
89-
```bash
90-
sudo systemctl stop nginx-agent
91-
```
92-
93-
2. To uninstall NGINX agent, run the following command:
94-
95-
```bash
96-
sudo zypper remove nginx-agent
97-
```
45+
{{< include "agent/installation/uninstall/uninstall-sles.md" >}}
9846

9947
### Uninstalling NGINX Agent on Alpine Linux
10048

101-
Complete the following steps on each host where you've installed NGINX agent:
102-
103-
1. Stop NGINX agent:
104-
105-
```bash
106-
sudo rc-service nginx-agent stop
107-
```
108-
109-
2. To uninstall NGINX agent, run the following command:
110-
111-
```bash
112-
sudo apk del nginx-agent
113-
```
49+
{{< include "agent/installation/uninstall/uninstall-alpine.md" >}}
11450

115-
### Uninstalling NGINX Agent on Amazon Linux 2
116-
117-
Complete the following steps on each host where you've installed NGINX agent:
51+
### Uninstalling NGINX Agent on Amazon Linux
11852

119-
1. Stop NGINX agent:
120-
121-
```bash
122-
sudo systemctl stop nginx-agent
123-
```
53+
{{< include "agent/installation/uninstall/uninstall-amazon-linux.md" >}}
12454

125-
2. To uninstall NGINX agent, run the following command:
126-
127-
```bash
128-
sudo yum remove nginx-agent
129-
```
130-
131-
### Uninstalling NGINX Agent on Amazon Linux 2023
132-
133-
Complete the following steps on each host where you've installed NGINX agent:
134-
135-
1. Stop NGINX agent:
136-
137-
```bash
138-
sudo systemctl stop nginx-agent
139-
```
140-
141-
2. To uninstall NGINX agent, run the following command:
142-
143-
```bash
144-
sudo dnf remove nginx-agent
145-
```
14655
### Uninstalling NGINX Agent on FreeBSD
14756

14857
Complete the following steps on each host where you've installed NGINX agent:

content/agent/installation-upgrade/upgrade.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,12 @@ Learn how to upgrade NGINX Agent.
1313

1414
## Upgrade NGINX Agent
1515

16-
To upgrade NGINX Agent, follow these steps:
17-
18-
1. Open an SSH connection to the server where you’ve installed NGINX Agent and log in.
19-
20-
1. Make a backup copy of the following locations to ensure that you can successfully recover if the upgrade has issues:
21-
22-
- `/etc/nginx-agent`
23-
- `config_dirs` values for any configuration specified in `/etc/nginx-agent/nginx-agent.conf`
24-
25-
1. Install the updated version of NGINX Agent:
26-
27-
- RHEL, RPM-Based
28-
29-
```shell
30-
sudo yum -y makecache
31-
sudo yum update -y nginx-agent
32-
```
33-
34-
- Debian, Ubuntu, Deb-Based
35-
36-
```shell
37-
sudo apt-get update
38-
sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::="--force-confold"
39-
```
16+
{{< include "agent/installation/update.md" >}}
4017

4118
## Upgrade NGINX Agent to a Specific Version
4219

4320
To upgrade NGINX Agent to a specific **v2.x version**, follow these steps:
4421

45-
#### Steps to Upgrade:
46-
4722
1. Open an SSH connection to the server running NGINX Agent and log in.
4823

4924
1. Back up the following files and directories to ensure you can restore the environment in case of issues during the upgrade:

content/includes/agent/about.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

content/includes/agent/architecture.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

content/includes/agent/installation/oss/oss-alpine.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ authenticity. Fetch the key:
3535

3636
The output should contain the following modulus:
3737

38-
```
38+
```shell
3939
Public-Key: (2048 bit)
4040
Modulus:
4141
00:fe:14:f6:0a:1a:b8:86:19:fe:cd:ab:02:9f:58:
@@ -69,4 +69,10 @@ authenticity. Fetch the key:
6969

7070
```shell
7171
sudo apk add nginx-agent
72-
```
72+
```
73+
74+
1. Verify the installation:
75+
76+
```shell
77+
sudo nginx-agent -v
78+
```

content/includes/agent/installation/oss/oss-amazon-linux.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,18 @@ nd-files:
2929
sudo yum install nginx-agent
3030
```
3131

32-
1. When prompted to accept the GPG key, verify that the fingerprint matches
33-
`573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, and if so, accept it.
32+
{{<call-out "tip" "Tip: Install specific versions" "" >}}
33+
To install `nginx-agent` with a specific version (for example, 2.42.0):
34+
35+
```shell
36+
sudo yum install -y nginx-agent-2.42.0
37+
```
38+
{{< /call-out >}}
39+
40+
1. When prompted to accept the GPG key, verify that the fingerprint matches `8540 A6F1 8833 A80E 9C16 53A4 2FD2 1310 B49F 6B46`, `573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, `9E9B E90E ACBC DE69 FE9B 204C BCDC D8A3 8D88 A2B3`, and if so, accept it.
41+
42+
1. Verify the installation:
43+
44+
```shell
45+
sudo nginx-agent -v
46+
```

content/includes/agent/installation/oss/oss-debian.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,21 @@ nd-files:
2525
--import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
2626
```
2727

28-
The output should contain the full fingerprint `573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62`
29-
as follows:
28+
The output should contain the full fingerprints `8540 A6F1 8833 A80E 9C16 53A4 2FD2 1310 B49F 6B46`, `573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, `9E9B E90E ACBC DE69 FE9B 204C BCDC D8A3 8D88 A2B3` as follows:
3029

31-
```
32-
pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24]
33-
573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
34-
uid nginx signing key <signing-key@nginx.com>
35-
```
30+
```shell
31+
pub rsa4096 2024-05-29 [SC]
32+
8540A6F18833A80E9C1653A42FD21310B49F6B46
33+
uid nginx signing key <signing-key-2@nginx.com>
34+
35+
pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24]
36+
573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
37+
uid nginx signing key <signing-key@nginx.com>
38+
39+
pub rsa4096 2024-05-29 [SC]
40+
9E9BE90EACBCDE69FE9B204CBCDCD8A38D88A2B3
41+
uid nginx signing key <signing-key-3@nginx.com>
42+
```
3643

3744
{{< call-out "important" >}}If the fingerprint is different, remove the file.{{< /call-out >}}
3845

@@ -48,4 +55,21 @@ nd-files:
4855
```shell
4956
sudo apt update
5057
sudo apt install nginx-agent
51-
```
58+
```
59+
60+
{{<call-out "tip" "Tip: Install specific versions" "" >}}
61+
To install `nginx-agent` with a specific version (for example, 2.42.0):
62+
63+
Update your package index and install a specific version of the nginx-agent. Replace <VERSION_CODENAME> with your current Debian codename (for example, bullseye).
64+
65+
```shell
66+
sudo apt update
67+
sudo apt install -y nginx-agent=2.42.0~<VERSION_CODENAME>
68+
```
69+
{{< /call-out >}}
70+
71+
1. Verify the installation:
72+
73+
```shell
74+
sudo nginx-agent -v
75+
```

content/includes/agent/installation/oss/oss-rhel.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,34 @@ nd-files:
1313
1. To set up the yum repository, create a file with name `/etc/yum.repos.d/nginx-agent.repo`
1414
with the following contents:
1515

16-
```ini
17-
[nginx-agent]
18-
name=nginx agent repo
19-
baseurl=http://packages.nginx.org/nginx-agent/centos/$releasever/$basearch/
20-
gpgcheck=1
21-
enabled=1
22-
gpgkey=https://nginx.org/keys/nginx_signing.key
23-
module_hotfixes=true
24-
```
16+
```ini
17+
[nginx-agent]
18+
name=nginx agent repo
19+
baseurl=http://packages.nginx.org/nginx-agent/centos/$releasever/$basearch/
20+
gpgcheck=1
21+
enabled=1
22+
gpgkey=https://nginx.org/keys/nginx_signing.key
23+
module_hotfixes=true
24+
```
2525

2626
1. To install `nginx-agent`, run the following command:
2727

2828
```shell
2929
sudo yum install nginx-agent
3030
```
3131

32-
When prompted to accept the GPG key, verify that the fingerprint matches `573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, and if so, accept it.
32+
{{<call-out "tip" "Tip: Install specific versions" "" >}}
33+
To install `nginx-agent` with a specific version (for example, 2.42.0):
34+
35+
```shell
36+
sudo yum install -y nginx-agent-2.42.0
37+
```
38+
{{< /call-out >}}
39+
40+
When prompted to accept the GPG key, verify that the fingerprint matches `8540 A6F1 8833 A80E 9C16 53A4 2FD2 1310 B49F 6B46`, `573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, `9E9B E90E ACBC DE69 FE9B 204C BCDC D8A3 8D88 A2B3`, and if so, accept it.
41+
42+
1. Verify the installation:
43+
44+
```shell
45+
sudo nginx-agent -v
46+
```

0 commit comments

Comments
 (0)