You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This lab will explore the R33 upgrade process with NGINX One Console. With release 33, your instances being managed is now a requirement. Let's explore how you can add your instances to NGINX One Console and how it will assist us in prepping your systems for the R33 upgrade. You will explore the NGINX One Console interface, create an Instance Group and look at how you can manage configs. Finally, you will see deploying a R33 container instance to NGINX One Console and upgrading your standalone instance to R33 via NGINX One Console.
5
+
This lab will explore the R33-R34 upgrade process with NGINX One Console. Starting with NGINX Plus Release 33, your instances being managed is now a requirement. Let's explore how you can add your instances to NGINX One Console and how it will assist us in prepping your systems for the upgrade. You will explore the NGINX One Console interface, create an Instance Group and look at how you can manage configs. Finally, you will see deploying a R34 container instance to NGINX One Console and upgrading your standalone instance to R34 via NGINX One Console.
6
6
7
7
## Learning Objectives
8
8
9
-
- You will learn how to deploy a R33 version of a docker container
10
-
- You will learn how to pin a release version while installing NGINX Plus
9
+
- You will learn how to deploy a R34 version of a docker container
11
10
- You will learn how to add an NGINX web server to NGINX One Console
12
11
- You will learn how to install NGINX Agent
13
12
- You will learn how to use Instance Groups to manage files
14
-
- You will learn how to upgrade your release to R33 (latest)
13
+
- You will learn how to upgrade your release to R34 (latest)
15
14
16
15
## Prerequisites
17
16
@@ -24,17 +23,17 @@ This lab will explore the R33 upgrade process with NGINX One Console. With relea
||||
32
31
33
32
<br/>
34
33
35
-
### Deploy an R33 instance
34
+
### Deploy an R34 instance
36
35
37
-
Release 33 of NGINX Plus now requires NGINX Agent to be installed along with a license for NGINX One (Not to be confused with the NGINX One Console you are working with today). It is not as painful as some have been led to believe. Let's add a new R33 instance to your lab setup.
36
+
Starting with Release 33, NGINX Plus requires NGINX Agent to be installed along with a license for NGINX One (Not to be confused with the NGINX One Console you are working with today). It is not as painful as some have been led to believe. You will now add the latest version of an instance to your lab setup.
38
37
39
38
1. First you need the NGINX One `license.jwt` file which you can get from [my.f5.com](https://my.f5.com). Create a new file in the lab5 folder called `license.jwt` and paste the contents into it. If you are in the F5 UDF environment, this has been done for you. The $JWT environment variable should still be set from the earlier labs, but you can check it. If it is not there, add the license to an environment variable as you did previously:
40
39
@@ -50,27 +49,30 @@ Release 33 of NGINX Plus now requires NGINX Agent to be installed along with a l
50
49
# If they are not set, go ahead and set them again:
51
50
export NAME=<YOUR_INITIALS.LASTNAME>
52
51
export TOKEN=<insert the dataplane key for NGINX One Console that you used previously>
52
+
53
53
```
54
54
55
55
1. If you updated/changed the JWT token, you will need to login to docker again. Skip if everything was still set from before:
1. In this portion of the lab you will re-use a docker-compose.yml file from lab2 to deploy your containers and register with the NGINX One Console. This time you will now add an R33 (latest) version of the NGINX Plus container. Open the docker-compose file in VS Code.
62
+
1. In this portion of the lab you will re-use a docker-compose.yml file from lab2 to deploy your containers and register with the NGINX One Console. This time you will now add an R34 (latest) version of the NGINX Plus container. Open the docker-compose file in VS Code.
62
63
63
64
```bash
64
65
vi lab5/docker-compose.yml
66
+
65
67
```
66
68
67
69
After the `plus3` instance code block you will put a new block of code forthe R33 release. You will call this `plus4`, keepingin line with your naming convention for the labs.
68
70
69
-
Starting on line 75 let's uncomment this block of code (ends on line 96):
71
+
Starting on line 75 let's uncomment this block of code (ends on line 96). A little tip, in VS Studio you can highlight the block of code and press `Ctrl` + `/` to uncomment the whole block at once.
70
72
71
73
```bash
72
-
### Uncomment this section for Lab5
73
-
plus4: # Debian R33 NGINX Plus Web / Load Balancer
74
+
### Uncomment the section below for Lab5
75
+
plus4: # Debian R34 NGINX Plus Web / Load Balancer
@@ -93,15 +95,17 @@ Release 33 of NGINX Plus now requires NGINX Agent to be installed along with a l
93
95
- '9113' # Open for Prometheus Scraper page
94
96
restart: always
95
97
#
98
+
96
99
```
97
100
98
-
1. Save your edits. You'll notice a couple of changes from the other blocks (besides the name). The first is the environment variable called `NGINX_LICENSE_JWT: $JWT` This is what authorizes the pulling of this specific image. The second change is the image name `private-registry.nginx.com/nginx-plus/agent:debian` which pulls the debian version of the NGINX Plus with Agent installed. You will be able to see this in the NGINX One Console once deployed.
101
+
1. Save your edits. You'll notice a couple of changes from the other blocks (besides the name). The first is the environment variable called `NGINX_LICENSE_JWT: $JWT` This is what authorizes the pulling of this specific image. The second change is the image name `private-registry.nginx.com/nginx-plus/agent:debian` which pulls the latest Debian version of NGINX Plus with Agent installed. You will be able to see this in the NGINX One Console once deployed.
99
102
100
-
1. Now that this file is edited, save it and let's restart the containers. Issue the following commands:
103
+
1. Now that this file is edited, restart the containers. Issue the following commands:
101
104
102
105
```bash
103
106
docker compose down
104
107
docker compose up --force-recreate -d
108
+
105
109
```
106
110
107
111
<br />
@@ -140,9 +144,9 @@ Release 33 of NGINX Plus now requires NGINX Agent to be installed along with a l
140
144
141
145

142
146
143
-
That's how easy it is to deploy an R33 instance and have it registered with NGINX One Console. Using A/B testing practices, you can move the traffic from any R31/32 container to the R33 instance.
147
+
That's how easy it is to deploy an R34 instance and have it registered with NGINX One Console. Using A/B testing practices, you can move the traffic from any R31/32 container to the R33 instance.
144
148
145
-
>Notice that the `plus4, R33` container was ADDED to your <$NAME-sync-group>, (from your docker-compose file, line #82). This means it has the *SAME configuration* as the `plus1,2,3` containers. Because the configurations are synchronized, you can easily move traffic from older R31/R32 containers to newer R33 containers.
149
+
>Notice that the `plus4, R34` container was ADDED to your <$NAME-sync-group>, (from your docker-compose file, line #82). This means it has the *SAME configuration* as the `plus1,2,3` containers. Because the configurations are synchronized, you can easily move traffic from older R31/R32 containers to newer R33/R34 containers.
146
150
147
151
>>This is a great way to upgrade and migrate your NGINX fleet to the latest versions of NGINX! After all the traffic has been routed to newer containers, you can safely delete older containers.
148
152
@@ -152,64 +156,20 @@ When you are finished, you can now clean up your Docker environment by issuing:
152
156
153
157
```bash
154
158
docker compose down
159
+
155
160
```
156
161
157
-
Don't forget to remove your unused Instances from the NGINX One Console.
162
+
Don't forget to remove your unused instances from the NGINX One Console.
158
163
159
164
<br/>
160
165
161
-
## Install NGINX Plus R32 on a VM
162
-
163
-
Next you will create an NGINX instance that is pinned to version R32 on a virtual machine. This will show you an upgrade from R32 to the new R33 on a VM, a common NGINX upgrade task. From the Jumphost you can use the terminal to SSH to the VM's command line to do an install.
166
+
## Confirm you have an R32 Instance
164
167
165
-
1. From the VS Studio Terminal window, run the following commands.
166
-
167
-
>**NOTE:** If you are using the F5 UDF environment, the NGINX Plus license files have been placed there ahead of time for your convenience. You can continue with the next step (install).
168
+
You will now start the process of upgrading a standalone web server. Confirm taht you have this instance by issuing the following commands:
168
169
170
+
1. SSH to the web server:
169
171
```bash
170
172
ssh nplus
171
-
cd ~/Documents
172
-
173
-
sudo mkdir -p /etc/ssl/nginx
174
-
sudo cp license/nginx-repo.* /etc/ssl/nginx/
175
-
```
176
-
177
-
1. With the cert and key in place you can go ahead with the install. Let's do the pre-work:
https://pkgs.nginx.com/plus/ubuntu `lsb_release -cs` nginx-plus\n"| sudo tee /etc/apt/sources.list.d/nginx-plus.list
185
-
```
186
-
187
-
1. For this lab, you need to pin this release version to R32 so that you can see the upgrade process. The keys you are using are good forR33, so if you simply ask for an install of NGINX you will get the latest release (currently R33). To pin the release, you manually need to put the R32 branchin URL like: `/plus/R32/`
@@ -222,18 +182,10 @@ Next you will create an NGINX instance that is pinned to version R32 on a virtua
222
182
223
183
```bash
224
184
### SAMPLE OUTPUT ###
225
-
nginx version: nginx/1.25.5 (nginx-plus-r32-p2)
185
+
nginx version: nginx/1.25.5 (nginx-plus-r32-p1)
226
186
227
187
```
228
188
229
-
1. Finally enable and start NGINX Plus
230
-
231
-
```bash
232
-
sudo systemctl enable nginx
233
-
sudo systemctl start nginx
234
-
235
-
```
236
-
237
189
<br/>
238
190
239
191
## Install NGINX Agent and add NGINX Plus VM to NGINX One Console
@@ -254,7 +206,7 @@ First, you will create a new Config Sync Group to add machines that you want to
254
206
255
207
1. In the field labeled `Data Plane Key (optional)`, type in the environment variable `$TOKEN`. This will customize the curl command. For this example, you will use `Virtual Machine or Bare Metal` tab. You will see the command to install agent and register the instance with NGINX One Console, and add it to your Sync Group.
256
208
257
-
1. If not already connected, use the VScode Terminal, SSH to the NGINX Plus VM.
209
+
1. You should already be connected, but if not, use the VScode Terminal and SSH to the NGINX Plus VM.
258
210
259
211
```bash
260
212
ssh nplus
@@ -270,10 +222,11 @@ First, you will create a new Config Sync Group to add machines that you want to
270
222
271
223
```
272
224
273
-
1. Set the hostname of your Ubuntu VM, so it displays in the NGINX One Console Instances. Use `Nginx123`for the password:
225
+
1. Set the hostname of your Ubuntu VM, so it displays in the NGINX One Console Instances. Use `Nginx123` for the password:
274
226
275
227
```bash
276
228
hostnamectl hostname $NAME-nplus-vm
229
+
277
230
```
278
231
279
232
```bash
@@ -286,7 +239,7 @@ First, you will create a new Config Sync Group to add machines that you want to
286
239
287
240
```
288
241
289
-
And verify it was set:
242
+
Verify it was set:
290
243
291
244
```bash
292
245
hostname
@@ -299,7 +252,7 @@ First, you will create a new Config Sync Group to add machines that you want to
299
252
300
253
```
301
254
302
-
1. Install the NGINX Agent and register with the NGINX One Console. You can copy/paste from the NGINX One Console, or use this example:
255
+
1. Install the NGINX Agent and register with the NGINX One Console. You can copy/paste from the NGINX One Console, or use this example:
303
256
304
257
```bash
305
258
curl https://agent.connect.nginx.com/nginx-agent/install | DATA_PLANE_KEY="$TOKEN" sh -s -- -y -c $NAME-sync-group-vm
@@ -370,7 +323,7 @@ Now that NGINX Agent is installed, configured for your Config Sync Group, the VM
370
323
371
324
## Enable NGINX Plus Dashboard and API
372
325
373
-
The NGINX Plus Dashboard and API is where NGINX exposes all of the over 240 metrics available. These include:
326
+
The NGINX Plus Dashboard and API is where NGINX exposes all of the over 240 metrics available. These include:
374
327
375
328
- HTTP requests/responses
376
329
- TLS session metrics
@@ -382,7 +335,7 @@ The NGINX Plus Dashboard and API is where NGINX exposes all of the over 240 metr
382
335
- NGINX Worker metrics
383
336
- And others
384
337
385
-
You can do this in the NGINX One Console - in the Config Sync Group, click on the Configuration tab, then Edit. Click the Add file button, and create `/etc/nginx/conf.d/dashboard.conf`. Use the example provide here, just copy/paste:
338
+
You can do this in the NGINX One Console - in the Config Sync Group, click on the Configuration tab, then Edit. Click the Add file button, and create `/etc/nginx/conf.d/dashboard.conf`. Use the example provide here, just copy/paste:
386
339
387
340
```nginx
388
341
# NGINX Plus Basics, Nov 2024
@@ -422,18 +375,19 @@ This configuration:
422
375
423
376
<br/>
424
377
425
-
## Upgrade NGINX Plus VM from R32 to R33
378
+
## Upgrade NGINX Plus VM from R32 to R34
426
379
427
-
You have a system added to the Config Sync Group, let's show how you can push out config changes and **even new files**. To do an upgrade on an R32 system, there needs to be a `license.jwt` file placed in the `/etc/nginx` folder. This prevents accidental upgrades to R33 or later from happening. You will use the NGINX One Console to place the required R33 license file on each VM, so then you can go and upgrade each system.
380
+
You have a system added to the Config Sync Group, let's show how you can push out config changes and **even new files**. To do an upgrade on an R32 system, there needs to be a `license.jwt` file placed in the `/etc/nginx` folder. This prevents accidental upgrades to R33 or later from happening. You will use the NGINX One Console to place the required R34 license file on each VM, so then you can go and upgrade each system.
428
381
429
-
Let's take the previous R32 install you just created and upgrade it. This time you will do it with assistance from NGINX One Console. On the `nplus` VM there is a directory for the NGINX One license files. The path is `~/Documents/license`.
382
+
Let's take the R32 install and upgrade it. This time you will do it with assistance from NGINX One Console. On the `nplus` VM there is a directory for the NGINX One license files. The path is `~/Documents/license`.
430
383
431
384
1. In the UDF environment, the files are already there. From the jumphost, ssh to the `nplus` VM as you did earlier:
432
385
433
386
```bash
434
387
ssh nplus
435
388
cd Documents/
436
389
tree license/
390
+
437
391
```
438
392
439
393
```bash
@@ -444,6 +398,7 @@ Let's take the previous R32 install you just created and upgrade it. This time y
444
398
└── nginx-repo.key
445
399
446
400
0 directories, 3 files
401
+
447
402
```
448
403
449
404
1. In the NGINX One Console you will create a new file. Pull up the VM Config Sync Group - you can see there is one Instance (nplus) that is in the group.
@@ -474,26 +429,7 @@ Let's take the previous R32 install you just created and upgrade it. This time y
474
429
475
430
You can see the Console pushed out the new license file to the remote system. This can be a huge help in the upgrade process, as you can put 100's of instances into the Config Sync Group, then push the license.jwt file out to all of them automatically making them ready for an upgrade.
476
431
477
-
1. Let's go ahead and upgrade the instance as you are on the server already. For your example, you pinned the release to R32. When upgrading a system, you will not be sure if the system was pinned, so let's check:
478
-
479
-
```bash
480
-
cd /etc/apt/sources.list.d/
481
-
sudo vi nginx-plus.list
482
-
```
483
-
484
-
This URL does contains R32, so it is pinned. Change this line:
1. R32 is installed on the nplus server, and the NGINX repository is installed on the system. To upgrade, issue the following commands:
497
433
498
434
```bash
499
435
sudo apt update
@@ -510,13 +446,13 @@ Let's take the previous R32 install you just created and upgrade it. This time y
510
446
511
447
```bash
512
448
## Sample output ##
513
-
nginx version: nginx/1.27.2 (nginx-plus-r33-p2)
449
+
nginx version: nginx/1.27.4 (nginx-plus-r34)
514
450
515
451
```
516
452
517
453
1. NGINX Agent detected the NGINX upgrade and automatically send this information to NGINX One Console. You can also confirm this with NGINX One Console that the NGINX Plus version was upgraded for the VM. Click on the `Instances` menu on the left-hand side and you will see the instance was upgraded:
You can update a single instance following this procedure foradding a license.jwt to the server. However, using a Config Sync Group, you can prepare 100's or 1000's of instancesin your NGINX fleet and have them ready for the upgrade.
0 commit comments