Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Application Delivery Manger, tested with NGINX Instance Manager 2.15.0 #127

Merged
merged 58 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c556c7d
Added API Connectivity Manager 1.5.0 support
fabriziofiorucci Mar 29, 2023
eebf814
Ownership fix
fabriziofiorucci Mar 30, 2023
889dd60
Merge branch 'nginxinc:master' into master
fabriziofiorucci Mar 30, 2023
9aac959
Startup script fix
fabriziofiorucci Mar 31, 2023
bcc0ac1
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Mar 31, 2023
500ce65
Startup script fix
fabriziofiorucci Mar 31, 2023
2fae74f
NGINX App Protect WAF updates
fabriziofiorucci Apr 3, 2023
756b3c0
Tested with NGINX Instance Manager 2.9.1
fabriziofiorucci Apr 7, 2023
16d9a06
Merge branch 'nginxinc:master' into master
fabriziofiorucci Apr 7, 2023
380c1d5
Added docker-compose support
fabriziofiorucci Apr 18, 2023
c7e6856
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Apr 18, 2023
28be917
Merge branch 'nginxinc:master' into master
fabriziofiorucci Apr 27, 2023
74eabe6
Tested with NGINX Instance Manager 2.10.0 and Security Monitoring 1.4.0
fabriziofiorucci Apr 27, 2023
e539766
Tested with NGINX Instance Manager 2.10.0 and API Connectivity Manage…
fabriziofiorucci Apr 27, 2023
3086f4a
Merge branch 'nginxinc:master' into master
fabriziofiorucci May 11, 2023
5115664
Tested with API Connectivity Manager 1.6.0
fabriziofiorucci May 11, 2023
9167ad4
Tested with API Connectivity Manager 1.6.0
fabriziofiorucci May 13, 2023
2f64eea
Merge branch 'nginxinc:master' into master
fabriziofiorucci May 29, 2023
7b0e8fc
README updated
fabriziofiorucci May 29, 2023
93c7575
Added support for NGINX Instance Manager 2.10.1 and App Delivery Mana…
fabriziofiorucci May 29, 2023
eb04147
Fixed NGINX App Protect detection bug for NGINX Instance Manager 2.10.0+
fabriziofiorucci May 31, 2023
2329a18
Fixed agent syslog receiver bug
fabriziofiorucci Jun 5, 2023
1cd9453
README updated
fabriziofiorucci Jun 9, 2023
5904979
Tested with NGINX Instance Manager 2.11.0 and Security Monitoring 1.5.0
fabriziofiorucci Jun 16, 2023
dafcf88
Tested with NGINX Instance Manager 2.11.0
fabriziofiorucci Jun 16, 2023
0ff4e8c
Tested with NGINX API Connectivity Manager 1.7.0
fabriziofiorucci Jun 26, 2023
5160332
Merge branch 'master' into master
fabriziofiorucci Jun 26, 2023
40ea4f2
Tested with NGINX Instance Manager 2.12.0 and Security Monitoring 1.6.0
fabriziofiorucci Jul 24, 2023
fd7d5a1
Merge branch 'master' into master
fabriziofiorucci Jul 24, 2023
f77f6f3
Tested with API Connectivity Manager 1.8.0
fabriziofiorucci Jul 27, 2023
5c400a4
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Jul 27, 2023
02f0260
Tested with API Connectivity Manager 1.8.0
fabriziofiorucci Jul 27, 2023
5aa7100
Tested with NGINX Instance Manager 2.12.0
fabriziofiorucci Aug 3, 2023
d54aee4
Merge branch 'master' into master
fabriziofiorucci Aug 3, 2023
1eb9acc
Dockerfile updated
fabriziofiorucci Aug 3, 2023
e85eebc
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Aug 3, 2023
2ba13f8
Support for NGINX Instance Manager 2.13
fabriziofiorucci Sep 11, 2023
cbf7a4a
Tested with NGINX Instance Manager 2.13
fabriziofiorucci Sep 11, 2023
b880341
Merge branch 'master' into master
fabriziofiorucci Sep 11, 2023
981477e
Tested with NIM 2.14.0 and SM 1.7.0
fabriziofiorucci Oct 19, 2023
82ff51e
Merge branch 'master' into master
fabriziofiorucci Oct 19, 2023
f5bf95e
Tested with NIM 2.14.0 and SM 1.7.0
fabriziofiorucci Oct 19, 2023
d2aa00c
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Oct 19, 2023
427288c
Merge branch 'nginxinc:master' into master
fabriziofiorucci Oct 19, 2023
021149f
Tested with NGINX Instance Manager 2.14.0
fabriziofiorucci Oct 19, 2023
979d8c3
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Oct 19, 2023
2fa105d
Tested with NGINX Instance Manager 2.14.0
fabriziofiorucci Oct 19, 2023
72788bd
Tested with NGINX App Protect compiler v4.583.0
fabriziofiorucci Oct 26, 2023
72a37d7
Merge branch 'nginxinc:master' into master
fabriziofiorucci Nov 24, 2023
925e0cd
Start script updated
fabriziofiorucci Nov 24, 2023
911b7f5
Advanced metrics support added
fabriziofiorucci Dec 1, 2023
6296d4a
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Dec 1, 2023
e78068f
Merge branch 'nginxinc:master' into master
fabriziofiorucci Dec 1, 2023
6fc2e57
Advanced metrics support added
fabriziofiorucci Dec 1, 2023
7e0b69f
Merge branch 'master' of github.com:fabriziofiorucci/NGINX-Demos
fabriziofiorucci Dec 1, 2023
796dd3d
Removed Application Delivery Manger, tested with NGINX Instance Manag…
fabriziofiorucci Dec 13, 2023
f3a2bf9
Merge branch 'nginxinc:master' into master
fabriziofiorucci Dec 13, 2023
5a92184
Removed devportal, tested with NGINX Instance Manager 2.15.0
fabriziofiorucci Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions nginx-agent-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM debian:bullseye-slim

ARG NMS_URL
ARG DEVPORTAL=false
ARG NAP_WAF=false

# Initial packages setup
Expand Down Expand Up @@ -30,16 +29,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
&& apt-get -y update \
&& apt-get -y install app-protect app-protect-attack-signatures; fi \

# Optional API Connectivity Manager DevPortal
# https://docs.nginx.com/nginx-management-suite/admin-guides/installation/on-prem/install-guide/
&& if [ "$DEVPORTAL" = "true" ] ; then \
printf "deb https://pkgs.nginx.com/nms/debian `lsb_release -cs` nginx-plus\n" > /etc/apt/sources.list.d/nms.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 \
&& apt-get -y update \
&& apt-get -y install nginx-devportal nginx-devportal-ui \
&& echo 'DB_TYPE="sqlite"' >> /etc/nginx-devportal/devportal.conf \
&& echo 'DB_PATH="/var/lib/nginx-devportal"' >> /etc/nginx-devportal/devportal.conf; fi \

# Forward request logs to Docker log collector
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
Expand Down
20 changes: 5 additions & 15 deletions nginx-agent-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ This repository can be used to build a docker image with NGINX Plus and NGINX In

This repository has been tested with NGINX agent for:

- 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.10.0, 2.10.1, 2.11.0, 2.12.0, 2.13.0, 2.13.1, 2.14.0, 2.14.1
- API Connectivity Manager 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0
- 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.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
- NGINX App Protect WAF 4.100.1+

## Prerequisites
Expand Down Expand Up @@ -41,19 +40,15 @@ NGINX Plus & NGINX Instance Manager agent Docker image builder
-C [file.crt] - Certificate to pull packages from the official NGINX repository
-K [file.key] - Key to pull packages from the official NGINX repository
-n [URL] - NGINX Instance Manager URL to fetch the agent
-d - Build support for NGINX API Gateway Developer Portal
-w - Add NGINX App Protect WAF

=== Examples:

NGINX Plus and NGINX Agent image:
./scripts/build.sh -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:r28 -n https://nim.f5.ff.lan
./scripts/build.sh -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:latest -n https://nim.f5.ff.lan

NGINX Plus, NGINX App Protect WAF and NGINX Agent image:
./scripts/build.sh -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:r28-nap -w -n https://nim.f5.ff.lan

NGINX Plus, Developer Portal support and NGINX Agent image:
./scripts/build.sh -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:r28-devportal -d -n https://nim.f5.ff.lan
./scripts/build.sh -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:latest-nap -w -n https://nim.f5.ff.lan
```

1. Clone this repository
Expand All @@ -67,7 +62,6 @@ $ ./scripts/build.sh -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:3100

the build script will push the image to your private registry once build is complete.

- the `-d` flag can be used to build a Docker image to run NGINX Plus in [Developer Portal](https://docs.nginx.com/nginx-management-suite/admin-guides/installation/on-prem/install-guide/#install-developer-portal) mode for [API Connectivity Manager](https://docs.nginx.com/nginx-management-suite/acm/about/architecture/)
- the `-w` flag can be used to include NGINX App Protect WAF support in the docker image

### Running the docker image on Kubernetes
Expand All @@ -80,7 +74,6 @@ the build script will push the image to your private registry once build is comp
- `NIM_ADVANCED_METRICS` - set to `"true"` to enable advanced metrics collection
- `NAP_WAF` - set to `"true"` to enable NGINX App Protect WAF (docker image built using `-w`)
- `NAP_WAF_PRECOMPILED_POLICIES` - set to `"true"` to enable NGINX App Protect WAF precompiled policies (docker image built using `-w`)
- `ACM_DEVPORTAL` - set to `"true"` to enable API Connectivity Manager Developer Portal (docker image built using `-d`)

2. Start and stop using

Expand All @@ -97,13 +90,10 @@ $ ./scripts/nginxWithAgentStart.sh stop

```
NGINX Plus and NGINX Agent
docker run --name nginx-plus -d -e "NIM_HOST=<NIM_FQDN_OR_IP>" -e "NIM_GRPC_PORT=<GPRC_PORT>" -d registry.ff.lan:31005/nginx-with-agent:r28
docker run --name nginx-plus -d -e "NIM_HOST=<NIM_FQDN_OR_IP>" -e "NIM_GRPC_PORT=<GPRC_PORT>" -d registry.ff.lan:31005/nginx-with-agent:latest

NGINX Plus, NGINX Agent and NGINX App Protect WAF with precompiled policies
docker run --name nginx-plus -d -e "NIM_HOST=<NIM_FQDN_OR_IP>" -e "NIM_GRPC_PORT=<GPRC_PORT>" -e "NAP_WAF=true" -e "NAP_WAF_PRECOMPILED_POLICIES=true" -d registry.ff.lan:31005/nginx-with-agent:r28-nap

NGINX Plus, NGINX Agent and Developer portal
docker run --name nginx-plus -d -e "NIM_HOST=<NIM_FQDN_OR_IP>" -e "NIM_GRPC_PORT=<GPRC_PORT>" -e "ACM_DEVPORTAL=true" -d registry.ff.lan:31005/nginx-with-agent:r28-devportal
docker run --name nginx-plus -d -e "NIM_HOST=<NIM_FQDN_OR_IP>" -e "NIM_GRPC_PORT=<GPRC_PORT>" -e "NAP_WAF=true" -e "NAP_WAF_PRECOMPILED_POLICIES=true" -d registry.ff.lan:31005/nginx-with-agent:latest-nap
```

2. After startup NGINX Plus instances will register to NGINX Instance Manager and will be displayed on the "instances" dashboard
4 changes: 0 additions & 4 deletions nginx-agent-docker/container/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,4 @@ extensions:
__EOT__
fi

if [[ "$ACM_DEVPORTAL" == "true" ]]; then
nginx-devportal server &
fi

sg nginx-agent "/usr/bin/nginx-agent $PARM"
20 changes: 4 additions & 16 deletions nginx-agent-docker/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@ $0 [options]\n\n
-C [file.crt]\t\t- Certificate to pull packages from the official NGINX repository\n
-K [file.key]\t\t- Key to pull packages from the official NGINX repository\n
-n [URL]\t\t- NGINX Instance Manager URL to fetch the agent\n
-d\t\t\t- Build support for NGINX API Gateway Developer Portal\n
-w\t\t\t- Add NGINX App Protect WAF\n\n
=== Examples:\n\n
NGINX Plus and NGINX Agent image:\n
$0 -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:r28 -n https://nim.f5.ff.lan\n\n
$0 -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:latest -n https://nim.f5.ff.lan\n\n
NGINX Plus, NGINX App Protect WAF and NGINX Agent image:\n
$0 -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:r28-nap -w -n https://nim.f5.ff.lan\n\n
NGINX Plus, Developer Portal support and NGINX Agent image:\n
$0 -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:r28-devportal -d -n https://nim.f5.ff.lan
\n"
$0 -C nginx-repo.crt -K nginx-repo.key -t registry.ff.lan:31005/nginx-with-agent:latest-nap -w -n https://nim.f5.ff.lan\n"

while getopts 'ht:C:K:a:n:dw' OPTION
while getopts 'ht:C:K:a:n:w' OPTION
do
case "$OPTION" in
h)
Expand All @@ -42,9 +38,6 @@ do
n)
NMSURL=$OPTARG
;;
d)
DEVPORTAL=true
;;
w)
NAP_WAF=true
;;
Expand Down Expand Up @@ -77,19 +70,14 @@ fi

echo "=> Target docker image is $IMAGENAME"

if [ ! -z "${DEVPORTAL}" ]
then
echo "=> Building with Developer Portal support"
fi

if [ ! -z "${NAP_WAF}" ]
then
echo "=> Building with NGINX App Protect WAF support"
fi

DOCKER_BUILDKIT=1 docker build --no-cache -f Dockerfile \
--secret id=nginx-key,src=$NGINX_KEY --secret id=nginx-crt,src=$NGINX_CERT \
--build-arg NMS_URL=$NMSURL --build-arg DEVPORTAL=$DEVPORTAL --build-arg NAP_WAF=$NAP_WAF -t $IMAGENAME .
--build-arg NMS_URL=$NMSURL --build-arg NAP_WAF=$NAP_WAF -t $IMAGENAME .

echo "=> Build complete for $IMAGENAME"
docker push $IMAGENAME
5 changes: 0 additions & 5 deletions nginx-nms-docker/Dockerfile.automated
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ARG BUILD_WITH_SECONDSIGHT=false
ARG ADD_ACM
ARG ADD_SM
ARG ADD_PUM
ARG ADD_ADM

# Initial setup
RUN apt-get update && \
Expand All @@ -19,7 +18,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
set -x \
&& chmod +x /deployment/startNIM.sh \
&& printf "deb https://pkgs.nginx.com/nms/ubuntu `lsb_release -cs` nginx-plus\n" > /etc/apt/sources.list.d/nms.list \
&& printf "deb https://pkgs.nginx.com/adm/ubuntu `lsb_release -cs` nginx-plus\n" >> /etc/apt/sources.list.d/nms.list \
&& wget -q -O /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \
&& wget -O /tmp/nginx_signing.key https://cs.nginx.com/static/keys/nginx_signing.key \
&& apt-key add /tmp/nginx_signing.key \
Expand All @@ -35,9 +33,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
# Optional WAF Policy Compiler
&& if [ ! -z "${ADD_PUM}" ] ; then \
apt-get -y install nms-nap-compiler-$ADD_PUM; fi \
# Optional App Delivery Manager
&& if [ ! -z "${ADD_ADM}" ] ; then \
apt-get -y install nms-app-delivery-manager; fi \
# Set permissions
&& chmod +x /etc/nms/scripts/*.sh \
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
Expand Down
25 changes: 8 additions & 17 deletions nginx-nms-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Docker image creation is supported for:
- [NGINX API Connectivity Manager](https://docs.nginx.com/nginx-management-suite/acm/) 1.0.0+
- [Security Monitoring](https://docs.nginx.com/nginx-management-suite/security/) 1.0.0+
- [NGINX App Protect WAF compiler](https://docs.nginx.com/nginx-management-suite/nim/how-to/app-protect/setup-waf-config-management)
- [NGINX App Delivery Manager](https://docs.nginx.com/nginx-management-suite/adm/) 4.0.0+

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

Expand All @@ -24,11 +23,10 @@ A bash script to quickly install NGINX Management Suite through the official Hel

This repository has been tested with:

- 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
- 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
- NGINX API Connectivity Manager 1.0.0, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1
- 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
- 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
- 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
- NGINX App Delivery Manager 4.0.0

## Prerequisites

Expand All @@ -47,7 +45,7 @@ This repository has been tested with:
The install script can be used to build the Docker image using automated or manual install:

```
$ ./scripts/buildNIM.sh
$ ./scripts/buildNIM.sh
NGINX Management Suite Docker image builder

This tool builds a Docker image to run NGINX Management Suite
Expand Down Expand Up @@ -77,7 +75,6 @@ NGINX Management Suite Docker image builder
-A - Enable API Connectivity Manager - optional
-W - Enable Security Monitoring - optional
-P [version] - 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
-D - Enable App Delivery Manager - optional

=== Examples:

Expand All @@ -90,7 +87,7 @@ NGINX Management Suite Docker image builder

Automated build:
./scripts/buildNIM.sh -i -C nginx-repo.crt -K nginx-repo.key
-A -W -P v4.583.0 -D -t my.registry.tld/nginx-nms:2.14.1
-A -W -P v4.583.0 -t my.registry.tld/nginx-nms:latest
```

### Automated build
Expand All @@ -102,31 +99,25 @@ NGINX Management Suite Docker image builder
NGINX Instance Manager

```
./scripts/buildNIM.sh -t registry.ff.lan:31005/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key
./scripts/buildNIM.sh -t YOUR_DOCKER_REGISTRY/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key
```

NGINX Instance Manager and API Connectivity Manager

```
./scripts/buildNIM.sh -t registry.ff.lan:31005/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -A
./scripts/buildNIM.sh -t YOUR_DOCKER_REGISTRY/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -A
```

NGINX Instance Manager, Security Monitoring and WAF Policy Compiler

```
./scripts/buildNIM.sh -t registry.ff.lan:31005/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -W -P v4.2.0
./scripts/buildNIM.sh -t YOUR_DOCKER_REGISTRY/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -W -P v4.457.0
```

NGINX Instance Manager, API Connectivity Manager, WAF Policy Compiler and Security Monitoring

```
./scripts/buildNIM.sh -t registry.ff.lan:31005/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -A -W -P v4.2.0
```

NGINX Instance Manager, API Connectivity Manager, WAF Policy Compiler, Security Monitoring and App Delivery Manager

```
./scripts/buildNIM.sh -t registry.ff.lan:31005/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -A -W -P v4.2.0 -D
./scripts/buildNIM.sh -t YOUR_DOCKER_REGISTRY/nginx-nim2:automated -i -C certs/nginx-repo.crt -K certs/nginx-repo.key -A -W -P v4.457.0
```

### Manual build
Expand Down
8 changes: 0 additions & 8 deletions nginx-nms-docker/container/startNIM.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ then
su - nms -c 'function repeat { while [ 1 ] ; do "$@" ; sleep 1 ; done; };repeat /usr/bin/nms-acm server &' -s /bin/bash
fi

# Start App Delivery Manager
if [ -f /usr/bin/nms-adm ]
then
/bin/bash -c '`which mkdir` -p /var/run/nms/modules/adm'
/bin/bash -c '`which chown` -R nms:nms /var/run/nms/modules/adm'
su - nms -c 'function repeat { while [ 1 ] ; do "$@" ; sleep 1 ; done; };repeat /usr/bin/nms-adm server &' -s /bin/bash
fi

sleep 5

# Start Security Monitoring
Expand Down
12 changes: 4 additions & 8 deletions nginx-nms-docker/scripts/buildNIM.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Automated build:\n\n
-K [file.key]\t\t- Key file to pull packages from the official NGINX repository\n
-A\t\t\t- Enable API Connectivity Manager - optional\n
-W\t\t\t- Enable Security Monitoring - optional\n
-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] - optional\n
-D\t\t\t- Enable App Delivery Manager - optional\n\n
-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
=== Examples:\n\n
Manual build:\n
\t$0 -n nim-files/nms-instance-manager_2.6.0-698150575~focal_amd64.deb \\\\\n
Expand All @@ -30,13 +29,13 @@ Manual build:\n
\t\t-t my.registry.tld/nginx-nms:2.6.0\n\n
Automated build:\n
\t$0 -i -C nginx-repo.crt -K nginx-repo.key\n
\t\t-A -W -P v4.457.0 -D -t my.registry.tld/nginx-nms:2.13.1\n
\t\t-A -W -P v4.583.0 -t my.registry.tld/nginx-nms:latest\n
"

# Defaults
COUNTER=false

while getopts 'hn:a:w:p:t:siC:K:AWP:D' OPTION
while getopts 'hn:a:w:p:t:siC:K:AWP:' OPTION
do
case "$OPTION" in
h)
Expand Down Expand Up @@ -79,9 +78,6 @@ do
P)
ADD_PUM=$OPTARG
;;
D)
ADD_ADM=true
;;
esac
done

Expand Down Expand Up @@ -117,7 +113,7 @@ then
--build-arg ACM_IMAGE=$ACM_IMAGE --build-arg SM_IMAGE=$SM_IMAGE --build-arg PUM_IMAGE=$PUM_IMAGE -t $IMGNAME .
else
DOCKER_BUILDKIT=1 docker build --no-cache -f Dockerfile.automated --secret id=nginx-key,src=$NGINX_KEY --secret id=nginx-crt,src=$NGINX_CERT \
--build-arg ADD_ACM=$ADD_ACM --build-arg ADD_SM=$ADD_SM --build-arg ADD_PUM=$ADD_PUM --build-arg ADD_ADM=$ADD_ADM \
--build-arg ADD_ACM=$ADD_ACM --build-arg ADD_SM=$ADD_SM --build-arg ADD_PUM=$ADD_PUM \
--build-arg BUILD_WITH_SECONDSIGHT=$COUNTER \
-t $IMGNAME .
fi
Expand Down