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
||||
33
32
34
33
<br/>
35
34
36
-
### Deploy an R33 instance.
35
+
### Deploy an R33 instance
37
36
38
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.
39
38
40
-
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:
39
+
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:
41
40
42
-
```bash
43
-
echo$JWT
44
-
# If the result is empty, set it the JWT variable again.
45
-
export JWT=$(cat license.jwt)
41
+
```bash
42
+
echo$JWT
43
+
# If the result is empty, set it the JWT variable again.
44
+
export JWT=$(cat lab5/license.jwt)
46
45
47
-
#Confirm the other two previously used variables are still set:
48
-
echo$NAME
49
-
echo$TOKEN
46
+
#Confirm the other two previously used variables are still set:
47
+
echo$NAME
48
+
echo$TOKEN
50
49
51
-
# If they are not set, go ahead and set them again:
52
-
export NAME=<YOUR_INITIALS.LASTNAME>
53
-
export TOKEN=<insert the dataplane key for NGINX One Console that you used previously>
54
-
```
50
+
# If they are not set, go ahead and set them again:
51
+
export NAME=<YOUR_INITIALS.LASTNAME>
52
+
export TOKEN=<insert the dataplane key for NGINX One Console that you used previously>
53
+
```
55
54
56
-
If you updated/changed the JWT token, you will need to login to docker again. Skip if everything was still set from before:
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:
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.
61
+
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.
63
62
64
-
```bash
65
-
vi lab5/docker-compose.yml
66
-
```
63
+
```bash
64
+
vi lab5/docker-compose.yml
65
+
```
67
66
68
-
After the `plus3` instance code block you will put a new block of code for the R33 release. You will call this `plus4`, keeping in line with your naming convention for the labs.
67
+
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.
69
68
70
-
Starting on line 75 let's uncomment this block of code (ends on line 96):
69
+
Starting on line 75 let's uncomment this block of code (ends on line 96):
71
70
72
-
```bash
73
-
### Uncomment this section for Lab5
74
-
plus4: # Debian R33 NGINX Plus Web / Load Balancer
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.
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.
100
99
101
-
Now that this file is edited, save it and let's restart the containers. Issue the following commands:
100
+
1. Now that this file is edited, save it and let's restart the containers. Issue the following commands:
102
101
103
-
```bash
104
-
docker compose down
105
-
docker compose up --force-recreate -d
106
-
```
102
+
```bash
103
+
docker compose down
104
+
docker compose up --force-recreate -d
105
+
```
107
106
108
107
<br />
109
108
110
109
## Examine in NGINX One Console
111
110
112
-
You will notice a few things in NGINX One Console now. First - why are there duplicate container names?!?!?
111
+
1. You will notice a few things in NGINX One Console now. First - why are there duplicate container names?!?!?
Containers as you know are ephemeral. Once you destroy / recreate them they re-register with the Console. You can manually clean these up (delete the grayed out versions of your images) or you can have these cleaned up automatically. Previously you used the search to narrow down the instances with your name. This time you will use the Filter feature. Choose the action of `Availability is Unavailable` then you can select your containers and use the `Delete selected` button.
115
+
1. Containers as you know are ephemeral. Once you destroy / recreate them they re-register with the Console. You can manually clean these up (delete the grayed out versions of your images) or you can have these cleaned up automatically. Previously you used the search to narrow down the instances with your name. This time you will use the Filter feature. Choose the action of `Availability is Unavailable` then you can select your containers and use the `Delete selected` button.
117
116
118
-
> **NOTE:** If you are in shared environment make sure you are deleting only your instances.
117
+
> **NOTE:** If you are in shared environment make sure you are deleting only your instances.
**(Optional Exercise)** To automate this removal of instances, you can expand the `Settings` menu on the left hand side it will reveal an entry for `Instance Settings`. (Requires Admin access)
125
+
1. **(Optional Step):** To automate this removal of instances, you can expand the `Settings` menu on the left hand side it will reveal an entry for `Instance Settings`. (Requires Admin access. See [References](#references) for details)
127
126
128
-

127
+

129
128
130
-
Clicking that will take you to a screen where you can change the cleanup to a time of your choosing. The default is at 24 hours, but you can set it down to a single hour.
129
+
Clicking that will take you to a screen where you can change the cleanup to a time of your choosing. The default is at 24 hours, but you can set it down to a single hour.
131
130
132
-

131
+

133
132
134
-
> **NOTE:** Make sure you aren't too aggressive with the auto cleanup as sometimes it is good to see what has been out in production over a recent period.
133
+
> **NOTE:** Make sure you aren't too aggressive with the auto cleanup as sometimes it is good to see what has been out in production over a recent period.
135
134
136
-
Now that you have cleaned things up you can see the `plus4` instance in your `Instances` interface.
135
+
1. Now that you have cleaned things up, you can see the `plus4` instance in your `Instances` interface.
137
136
138
-

137
+

139
138
140
-
If you click on the `plus4` instance name, now you can see the NGINX version as well as the Agent version that are deployed:
139
+
1. If you click on the `plus4` instance name, now you can see the NGINX version as well as the Agent version that are deployed:
141
140
142
-

141
+

143
142
144
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.
145
144
@@ -161,96 +160,102 @@ Don't forget to remove your unused Instances from the NGINX One Console.
161
160
162
161
## Install NGINX Plus R32 on a VM
163
162
164
-
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. From the VS Studio Terminal window, run the following commands.
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.
165
164
166
-
>**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).
165
+
1. From the VS Studio Terminal window, run the following commands.
167
166
168
-
```bash
169
-
ssh nplus
170
-
cd~/Documents
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).
https://pkgs.nginx.com/plus/ubuntu `lsb_release -cs` nginx-plus\n"| sudo tee /etc/apt/sources.list.d/nginx-plus.list
187
-
```
180
+
1. With the cert and key in place you can go ahead with the install. Let's do the pre-work:
188
181
189
-
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 for R33, 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 branch in URL like: `/plus/R32/`
https://pkgs.nginx.com/plus/ubuntu `lsb_release -cs` nginx-plus\n"| sudo tee /etc/apt/sources.list.d/nginx-plus.list
188
+
```
190
189
191
-
```bash
192
-
sudo vi /etc/apt/sources.list.d/nginx-plus.list
193
-
```
190
+
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/`
## Install NGINX Agent and add NGINX Plus VM to NGINX One Console
240
243
241
-
First, you will create a new Config Sync Group to add machines that you want to upgrade. As a best practice, you want your Config Sync Groups to only contain machines that will have the exact same configuration. For example, a group for docker containers with nginx. One for OSS instances you might have. Here you are creating a group to add Virtual Machines that you want to upgrade. Follow the same process as the previous lab by clicking on `Config Sync Groups` in the left hand menu and then clicking on the `Add Config Sync Group` button.
244
+
First, you will create a new Config Sync Group to add machines that you want to upgrade. As a best practice, you want your Config Sync Groups to only contain machines that will have the exact same configuration. For example, a group for docker containers with NGINX. One for OSS instances you might have. Here you are creating a group to add Virtual Machines that you want to upgrade.
245
+
246
+
1. Follow the same process as the previous lab by clicking on `Config Sync Groups`in the left hand menu and then clicking on the `Add Config Sync Group` button.
In the NGINX One Console, open your new Config Sync Group, click on the `Add Instance` button.
250
+
1. In the NGINX One Console, open your new Config Sync Group, click on the `Add Instance` button.
246
251
247
-

252
+

248
253
249
-
It will ask you if you want to `Generate a new key` or `Use existing key`. You have already created a TOKEN variable in previous labs so you will use that same value. Click on the radio button for `Use existing key`.
254
+
1. It will ask you if you want to `Generate a new key` or `Use existing key`. You have already created a TOKEN variable in previous labs so you will use that same value. Click on the radio button for`Use existing key`.
250
255
251
-

256
+

252
257
253
-
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.
258
+
1. In the field labeled `Data Plane Key (optional)`, typein 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.
254
259
255
260
1. If not already connected, use the VScode Terminal, SSH to the NGINX Plus VM.
256
261
@@ -539,4 +544,4 @@ You can update a single instance following this procedure for adding a license.j
0 commit comments