Skip to content

Commit dc61b1f

Browse files
Fixed manual build script (#143)
1 parent f7af2aa commit dc61b1f

File tree

3 files changed

+52
-46
lines changed

3 files changed

+52
-46
lines changed

nginx-nms-docker/Dockerfile.manual

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,18 @@ WORKDIR /deployment/setup
2424
COPY $NIM_DEBFILE /deployment/setup/nim.deb
2525

2626
RUN apt-get -y install /deployment/setup/nim.deb && \
27-
curl -s http://hg.nginx.org/nginx.org/raw-file/tip/xml/en/security_advisories.xml > /usr/share/nms/cve.xml
28-
29-
# Optional Security Monitoring
30-
RUN if [ "$SM_IMAGE" != "nim-files/.placeholder" ] ; then \
31-
apt-get -y install /deployment/setup/sm.deb; fi
32-
33-
# Optional WAF Policy Compiler
34-
RUN if [ "$PUM_IMAGE" != "nim-files/.placeholder" ] ; then \
35-
apt-get -y install /deployment/setup/pum.deb; fi
36-
37-
# Set permissions
38-
RUN chmod +x /etc/nms/scripts/*.sh
39-
40-
RUN rm -r /deployment/setup
27+
curl -s http://hg.nginx.org/nginx.org/raw-file/tip/xml/en/security_advisories.xml > /usr/share/nms/cve.xml \
28+
# Optional Security Monitoring
29+
&& if [ "$SM_IMAGE" != "nim-files/.placeholder" ] ; then \
30+
apt-get -y install /deployment/setup/sm.deb; fi \
31+
# Optional WAF Policy Compiler
32+
&& if [ "$PUM_IMAGE" != "nim-files/.placeholder" ] ; then \
33+
apt-get -y install /deployment/setup/pum.deb; fi \
34+
# Set permissions
35+
&& chmod +x /etc/nms/scripts/*.sh \
36+
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
37+
&& chmod +x /usr/bin/yq \
38+
&& rm -r /deployment/setup
4139

4240
# Optional Second Sight
4341
WORKDIR /deployment

nginx-nms-docker/README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# NGINX Management Suite for Docker
1+
# NGINX Instance Manager for Docker
22

3-
This repository helps deploying NGINX Management Suite on containerized clusters by creating a docker image or deploying the official Helm chart with a simple bash script.
3+
This repository helps deploying NGINX Instance Manager on containerized clusters by creating a docker image.
44

55
## Docker image creation
66

@@ -12,19 +12,13 @@ Docker image creation is supported for:
1212

1313
The image can optionally be built with [Second Sight](https://github.com/F5Networks/SecondSight) support
1414

15-
## Deployment through the official Helm chart
16-
17-
A bash script to quickly install NGINX Management Suite through the official Helm chart is available here:
18-
19-
- [Helm installer](contrib/helm-installer)
20-
2115
## Tested releases
2216

2317
This repository has been tested with:
2418

25-
- NGINX Instance Manager 2.4.0, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.12.0, 2.13.0, 2.13.1, 2.14.0, 2.14.1, 2.15.0, 2.15.1
19+
- NGINX Instance Manager 2.4.0, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.12.0, 2.13.0, 2.13.1, 2.14.0, 2.14.1, 2.15.0, 2.15.1, 2.16.0
2620
- Security Monitoring 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.7.1
27-
- NGINX App Protect WAF compiler v3.1088.2, v4.100.1, v4.2.0, v4.218.0, v4.279.0, v4.402.0, v4.457.0, v4.583.0, v4.641, v4.762.0
21+
- NGINX App Protect WAF compiler v3.1088.2, v4.100.1, v4.2.0, v4.218.0, v4.279.0, v4.402.0, v4.457.0, v4.583.0, v4.641, v4.762
2822

2923
## Prerequisites
3024

@@ -35,7 +29,7 @@ This repository has been tested with:
3529
- Kubernetes cluster with dynamic storage provisioner enabled: see the [example](contrib/pvc-provisioner)
3630
- NGINX Ingress Controller with `VirtualServer` CRD support (see https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/)
3731
- Access to F5/NGINX downloads to fetch NGINX Instance Manager 2.4.0+ installation .deb file (when running in manual mode)
38-
- Valid NGINX license certificate and key to fetch NGINX Management Suite packages (when running in automated mode)
32+
- Valid NGINX license certificate and key to fetch NGINX Instance Manager packages (when running in automated mode)
3933
- Linux host running Docker to build the image
4034

4135
## How to build
@@ -44,9 +38,9 @@ The install script can be used to build the Docker image using automated or manu
4438

4539
```
4640
$ ./scripts/buildNIM.sh
47-
NGINX Management Suite Docker image builder
41+
NGINX Instance Manager Docker image builder
4842
49-
This tool builds a Docker image to run NGINX Management Suite
43+
This tool builds a Docker image to run NGINX Instance Manager
5044
5145
=== Usage:
5246
@@ -88,7 +82,7 @@ NGINX Management Suite Docker image builder
8882
### Automated build
8983

9084
1. Clone this repo
91-
2. Get your license certificate and key to fetch NGINX Management Suite packages from NGINX repository
85+
2. Get your license certificate and key to fetch NGINX Instance Manager packages from NGINX repository
9286
3. Build NGINX Instance Manager Docker image using:
9387

9488
NGINX Instance Manager
@@ -105,18 +99,33 @@ NGINX Instance Manager, Security Monitoring and WAF Policy Compiler
10599

106100
### Manual build
107101

108-
1. Clone this repo
102+
1. Clone this repository
109103
2. Download NGINX Instance Manager 2.4.0+ .deb installation file for Ubuntu 20.04 and copy it into `nim-files/`
110-
3. Optional: download API Connectivity Manager 1.0+ .deb installation file for Ubuntu 20.04 and copy it into `nim-files/`
111-
4. Optional: download Security Monitoring .deb installation file for Ubuntu 20.04 and copy it into `nim-files/`
112-
5. Optional: download WAF Policy Compiler .deb installation file for Ubuntu 20.04 and copy it into `nim-files/`
113-
6. Build NGINX Instance Manager Docker image using:
104+
3. Optional: download Security Monitoring .deb installation file for Ubuntu 20.04 and copy it into `nim-files/`
105+
4. Optional: download WAF Policy Compiler .deb installation file for Ubuntu 20.04 and copy it into `nim-files/`
106+
5. Build NGINX Instance Manager Docker image using the provided script
107+
108+
Example:
114109

115110
```
116-
./scripts/buildNIM.sh -n nim-files/nms-instance-manager_2.6.0-698150575~focal_amd64.deb \
117-
-w nim-files/nms-sm_1.0.0-697204659~focal_amd64.deb \
118-
-p nim-files/nms-nap-compiler-v4.2.0_4.2.0-1~focal_amd64.deb \
119-
-t my.registry.tld/nginx-nms:2.6.0
111+
cd nim-files
112+
113+
apt-cache madison nms-instance-manager
114+
apt-get download nms-instance-manager=2.15.1-1175574316~focal
115+
116+
apt-cache madison nms-sm
117+
apt-get download nms-sm=1.7.1-1046510610~focal
118+
119+
apt-cache search nms-nap-compiler
120+
apt-get download nms-nap-compiler-v4.815.0
121+
122+
cd ..
123+
124+
./scripts/buildNIM.sh \
125+
-t my-private-registry/nginx-instance-manager:2.15.1-nap-v4.815.0-manualbuild \
126+
-n nim-files/nms-instance-manager_2.15.1-1175574316~focal_amd64.deb \
127+
-w nim-files/nms-sm_1.7.1-1046510610~focal_amd64.deb \
128+
-p nim-files/nms-nap-compiler-v4.815.0_4.815.0-1~focal_amd64.deb
120129
```
121130

122131
### Configuring and running
@@ -233,11 +242,10 @@ and then restart nginx-agent
233242
## Additional tools
234243

235244
- [Grafana dashboard for telemetry](contrib/grafana)
236-
- [Helm installer](contrib/helm-installer)
237245
- [Docker compose](contrib/docker-compose)
238246

239247

240-
# Starting NGINX Management Suite
248+
# Starting NGINX Instance Manager
241249

242250
## On Kubernetes
243251

@@ -262,7 +270,7 @@ grafana-6f58d455c7-8lk64 1/1 Running 0 5m8s 10.244.2.80
262270
nginx-nim2-679987c54d-7rl6b 1/1 Running 0 5m8s 10.244.1.64 f5-node1 <none> <none>
263271
```
264272

265-
NGINX Management Suite GUI is now reachable from outside the cluster at:
273+
NGINX Instance Manager GUI is now reachable from outside the cluster at:
266274
- Web GUI: `https://nim2.f5.ff.lan`
267275
- gRPC: `nim2.f5.ff.lan:30443`
268276
- Second Sight: see [usage](https://github.com/F5Networks/SecondSight/blob/main/USAGE.md)
@@ -271,7 +279,7 @@ NGINX Management Suite GUI is now reachable from outside the cluster at:
271279

272280
See [docker-compose](contrib/docker-compose)
273281

274-
# Stopping NGINX Management Suite
282+
# Stopping NGINX Instance Manager
275283

276284
## On Kubernetes
277285

nginx-nms-docker/scripts/buildNIM.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Automated build:\n\n
1717
-C [file.crt]\t\t- Certificate file to pull packages from the official NGINX repository\n
1818
-K [file.key]\t\t- Key file to pull packages from the official NGINX repository\n
1919
-W\t\t\t- Enable Security Monitoring - optional\n
20-
-P [version]\t\t- Enable WAF policy compiler, version can be any [v3.1088.2|v4.100.1|v4.2.0|v4.218.0|v4.279.0|v4.402.0|v4.457.0|v4.583.0] - optional\n\n
20+
-P [version]\t\t- Enable WAF policy compiler, version can be any [v3.1088.2|v4.100.1|v4.2.0|v4.218.0|v4.279.0|v4.402.0|v4.457.0|v4.583.0|v4.641|v4.762|v4.815.0] - optional\n\n
2121
=== Examples:\n\n
2222
Manual build:\n
23-
\t$0 -n nim-files/nms-instance-manager_2.6.0-698150575~focal_amd64.deb \\\\\n
24-
\t\t-w nim-files/nms-sm_1.0.0-697204659~focal_amd64.deb \\\\\n
25-
\t\t-p nim-files/nms-nap-compiler-v4.2.0.deb \\\\\n
26-
\t\t-t my.registry.tld/nginx-nms:2.6.0\n\n
23+
\t$0 -t my-private-registry/nginx-instance-manager:2.15.1-nap-v4.815.0-manualbuild \\\\\\n
24+
\t\t-n nim-files/nms-instance-manager_2.15.1-1175574316~focal_amd64.deb \\\\\n
25+
\t\t-w nim-files/nms-sm_1.7.1-1046510610~focal_amd64.deb \\\\\n
26+
\t\t-p nim-files/nms-nap-compiler-v4.815.0_4.815.0-1~focal_amd64.deb\n\n
2727
Automated build:\n
2828
\t$0 -i -C nginx-repo.crt -K nginx-repo.key\n
2929
\t\t-W -P v4.583.0 -t my.registry.tld/nginx-nms:latest\n

0 commit comments

Comments
 (0)