Skip to content

Commit f12a923

Browse files
authored
Lab Guide updates (#53)
* lab5 updates * R34 updates * Lab2 updates
1 parent 7c6f301 commit f12a923

File tree

3 files changed

+73
-47
lines changed

3 files changed

+73
-47
lines changed

labs/lab2/readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,16 @@ You will run some Docker containers to build out various workshop components, us
9797
Login Succeeded
9898
```
9999

100-
1. Run below script to generate temporary self-signed certificates that would be used by NGINX OSS instances.Ensure you are in the `/lab2` folder:
100+
1. Change to lab2 folder for these exercises.
101101

102102
```bash
103+
cd lab2
104+
```
105+
106+
1. Run the script below to generate temporary self-signed certificates that would be used by NGINX OSS instances. Ensure you are in the `/lab2` folder:
107+
108+
```bash
109+
103110
bash generate_certs.sh
104111
```
105112

labs/lab5/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ services:
7676
# NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
7777
# NGINX_AGENT_SERVER_GRPCPORT: '443'
7878
# NGINX_AGENT_TLS_ENABLE: 'true'
79-
# NGINX_AGENT_SERVER_TOKEN: $TOKEN # Dataplane key From Nginx One Console
79+
# NGINX_AGENT_SERVER_TOKEN: $TOKEN # Dataplane key From Nginx One Console
8080
# NGINX_LICENSE_JWT: $JWT
8181
# NGINX_AGENT_INSTANCE_GROUP: $NAME-sync-group
8282
# hostname: $NAME-plus4
8383
# container_name: $NAME-plus4
84-
# image: private-registry.nginx.com/nginx-plus/agent:debian # From Nginx Private Registry R34
84+
# image: private-registry.nginx.com/nginx-plus/agent:r34-debian # From Nginx Private Registry R34
8585
# volumes: # Sync these folders to container
8686
# - ./nginx-plus/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
8787
# - ./nginx-plus/etc/nginx/conf.d:/etc/nginx/conf.d

labs/lab5/readme.md

Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -35,40 +35,50 @@ This lab will explore the R33-R34 upgrade process with NGINX One Console. Starti
3535

3636
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.
3737

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:
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:
3939

40+
1. Change to the `lab5` folder for these exercises.
41+
42+
```bash
43+
cd lab5
44+
```
45+
4046
```bash
4147
echo $JWT
42-
# If the result is empty, set it the JWT variable again.
43-
export JWT=$(cat lab5/license.jwt)
48+
```
49+
50+
If the result is empty, set it the JWT variable again, you must be in the `/lab5 folder`.
51+
52+
```bash
53+
export JWT=$(cat ../lab2/license.jwt)
54+
```
4455

45-
#Confirm the other two previously used variables are still set:
56+
Confirm the other two previously used variables are still set:
57+
58+
```bash
4659
echo $NAME
4760
echo $TOKEN
61+
```
4862

49-
# If they are not set, go ahead and set them again:
63+
If they are not set, go ahead and set them again:
64+
65+
```bash
5066
export NAME=<YOUR_INITIALS.LASTNAME>
5167
export TOKEN=<insert the dataplane key for NGINX One Console that you used previously>
52-
5368
```
5469

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:
70+
1. If you updated/changed the JWT token, you will need to login to Docker again. Skip if everything was still set from before:
5671

5772
```bash
5873
docker login private-registry.nginx.com --username=$JWT --password=none
5974
6075
```
6176

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.
63-
64-
```bash
65-
vi lab5/docker-compose.yml
66-
67-
```
77+
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.
6878

69-
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.
79+
After the `plus3` instance code block you will put a new block of code for the R34 release. You will call this `plus4`, keeping in line with your naming convention for the labs.
7080

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.
81+
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.
7282
7383
```bash
7484
### Uncomment the section below for Lab5
@@ -77,12 +87,12 @@ Starting with Release 33, NGINX Plus requires NGINX Agent to be installed along
7787
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
7888
NGINX_AGENT_SERVER_GRPCPORT: '443'
7989
NGINX_AGENT_TLS_ENABLE: 'true'
80-
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron NGINX One Console
90+
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron NGINX One Console
8191
NGINX_LICENSE_JWT: $JWT
8292
NGINX_AGENT_INSTANCE_GROUP: $NAME-sync-group
8393
hostname: $NAME-plus4
8494
container_name: $NAME-plus4
85-
image: private-registry.nginx.com/nginx-plus/agent:debian # From NGINX Private Registry R34
95+
image: private-registry.nginx.com/nginx-plus/agent:r34-debian # From NGINX Private Registry R34
8696
volumes: # Sync these folders to container
8797
- ./nginx-plus/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
8898
- ./nginx-plus/etc/nginx/conf.d:/etc/nginx/conf.d
@@ -94,11 +104,12 @@ Starting with Release 33, NGINX Plus requires NGINX Agent to be installed along
94104
- '9000' # Open for API / Dashboard page
95105
- '9113' # Open for Prometheus Scraper page
96106
restart: always
97-
#
98107
99108
```
100109
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.
110+
1. Save your edits. You'll notice a couple of changes from the other blocks (besides the name).
111+
- The first is the environment variable called `NGINX_LICENSE_JWT: $JWT` This is what authorizes the pulling of this specific image.
112+
- The second change is the image name `private-registry.nginx.com/nginx-plus/agent:r34-debian` which pulls the R34 Debian version of NGINX Plus with Agent installed. You will be able to see this in the NGINX One Console once deployed.
102113

103114
1. Now that this file is edited, restart the containers. Issue the following commands:
104115

@@ -213,7 +224,7 @@ First, you will create a new Config Sync Group to add machines that you want to
213224
214225
```
215226
216-
1. Set your environment variables:
227+
1. Set your three environment variables, check them with `echo`:
217228
218229
```bash
219230
export NAME=<YOUR_INITIALS.LASTNAME>
@@ -222,6 +233,14 @@ First, you will create a new Config Sync Group to add machines that you want to
222233
223234
```
224235
236+
```bash
237+
echo $NAME
238+
echo $TOKEN
239+
echo $JWT
240+
241+
```
242+
243+
225244
1. Set the hostname of your Ubuntu VM, so it displays in the NGINX One Console Instances. Use `Nginx123` for the password:
226245
227246
```bash
@@ -337,32 +356,32 @@ The NGINX Plus Dashboard and API is where NGINX exposes all of the over 240 metr
337356
338357
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:
339358
340-
```nginx
341-
# NGINX Plus Basics, Nov 2024
342-
# Chris Akker, Shouvik Dutta, Adam Currier
343-
# dashboard.conf
344-
#
345-
server {
346-
# Conventional port for the NGINX Plus API is 8080
347-
listen 9000;
348-
access_log off; # reduce noise in access logs
349-
350-
location /api/ {
351-
# Enable in read-write mode
352-
api write=on;
353-
}
354-
# Conventional location of the NGINX Plus dashboard
355-
location = /dashboard.html {
356-
root /usr/share/nginx/html;
359+
```nginx
360+
# NGINX Plus Basics, Nov 2024
361+
# Chris Akker, Shouvik Dutta, Adam Currier
362+
# dashboard.conf
363+
#
364+
server {
365+
# Conventional port for the NGINX Plus API is 8080
366+
listen 9000;
367+
access_log off; # reduce noise in access logs
368+
369+
location /api/ {
370+
# Enable in read-write mode
371+
api write=on;
372+
}
373+
# Conventional location of the NGINX Plus dashboard
374+
location = /dashboard.html {
375+
root /usr/share/nginx/html;
376+
}
377+
378+
# Redirect requests for "/" to "/dashboard.html"
379+
location / {
380+
return 301 /dashboard.html;
381+
}
357382
}
358383
359-
# Redirect requests for "/" to "/dashboard.html"
360-
location / {
361-
return 301 /dashboard.html;
362-
}
363-
}
364-
365-
```
384+
```
366385
367386
![Add Dashboard.conf](media/lab5-add-dashboard.png)
368387

0 commit comments

Comments
 (0)