Skip to content

Commit 37f8463

Browse files
authored
Fixing lab1 to lab4 (#26)
* minor fix to make unique * make container name unique * make configsync group name unique * final edits for lab2 * lab3 updates * lab4 update * minor refactory --------- Signed-off-by: Shouvik <[email protected]>
1 parent 99e27f2 commit 37f8463

Some content is hidden

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

42 files changed

+111
-103
lines changed

labs/lab2/docker-compose.yml

+27-27
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# Chris Akker, Shouvik Dutta, Adam Currier
66
#
77
services:
8-
basics-plus1: # Alpine NGINX Plus Web / Load Balancer
8+
plus1: # Alpine NGINX Plus Web / Load Balancer
99
environment:
1010
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
1111
NGINX_AGENT_SERVER_GRPCPORT: '443'
1212
NGINX_AGENT_TLS_ENABLE: 'true'
1313
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey From One Console
14-
# NGINX_AGENT_INSTANCE_GROUP: one-workshop-plus
15-
hostname: one-workshop-plus1
16-
container_name: one-workshop-plus1
14+
# NGINX_AGENT_INSTANCE_GROUP: $NAME-sync-group
15+
hostname: $NAME-plus1
16+
container_name: $NAME-plus1
1717
image: private-registry.nginx.com/nginx-plus/agent:nginx-plus-r32-alpine-3.20-20240613 # CVE - From Nginx Private Registry
1818
volumes: # Sync these folders to container
1919
- ./nginx-plus/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
@@ -27,15 +27,15 @@ services:
2727
- 9113:9113 # Open for Prometheus Scraper page
2828
restart: always
2929
#
30-
basics-plus2: # Alpine NGINX Plus Web / Load Balancer
30+
plus2: # Alpine NGINX Plus Web / Load Balancer
3131
environment:
3232
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
3333
NGINX_AGENT_SERVER_GRPCPORT: '443'
3434
NGINX_AGENT_TLS_ENABLE: 'true'
3535
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron Nginx One Console
36-
# NGINX_AGENT_INSTANCE_GROUP: one-workshop-plus
37-
hostname: one-workshop-plus2
38-
container_name: one-workshop-plus2
36+
# NGINX_AGENT_INSTANCE_GROUP: $NAME-sync-group
37+
hostname: $NAME-plus2
38+
container_name: $NAME-plus2
3939
image: private-registry.nginx.com/nginx-plus/agent:nginx-plus-r31-alpine-3.19-20240522 # CVE - From Nginx Private Registry
4040
volumes: # Sync these folders to container
4141
- ./nginx-plus/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
@@ -49,15 +49,15 @@ services:
4949
- '9113' # Open for Prometheus Scraper page
5050
restart: always
5151
#
52-
basics-plus3: # RHEL UBI NGINX Plus Web / Load Balancer
52+
plus3: # RHEL UBI NGINX Plus Web / Load Balancer
5353
environment:
5454
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
5555
NGINX_AGENT_SERVER_GRPCPORT: '443'
5656
NGINX_AGENT_TLS_ENABLE: 'true'
5757
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron Nginx One Console
58-
# NGINX_AGENT_INSTANCE_GROUP: one-workshop-plus
59-
hostname: one-workshop-plus3
60-
container_name: one-workshop-plus3
58+
# NGINX_AGENT_INSTANCE_GROUP: $NAME-sync-group
59+
hostname: $NAME-plus3
60+
container_name: $NAME-plus3
6161
image: private-registry.nginx.com/nginx-plus/agent:nginx-plus-r31-ubi-9-20240522 # From Nginx Private Registry
6262
volumes: # Sync these folders to container
6363
- ./nginx-plus/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
@@ -71,14 +71,14 @@ services:
7171
- '9113' # Open for Prometheus Scraper page
7272
restart: always
7373
#
74-
basics-oss1: # Debian NGINX OSS Web / Load Balancer
74+
oss1: # Debian NGINX OSS Web / Load Balancer
7575
environment:
7676
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
7777
NGINX_AGENT_SERVER_GRPCPORT: '443'
7878
NGINX_AGENT_TLS_ENABLE: 'true'
7979
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron Nginx One Console
80-
hostname: one-workshop-oss1
81-
container_name: one-workshop-oss1
80+
hostname: $NAME-oss1
81+
container_name: $NAME-oss1
8282
image: docker-registry.nginx.com/nginx/agent:mainline # From Docker Public Registry
8383
volumes: # Sync these folders to container
8484
- ./nginx-oss/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
@@ -93,14 +93,14 @@ services:
9393
- '9113' # Open for Prometheus Scraper page
9494
restart: always
9595
#
96-
basics-oss2: # Alpine NGINX OSS Web / Load Balancer
96+
oss2: # Alpine NGINX OSS Web / Load Balancer
9797
environment:
9898
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
9999
NGINX_AGENT_SERVER_GRPCPORT: '443'
100100
NGINX_AGENT_TLS_ENABLE: 'true'
101101
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron Nginx One Console
102-
hostname: one-workshop-oss2
103-
container_name: one-workshop-oss2
102+
hostname: $NAME-oss2
103+
container_name: $NAME-oss2
104104
image: docker-registry.nginx.com/nginx/agent:alpine # From Docker Public Registry
105105
volumes: # Sync these folders to container
106106
- ./nginx-oss/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
@@ -115,14 +115,14 @@ services:
115115
- '9113' # Open for Prometheus Scraper page
116116
restart: always
117117
#
118-
basics-oss3: # Older Alpine NGINX OSS Web / Load Balancer
118+
oss3: # Older Alpine NGINX OSS Web / Load Balancer
119119
environment:
120120
NGINX_AGENT_SERVER_HOST: 'agent.connect.nginx.com'
121121
NGINX_AGENT_SERVER_GRPCPORT: '443'
122122
NGINX_AGENT_TLS_ENABLE: 'true'
123123
NGINX_AGENT_SERVER_TOKEN: $TOKEN # Datakey Fron Nginx One Console
124-
hostname: one-workshop-oss3
125-
container_name: one-workshop-oss3
124+
hostname: $NAME-oss3
125+
container_name: $NAME-oss3
126126
image: docker-registry.nginx.com/nginx/agent:1.26-alpine # From Docker Public Registry
127127
volumes: # Sync these folders to container
128128
- ./nginx-oss/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
@@ -138,24 +138,24 @@ services:
138138
restart: always
139139
#
140140
web1:
141-
hostname: web1
142-
container_name: web1
141+
hostname: $NAME-web1
142+
container_name: $NAME-web1
143143
platform: linux/amd64
144144
image: nginxinc/ingress-demo # Image from Docker Hub
145145
ports:
146146
- '80' # Open for HTTP
147147
- '443' # Open for HTTPS
148148
web2:
149-
hostname: web2
150-
container_name: web2
149+
hostname: $NAME-web2
150+
container_name: $NAME-web2
151151
platform: linux/amd64
152152
image: nginxinc/ingress-demo
153153
ports:
154154
- '80'
155155
- '433'
156156
web3:
157-
hostname: web3
158-
container_name: web3
157+
hostname: $NAME-web3
158+
container_name: $NAME-web3
159159
platform: linux/amd64
160160
image: nginxinc/ingress-demo
161161
ports:
37 KB
Loading
11.3 KB
Loading

labs/lab2/readme.md

+34-20
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ You will run some Docker containers to build out various workshop components, us
6565
echo $JWT
6666
```
6767

68+
1. Using the same Terminal, set the `NAME` environment variable with your `initials.lastname`(or any unique value). This is needed if you are using a shared tenant within Distributed Cloud to differentiate your dataplane instance from other attendees.
69+
70+
```bash
71+
# Replace <YOUR_INITIALS.LASTNAME> with proper value (eg. s.jobs)
72+
export NAME=<YOUR_INITIALS.LASTNAME>
73+
```
74+
75+
And verify it was set:
76+
77+
```bash
78+
#check it
79+
echo $NAME
80+
```
81+
6882
1. Using Docker, Login to to the NGINX Private Registry, using the $JWT ENV variable for the username, as follows. (Your system may require sudo):
6983

7084
```bash
@@ -103,44 +117,44 @@ You will run some Docker containers to build out various workshop components, us
103117
## Sample output ##
104118
[+] Running 10/10
105119
✔ Network lab2_default Created 0.0s
106-
✔ Container one-workshop-plus3 Started 0.4s
107-
✔ Container one-workshop-plus1 Started 0.4s
108-
✔ Container web3 Started 0.3s
109-
✔ Container one-workshop-oss1 Started 0.4s
110-
✔ Container web1 Started 0.3s
111-
✔ Container one-workshop-oss2 Started 0.4s
112-
✔ Container one-workshop-oss3 Started 0.4s
113-
✔ Container web2 Started 0.3s
114-
✔ Container one-workshop-plus2 Started 0.4s
120+
✔ Container s.jobs-plus3 Started 0.4s
121+
✔ Container s.jobs-plus1 Started 0.4s
122+
✔ Container s.jobs-web3 Started 0.3s
123+
✔ Container s.jobs-oss1 Started 0.4s
124+
✔ Container s.jobs-web1 Started 0.3s
125+
✔ Container s.jobs-oss2 Started 0.4s
126+
✔ Container s.jobs-oss3 Started 0.4s
127+
✔ Container s.jobs-web2 Started 0.3s
128+
✔ Container s.jobs-plus2 Started 0.4s
115129
```
116130

117131
1. Verify that all 9 containers started:
118132

119133
```bash
120-
docker ps
134+
docker ps | grep $NAME
121135
```
122136

123137
```bash
124138
##Sample output##
125139

126140
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
127141
# NGINX OSS containers
128-
00ee8c9e4326 docker-registry.nginx.com/nginx/agent:mainline "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33396->80/tcp, :::33395->80/tcp, 0.0.0.0:33393->443/tcp, :::33392->443/tcp, 0.0.0.0:33388->9000/tcp, :::33387->9000/tcp, 0.0.0.0:33381->9113/tcp, :::33380->9113/tcp one-workshop-oss1
129-
34b871d50d1b docker-registry.nginx.com/nginx/agent:alpine "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33391->80/tcp, :::33390->80/tcp, 0.0.0.0:33385->443/tcp, :::33384->443/tcp, 0.0.0.0:33378->9000/tcp, :::33377->9000/tcp, 0.0.0.0:33375->9113/tcp, :::33374->9113/tcp one-workshop-oss2
130-
022d79ce886c docker-registry.nginx.com/nginx/agent:1.26-alpine "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33398->80/tcp, :::33397->80/tcp, 0.0.0.0:33395->443/tcp, :::33394->443/tcp, 0.0.0.0:33392->9000/tcp, :::33391->9000/tcp, 0.0.0.0:33386->9113/tcp, :::33385->9113/tcp one-workshop-oss3
142+
00ee8c9e4326 docker-registry.nginx.com/nginx/agent:mainline "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33396->80/tcp, :::33395->80/tcp, 0.0.0.0:33393->443/tcp, :::33392->443/tcp, 0.0.0.0:33388->9000/tcp, :::33387->9000/tcp, 0.0.0.0:33381->9113/tcp, :::33380->9113/tcp s.jobs-oss1
143+
34b871d50d1b docker-registry.nginx.com/nginx/agent:alpine "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33391->80/tcp, :::33390->80/tcp, 0.0.0.0:33385->443/tcp, :::33384->443/tcp, 0.0.0.0:33378->9000/tcp, :::33377->9000/tcp, 0.0.0.0:33375->9113/tcp, :::33374->9113/tcp s.jobs-oss2
144+
022d79ce886c docker-registry.nginx.com/nginx/agent:1.26-alpine "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33398->80/tcp, :::33397->80/tcp, 0.0.0.0:33395->443/tcp, :::33394->443/tcp, 0.0.0.0:33392->9000/tcp, :::33391->9000/tcp, 0.0.0.0:33386->9113/tcp, :::33385->9113/tcp s.jobs-oss3
131145

132146
# NGINX Plus containers
133-
9770a4169e19 private-registry.nginx.com/nginx-plus/agent:nginx-plus-r32-alpine-3.20-20240613 "/usr/bin/supervisor…" 44 minutes ago Up 44 minutes 0.0.0.0:33397->80/tcp, :::33396->80/tcp, 0.0.0.0:33394->443/tcp, :::33393->443/tcp, 0.0.0.0:33389->9000/tcp, :::33388->9000/tcp, 0.0.0.0:33383->9113/tcp, :::33382->9113/tcp one-workshop-plus1
134-
852667e29280 private-registry.nginx.com/nginx-plus/agent:nginx-plus-r31-alpine-3.19-20240522 "/usr/bin/supervisor…" 44 minutes ago Up 44 minutes 0.0.0.0:33382->80/tcp, :::33381->80/tcp, 0.0.0.0:33377->443/tcp, :::33376->443/tcp, 0.0.0.0:33374->9000/tcp, :::33373->9000/tcp, 0.0.0.0:33372->9113/tcp, :::33371->9113/tcp one-workshop-plus2
135-
ffa65b04e03b private-registry.nginx.com/nginx-plus/agent:nginx-plus-r31-ubi-9-20240522 "/usr/bin/supervisor…" 44 minutes ago Up 44 minutes 0.0.0.0:33373->80/tcp, :::33372->80/tcp, 0.0.0.0:33371->443/tcp, :::33370->443/tcp, 0.0.0.0:33370->9000/tcp, :::33369->9000/tcp, 0.0.0.0:33369->9113/tcp, :::33368->9113/tcp one-workshop-plus3
147+
9770a4169e19 private-registry.nginx.com/nginx-plus/agent:nginx-plus-r32-alpine-3.20-20240613 "/usr/bin/supervisor…" 44 minutes ago Up 44 minutes 0.0.0.0:33397->80/tcp, :::33396->80/tcp, 0.0.0.0:33394->443/tcp, :::33393->443/tcp, 0.0.0.0:33389->9000/tcp, :::33388->9000/tcp, 0.0.0.0:33383->9113/tcp, :::33382->9113/tcp s.jobs-plus1
148+
852667e29280 private-registry.nginx.com/nginx-plus/agent:nginx-plus-r31-alpine-3.19-20240522 "/usr/bin/supervisor…" 44 minutes ago Up 44 minutes 0.0.0.0:33382->80/tcp, :::33381->80/tcp, 0.0.0.0:33377->443/tcp, :::33376->443/tcp, 0.0.0.0:33374->9000/tcp, :::33373->9000/tcp, 0.0.0.0:33372->9113/tcp, :::33371->9113/tcp s.jobs-plus2
149+
ffa65b04e03b private-registry.nginx.com/nginx-plus/agent:nginx-plus-r31-ubi-9-20240522 "/usr/bin/supervisor…" 44 minutes ago Up 44 minutes 0.0.0.0:33373->80/tcp, :::33372->80/tcp, 0.0.0.0:33371->443/tcp, :::33370->443/tcp, 0.0.0.0:33370->9000/tcp, :::33369->9000/tcp, 0.0.0.0:33369->9113/tcp, :::33368->9113/tcp s.jobs-plus3
136150

137151
# NGINX Ingress Demo containers (not Registered with NGINX One Console)
138-
37c2777c8598 nginxinc/ingress-demo "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33387->80/tcp, :::33386->80/tcp, 0.0.0.0:33379->443/tcp, :::33378->443/tcp web1
139-
dba569e76e36 nginxinc/ingress-demo "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 443/tcp, 0.0.0.0:33390->80/tcp, :::33389->80/tcp, 0.0.0.0:33384->433/tcp, :::33383->433/tcp web2
140-
5cde3c462a27 nginxinc/ingress-demo "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33380->80/tcp, :::33379->80/tcp, 0.0.0.0:33376->443/tcp, :::33375->443/tcp web3
152+
37c2777c8598 nginxinc/ingress-demo "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33387->80/tcp, :::33386->80/tcp, 0.0.0.0:33379->443/tcp, :::33378->443/tcp s.jobs-web1
153+
dba569e76e36 nginxinc/ingress-demo "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 443/tcp, 0.0.0.0:33390->80/tcp, :::33389->80/tcp, 0.0.0.0:33384->433/tcp, :::33383->433/tcp s.jobs-web2
154+
5cde3c462a27 nginxinc/ingress-demo "/docker-entrypoint.…" 44 minutes ago Up 44 minutes 0.0.0.0:33380->80/tcp, :::33379->80/tcp, 0.0.0.0:33376->443/tcp, :::33375->443/tcp s.jobs-web3
141155
```
142156

143-
Go back to your NGINX One Console Instance page, and click `Refresh`. You should see all 6 of your `one-workshop-` instances appear in the list, and the Online icon should be `green`. If they did not Register with the One Console, it is likely you have an issue with the $TOKEN used, create a new Dataplane Key and try again. It should look similar to this:
157+
Go back to your NGINX One Console Instance page, and click `Refresh`. In the search box type in your `$NAME` value to search your instances. You should see all 6 of your instances appear in the list, and the Online icon should be `green`. If they did not Register with the One Console, it is likely you have an issue with the $TOKEN used, create a new Dataplane Key and try again. It should look similar to this:
144158

145159
![NGINX Instances](media/lab2_none-instances.png)
146160

2.39 KB
Loading
-2.63 KB
Loading
-2.84 KB
Loading
-3.35 KB
Loading

labs/lab3/media/lab3_none-cpu.png

-3.59 KB
Loading
2.34 KB
Loading

labs/lab3/media/lab3_none-cves.png

-648 Bytes
Loading

labs/lab3/media/lab3_none-network.png

-6.68 KB
Loading

labs/lab3/media/lab3_none-ram.png

-1.8 KB
Loading
Loading
13 KB
Loading
-52.2 KB
Binary file not shown.
Binary file not shown.
-85.4 KB
Binary file not shown.
-106 KB
Binary file not shown.

labs/lab3/media/lab3_oss1-certs.png

51.2 KB
Loading
87.4 KB
Loading

labs/lab3/media/lab3_plus1-cves.png

89.6 KB
Loading

labs/lab3/media/lab3_plus2-cves.png

94.9 KB
Loading
Loading

0 commit comments

Comments
 (0)