Skip to content

Commit 28b71cf

Browse files
authored
Merge pull request #9 from nginxinc/ca
Prep for Merge
2 parents 2e6b70e + 9bb0a01 commit 28b71cf

Some content is hidden

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

57 files changed

+6795
-117
lines changed

ca-notes/LabOutline.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# Nginx for Azure Workshop Outline / Summary
2+
3+
## Lab 0 - Prequesites - Subscription / Resources
4+
## Lab 1 - Azure VNet/Subnet / Network Security Group / Nginx for Azure Overview
5+
## Lab 2 - UbuntuVM/Docker / Windows VM / Cafe Demo Deployment
6+
## Lab 3 - AKS / ACR / Nginx Ingress Controller Deployment
7+
## Lab 4 - NIC Dashboard / Cafe Demo / Redis Deployment
8+
## Lab 5 - Nginx for Azure Load Balancing / Reverse Proxy
9+
## Lab 6 - Azure Key Vault / TLS Essentials
10+
## Lab 7 - Azure Monitoring / Logging Analytics
11+
## Lab 8 - Nginx Garage or Azure Petshop
12+
## Lab 9 - Nginx Caching / Rate Limits / Juiceshop
13+
## Lab 10 - Grafana for Azure
14+
## Lab 11 - Optional Exercises - Windows VM
15+
## Summary and Wrap-up
16+
17+
<br/>
18+
19+
### Lab 0 - Prequesites - Subscription / Resources
20+
21+
- Overview
22+
In this Lab, the Prerequisite Requirements for both the Student and the Azure environment will be detailed. It is imperative that you have the appropriate computer, tools, skills, and Azure access to successfully complete the workshop. The Lab exercises must be done sequentially to build the environment as described. This is an intermediate level class, you must be proficient in several areas to successfully complete the workshop. Beginner level workshops are available from Nginx, to help prepare you for this workshop - see the References section below.
23+
24+
- Learning Objectives
25+
Verify you have the proper computer requirements - hardware and software.
26+
- Hardware: Laptop, Admin rights, Internet connection
27+
- Software: Visual Studio, Terminal, Chrome, Docker, AKS and AZ CLI, Redis-CLI.
28+
Verify you have proper computer skills.
29+
- Computer skills: Linux CLI, file mgmt, SSH/Terminal, Docker/Compose, Azure Portal, HTTP/S, Kubernetes Nodes/Pods/Services skills, Load Balancing concepts
30+
- Optional: TLS, DNS, HTTP caching, Prometheus, Grafana, Redis
31+
Verify you have the proper access to Azure resources.
32+
- Azure subscription, list of Azure Roles/permissions here
33+
34+
- Nginx for Azure Workshop has the following REQUIRED Nginx Skills
35+
Students must be familiar with Nginx basic operations, configurations, and concepts for HTTP traffic.
36+
-- The Nginx Basics Workshop is HIGHLY recommended, students should have taken this workshop prior.
37+
-- The Nginx Plus Ingress Controller workshop is also HIGHLY recommended, students should have taken this workshop prior.
38+
-- Previous training on Azure Resource Groups, VMs, Azure Networking, AKS, ACR, and NSG is HIGHLY recommended.
39+
40+
<br/>
41+
42+
### Lab 1 - Azure VNet/Subnet / Network Security Group / Nginx for Azure Overview
43+
44+
- Overview
45+
In this lab, you will be adding and configuring the Azure Networking components needed for this workshop. This will require a few network resources, and a Network Security Group to allow incoming traffic to your Nginx for Azure workshop resources. Then you will explore the Nginx for Azure product, as a quick Overview of what it is and how to deploy it.
46+
47+
- Learning Objectives
48+
Setup your Azure Vnet and Subnets
49+
Setup your Azure Network Security Group for inbound traffic
50+
Explore Nginx for Azure
51+
Deploy an Nginx for Azure instance / enable logging
52+
Test Nginx for Azure welcome page
53+
54+
<br/>
55+
56+
### Lab 2 - Ubuntu VM/Docker / Windows VM / Cafe Demo Deployment
57+
58+
- Overview
59+
In this lab, you will deploy an Ubuntu VM, and configure it for a Legacy web application. You will deploy a Windows VM. You will configure Nginx for Azure to proxy and load balance these backends.
60+
61+
- Learning Objectives
62+
Deploy Ubuntu VM
63+
Install Docker and Docker-compose
64+
Run Legacy docker container apps - Cafe Demo
65+
Optional Exercise: Deploy Windows VM
66+
Configure Nginx Load Balancing for these apps
67+
68+
<br/>
69+
70+
### Lab 3 - AKS / ACR / Nginx Ingress Controller Deployment
71+
72+
- Overview
73+
In this lab, you will deploy 2 AKS clusters, with Nginx Ingress Controllers. You will also deploy a private Container Registry.
74+
75+
- Learning Objectives
76+
Deploy 1 AKS cluster using the Azure AZ CLI.
77+
Deploy 2nd AKS cluster with a bash script.
78+
Deploy Nginx Plus Ingress Controller with F5 Private Registry, to both the Clusters.
79+
Configure Nginx Plus Ingress Controller Dashboards.
80+
Expose the NIC Plus Dashboards externally for Live Monitoring.
81+
82+
<br/>
83+
84+
### 4 - Cafe Demo / Redis Deployment / Plus Dashboard
85+
86+
- Overview
87+
In this lab, you will deploy 2 AKS clusters, with Nginx Ingress Controllers, a Redis cluster, and a Modern Web Application.
88+
89+
- Learning Objectives
90+
Deploy a demo web application in the clusters.
91+
Deploy and test a Redis In Memory Cache to the AKS cluster.
92+
Configure Nginx Ingress for Cafe Demo.
93+
Configure Nginx Ingress for Redis Leader.
94+
Configure Nginx for Azure for Cafe and Redis applications.
95+
96+
<br/>
97+
98+
### Lab 5 - Nginx Load Balancing / Reverse Proxy
99+
100+
- Overview
101+
In this lab, you will configure Nginx for Azure to Load Balance various workloads running in Azure. After successful configuration and adding Best Practice Nginx parameters, you will Load Test these applications, and test multiple load balancing and request routing parameters to suit different use cases.
102+
103+
- Learning Objectives
104+
Configure Nginx for Azure, to Load Balance traffic to both AKS Nginx Ingress Controllers.
105+
Configure HTTP Split Clients, and route traffic to all 3 backend systems.
106+
Load test the Legacy and Modern web applications.
107+
108+
<br/>
109+
110+
### Lab 6 - Azure Key Vault / TLS Essentials
111+
112+
- Overview
113+
In this lab, you use Azure Key Vault for TLS certificates and keys. You will configure Nginx for Azure to use these Azure resources to terminate TLS.
114+
115+
- Learning Objectives
116+
Create a sample Azure Key Vault
117+
Create a TLS cert/key
118+
Configure and test Nginx for Azure to use the Azure Keys
119+
Update the previous Nginx configurations to use TLS for apps
120+
Update NSGs for TLS inbound traffic
121+
122+
<br/>
123+
124+
### Lab 7 - Azure Montoring / Logging Analytics
125+
126+
- Overview
127+
Enable and configure Azure Monitoring for Nginx for Azure. Create custom Azure Dashboards for your applications. Gain experience using Azure Logs and logging tools.
128+
129+
- Learning Objectives
130+
Enable, configure, and test Azure Monitoring for Nginx for Azure.
131+
Create a couple custom dashboards for your load balanced applications.
132+
Explore the Azure logging and Analytics tools available.
133+
134+
<br/>
135+
136+
### Lab 8 - Nginx Garage or Azure Petshop
137+
138+
- Overview
139+
In this lab, you will deploy a modern application in your AKS cluster. You will expose it with Nginx Ingress Controller and Nginx for Azure.
140+
141+
- Learning Objectives
142+
Deploy the modern app in AKS
143+
Test and Verify the app is working correctly
144+
Expose this application outside the cluster with Nginx Ingress Controller
145+
Configure Nginx for Azure for this new application
146+
147+
<br/>
148+
149+
### Lab 9 - Nginx Caching / Rate Limits / Juiceshop
150+
151+
- Overview
152+
In this lab, you will deploy an image rich application, and use Nginx Caching to cache images to improve performance.
153+
154+
- Learning Objectives
155+
Deploy JuiceShop in AKS cluster.
156+
Expose JuiceShop with Nginx Ingress Controller.
157+
Configure Nginx for Azure for load balancing JuiceShop.
158+
Add Nginx Caching to improve delivery of images.
159+
160+
<br/>
161+
162+
### Lab 10 - Grafana for Azure
163+
164+
- Overview
165+
In this lab, you will explore the Nginx and Grafana for Azure integration.
166+
167+
- Learning Objectives
168+
Deploy Grafana for Azure.
169+
Configure the Datasource
170+
Explore a sample Grafana Dashboard for Nginx for Azure
171+
172+
173+
<br/>
174+
175+
### Lab 11 - Optional Exercises
176+
177+
178+
179+
180+
<br/>
181+
182+
### Summary and Wrap-up
183+
184+
- Summary and Wrap-up comments here

ca-notes/N4A Reference Arch.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
N4A Reference Arch
2+
3+
Plus features:
4+
5+
Least time algo
6+
Active HC - not working
7+
Dashboard - not available
8+
metrics
9+
Prometheus
10+
KV store - no API access
11+
Zone synch
12+
Active Active nodes -
13+
OIDC-jwt - no
14+
Split clients
15+
NTLM - no app
16+
Caching
17+
FIPS - AKS/NIC only
18+
19+
NIC - Deep Insight
20+
NLK
21+
NAP WAF - not available
22+
23+
Azure Integrations
24+
Azure Console
25+
AzureAD - not available
26+
Azure Mon
27+
Azure DNS
28+
Azure Log Analisys
29+
Azure Key Vault - certs/keys
30+
Azure HSM - not possible
31+
32+
33+
Infrastructure
34+
FQDN Reg
35+
Public IPs
36+
37+
2 Demo Apps,
38+
One for VMs with NTLM
39+
One for AKS with NIC
40+
And cafe to start
41+
42+
****
43+
44+
N4A Feedback / Issues, feedback, suggestions

ca-notes/N4A-feedback.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# N4A Feedback / Issues, feedback, suggestions
2+
3+
4+
5+
## Azure Metrics are blank, text box is malformed, see screenshot
6+
7+
Nginx Default config `nginx.conf` should have two status_zone directives included. One for server{} block, one for / location block. **This will allow metrics to show up immediately, without the user having to find, understand, and configure status_zones in their nginx.conf file, or included files in /etc/nginx/conf.d.**
8+
9+
```nginx
10+
11+
user nginx;
12+
worker_processes auto;
13+
worker_rlimit_nofile 8192;
14+
pid /run/nginx/nginx.pid;
15+
16+
events {
17+
worker_connections 4000;
18+
}
19+
20+
error_log /var/log/nginx/error.log error;
21+
22+
http {
23+
access_log off;
24+
server_tokens "";
25+
server {
26+
listen 80 default_server;
27+
status_zone default; # Add something here
28+
server_name localhost;
29+
location / {
30+
status_zone /; # Add something here
31+
# Points to a directory with a basic html index file with
32+
# a "Welcome to NGINX as a Service for Azure!" page
33+
root /var/www;
34+
index index.html;
35+
}
36+
}
37+
}
38+
39+
```
40+
41+
There should be a step by step config guide for getting the Metrics to show up, and create a basic Dashboard for Nginx, including the Prerequisites.
42+
43+
## Nginx Standards and Best Practice Violations/Issues
44+
45+
The Nginx default HTML folder/files are missing. This should be included, `/usr/share/nginx/html`, with all the Nginx Error Pages, and other Nginx primitives. Consult a new installation of NginxPlus-R3x to match files.
46+
47+
The usage of the `/var/www` folder is an Apache/Microsoft standard, not an Nginx standard. It should be replaced with `/usr/share/nginx/html` for Nginx users.
48+
49+
The usage of the `/var/cache` folder for caching content is inconsistent with Nginx standards and docs. Most Nginx documentation for caching refers to the `/data/nginx/cache` folder location, and should be changed for Nginx users.
50+
51+
Missing standard nginx.conf `include` directive, for including files in /etc/nginx/conf.d folder.
52+
53+
## NGINX configuration issues
54+
55+
Upload Config Package overwrites the existing nginx.conf, this is a terrible idea. Config package upload should be modified to only allow uploads to the /etc/nginx/conf.d folder, the Nginx standard location for http config files. Perhaps also allow uploads to `/etc/nginx/stream`, the Nginx standard for L4 config files. Even better, allow uploads to a dedicated folder that won't overwrite standard Nginx folders/files, but the user would have to manually copy/paste to move them into the correct folder. Lots of room for discussion and improvement here.
56+
57+
## Caching
58+
59+
From the docs: NGINXaaS for Azure only supports caching to /var/cache/nginx. This is because data at /var/cache/nginx will be stored in a separate Temporary Disk. The size of the temporary disk is 4GB.
60+
61+
This is too small, and there should be an option to use other Azure storage options besides a Temporary disk.
62+
63+
Caching Configuration example is incomplete. It only set up the cache_path location:
64+
65+
http {
66+
# ...
67+
proxy_cache_path /var/cache/nginx keys_zone=mycache:10m;
68+
}
69+
70+
It is `missing` all the other parameters needed for caching to work. A link to Nginx Content Caching is provided, but that is not very helpful.
71+
72+
A complete Caching config example should be provided, perhaps with an include file, pre-configured ?
73+
74+
```nginx
75+
76+
http {
77+
...
78+
79+
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=mycache:10m max_size=500m use_temp_path=off;
80+
81+
...
82+
83+
server {
84+
...
85+
server_name localhost;
86+
location /images {
87+
...
88+
proxy_cache mycache; # Use the cache
89+
proxy_cache_key "$host$request_uri$cookie_user"; # Cache Key
90+
proxy_cache_min_uses 2; # Cache after 2 reqs
91+
proxy_cache_valid 200 30m; # Cache for 30m
92+
proxy_cache_valid 404 1m;
93+
94+
# Required caching headers
95+
proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
96+
add_header Cache-Control "public";
97+
add_header X-Cache-Status $upstream_cache_status; # Add Cache status header
98+
99+
100+
}
101+
}
102+
}
103+
104+
```
105+
106+
## Default 'includes' Directive is missing
107+
108+
## Can't see the Nginx Upstreams
109+
110+
Without the Plus realtime dash board, there is no way to know if the Upstreams defined are correct or working, because
111+
112+
## No access to Nginx Access or Error logs
113+
114+
There is no realtime access to either the Error or Access Logs from Nginx. It makes it virtually impossible to "see what's going on" with Nginx without these logs.
115+
116+
Using the Azure Logging services is complicated, you can't see the original Access or Error logs. An Azure Logging Workspace that shows the error and Access log should be included when the user Deploys N4A. It should be there by default. The lack of this feature will frustrate a large number of Nginx users, especially if they are new to Azure Monitoring / Logging Workspaces.
117+
118+
119+
## Nginx Keepalive for HTTP1.1 settings should be included, missing Best Practice.
120+
121+
```nginx
122+
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
123+
proxy_http_version 1.1;
124+
125+
# Remove the Connection header if the client sends it,
126+
# it could be "close" to close a keepalive connection
127+
proxy_set_header Connection "";
128+
129+
# Host request header field, or the server name matching a request
130+
proxy_set_header Host $host;
131+
132+
```
133+
134+
## Nginx Azure Monitor - can't used Saved Dashboards.
135+
136+
If you create and save a dashboard, it does not work. Looks like you have Share a Dashboard.
137+
138+
I can see the name in the list, but Azure Monitor does not let me "load it and use it". It starts with a new, blank dashboard instead. If you refresh the browser page, all customizations are lost and you start at the beginning.
139+
140+
nginx requests and responses, plus.http.status.4xx are reporting incorrectly. looks like 2xx and 4xx metrics are swapped!
141+
142+
Unique Server, Location, and Upstream block metrics are not available, everything is aggregated in to a Total, no metrics with fine grain resolution.
143+
144+
Very difficult to even see the Upstream IP addresses, this is critical for a Proxy configuration.
145+
146+
147+
***********
148+
149+
## Engineering Areas to investigate
150+
151+
Adam - AzureAD/DNS/Grafana - ingress-demo container update
152+
Chris - Plus LB, AZcompute, Cafe Demo, aks/nic/cafe
153+
Shouvik - AZ monitor, KeyVault, new repo
154+
Steve - Demo app, Redis

ca-notes/R30Plus-dashboard.html

Lines changed: 1928 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)