{"id":19200430,"url":"https://github.com/fabriziofiorucci/nginx-plus-with-agent","last_synced_at":"2025-05-09T02:39:58.253Z","repository":{"id":37468405,"uuid":"478314629","full_name":"fabriziofiorucci/NGINX-Plus-with-Agent","owner":"fabriziofiorucci","description":"This repository builds a docker image with NGINX Plus and NGINX Instance Manager agent","archived":false,"fork":false,"pushed_at":"2024-04-11T16:47:33.000Z","size":42,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-11T19:29:54.065Z","etag":null,"topics":["kubernetes","nginx","nginx-instance-manager"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabriziofiorucci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-04-05T22:04:03.000Z","updated_at":"2023-12-28T09:17:27.000Z","dependencies_parsed_at":"2023-12-13T14:42:47.376Z","dependency_job_id":"da2e0f8b-e061-4b8e-987c-30ce96ebf888","html_url":"https://github.com/fabriziofiorucci/NGINX-Plus-with-Agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-Plus-with-Agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-Plus-with-Agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-Plus-with-Agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-Plus-with-Agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabriziofiorucci","download_url":"https://codeload.github.com/fabriziofiorucci/NGINX-Plus-with-Agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223828287,"owners_count":17209948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","nginx","nginx-instance-manager"],"created_at":"2024-11-09T12:32:55.769Z","updated_at":"2024-11-09T12:32:55.843Z","avatar_url":"https://github.com/fabriziofiorucci.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGINX Plus and NGINX Agent - Docker image builder\n\n## Description\n\nThis repository can be used to build a docker image with NGINX (Plus or Opensource) and NGINX Instance Manager Agent (https://docs.nginx.com/nginx-instance-manager/).\n\nIt is also available as part of [official NGINX Demos](https://github.com/nginxinc/NGINX-Demos/tree/master/nginx-agent-docker)\n\n## Tested releases\n\nThis repository has been tested with: NGINX agent for:\n\n- NGINX Plus R29+\n- NGINX Opensource 1.24.0+\n- NGINX Agent 2.14+\n- NGINX Instance Manager 2.15+\n- NGINX App Protect WAF 4.100.1+\n- NGINX One Cloud Console\n\n## Prerequisites\n\n- Linux host running Docker to build the image\n- NGINX Plus license\n- One of\n  - [NGINX Instance Manager](https://docs.nginx.com/nginx-instance-manager/)\n  - [NGINX One Cloud Console](https://docs.nginx.com/nginx-one/)\n- Openshift/Kubernetes cluster\n\n## Building the docker image\n\nThe install script can be used to build the Docker image:\n\n```\nNGINX Opensource/Plus \u0026 NGINX Agent Docker image builder\n\n This tool builds a Docker image to run NGINX Opensource/Plus and NGINX Agent\n\n === Usage:\n\n ./scripts/build.sh [options]\n\n === Options:\n\n -h                     - This help\n -t [target image]      - The Docker image to be created\n -C [file.crt]          - Certificate to pull packages from the official NGINX repository\n -K [file.key]          - Key to pull packages from the official NGINX repository\n -n [URL]               - NGINX Instance Manager / NGINX SaaS console URL to fetch the agent\n -w                     - Add NGINX App Protect WAF (requires NGINX Plus)\n -O                     - Use NGINX Opensource instead of NGINX Plus\n\n === Examples:\n\n NGINX Plus and NGINX Agent image:\n ./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\n\n NGINX Plus, NGINX App Protect WAF and NGINX Agent image:\n ./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\n\n NGINX Opensource and NGINX Agent image:\n ./scripts/build.sh -O -t registry.ff.lan:31005/nginx-oss-with-agent:latest -n https://nim.f5.ff.lan\n```\n\n1. Clone this repository\n2. For NGINX Plus only: get your license certificate and key to fetch NGINX Management Suite packages from NGINX repository\n3. [Install](https://docs.nginx.com/nginx-management-suite/) and start NGINX Management Suite / NGINX Instance Manager. Skip this step if using the NGINX SaaS console\n4. Build the Docker image using `./scripts/build.sh`\n\nthe build script will push the image to your private registry once build is complete.\n\n### Running the docker image on Kubernetes\n\n1. Edit `manifests/1.nginx-nim.yaml` and specify the correct image by modifying the `image:` line, and set the following environment variables. Default values for `NIM_HOST` and `NIM_GRPC_PORT` can be used if NGINX Instance Manager is deployed using https://github.com/nginxinc/NGINX-Demos/tree/master/nginx-nms-docker\n  - `NIM_HOST` - NGINX Instance Manager hostname/IP address\n  - `NIM_GRPC_PORT` - NGINX Instance Manager gRPC port\n  - `NIM_TOKEN` - NGINX One Cloud Console authentication token\n  - `NIM_INSTANCEGROUP` - instance group for the NGINX instance\n  - `NIM_TAGS` - comma separated list of tags for the NGINX instance\n  - `NIM_ADVANCED_METRICS` - set to `\"true\"` to enable advanced metrics collection - NGINX Plus only\n  - `NAP_WAF` - set to `\"true\"` to enable NGINX App Protect WAF (docker image built using `-w`) - NGINX Plus only\n  - `NAP_WAF_PRECOMPILED_POLICIES` - set to `\"true\"` to enable NGINX App Protect WAF precompiled policies (docker image built using `-w`) - NGINX Plus only\n  - `AGENT_LOGLEVEL` - NGINX Agent loglevel, optional. If not specified defaults to `info`\n\n2. Start and stop using\n\n```\n$ ./scripts/nginxWithAgentStart.sh start\n$ ./scripts/nginxWithAgentStart.sh stop\n```\n\n3. After startup NGINX instances will register to NGINX Instance Manager / NGINX SaaS console and will be displayed on the \"instances\" dashboard\n\n### Running the docker image on Docker\n\n1. Start using\n\n```\ndocker run --rm --name nginx -p [PORT_TO_EXPOSE] \\\n        -e \"NIM_HOST=\u003cNGINX_INSTANCE_MANAGER_FQDN_OR_IP\u003e\" \\\n        -e \"NIM_GRPC_PORT=\u003cGRPC_PORT\u003e\" \\\n        -e \"NIM_TOKEN=\u003cOPTIONAL_AUTHENTICATION_TOKEN\u003e\" \\\n        -e \"NIM_INSTANCEGROUP=\u003cOPTIONAL_INSTANCE_GROUP_NAME\u003e\" \\\n        -e \"NIM_TAGS=\u003cOPTIONAL_COMMA_DELIMITED_TAG_LIST\u003e\" \\\n        -e \"NIM_ADVANCED_METRICS=[true|false]\" \\\n        -e \"NAP_WAF=[true|false]\" \\\n        -e \"NAP_WAF_PRECOMPILED_POLICIES=[true|false]\" \\\n        -e \"AGENT_LOGLEVEL=[panic|fatal|error|info|debug|trace]\" \\\n        \u003cNGINX_DOCKER_IMAGE_NAME:TAG\u003e\n```\n\n2. After startup NGINX Plus instances will register to NGINX Instance Manager and will be displayed on the \"instances\" dashboard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabriziofiorucci%2Fnginx-plus-with-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabriziofiorucci%2Fnginx-plus-with-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabriziofiorucci%2Fnginx-plus-with-agent/lists"}