|
| 1 | +--- |
| 2 | +description: '' |
| 3 | +docs: null |
| 4 | +title: Connect NGINX Plus container images to NGINX One |
| 5 | +toc: true |
| 6 | +weight: 400 |
| 7 | +type: |
| 8 | +- how-to |
| 9 | +--- |
| 10 | + |
| 11 | +## Overview |
| 12 | + |
| 13 | +This guide explains how to set up an F5 NGINX Plus Docker container with NGINX Agent and connect it to the NGINX One Console. |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## Before you start |
| 18 | + |
| 19 | +Before you start, make sure you have: |
| 20 | + |
| 21 | +- A valid JSON Web Token (JWT) for your NGINX subscription. |
| 22 | +- [A data plane key from NGINX One]({{< ref "/nginx-one/connect-instances/data-plane-keys/create-manage-data-plane-keys.md" >}}). |
| 23 | +- Docker installed and running on your system. |
| 24 | + |
| 25 | +#### Download your JWT license from MyF5 |
| 26 | + |
| 27 | +{{< include "licensing-and-reporting/download-jwt-from-myf5.md" >}} |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## Process for private registry |
| 32 | + |
| 33 | +### Log in to the NGINX private registry |
| 34 | + |
| 35 | +Use your JWT to log in to the NGINX private registry. Replace `YOUR_JWT_HERE` with your JWT. |
| 36 | + |
| 37 | +```sh |
| 38 | +sudo docker login private-registry.nginx.com --username=YOUR_JWT_HERE --password=none |
| 39 | +``` |
| 40 | + |
| 41 | +{{< include "security/jwt-password-note.md" >}} |
| 42 | + |
| 43 | +### Pull the NGINX Plus image |
| 44 | + |
| 45 | +Pull the NGINX Plus image from the private registry. Replace `VERSION_TAG` with the desired version, such as `alpine`, `debian`, or `ubi`. |
| 46 | + |
| 47 | +```sh |
| 48 | +sudo docker pull private-registry.nginx.com/nginx-plus/agent:VERSION_TAG |
| 49 | +``` |
| 50 | + |
| 51 | +You must specify a version tag. The `latest` tag is not supported. Learn more in the [Deploying NGINX and NGINX Plus on Docker]({{< ref "/nginx/admin-guide/installing-nginx/installing-nginx-docker.md#pulling-the-image" >}}) guide. |
| 52 | + |
| 53 | +<br> |
| 54 | + |
| 55 | +{{<call-out "" "Example:" "" >}} |
| 56 | +To pull the `debian` image: |
| 57 | + |
| 58 | +```sh |
| 59 | +sudo docker pull private-registry.nginx.com/nginx-plus/agent:debian |
| 60 | +``` |
| 61 | +{{</call-out>}} |
| 62 | + |
| 63 | +### Start the NGINX Plus container |
| 64 | + |
| 65 | +Start the Docker container to connect it to NGINX One. Replace `YOUR_NGINX_ONE_DATA_PLANE_KEY_HERE` with your data plane key and `VERSION_TAG` with the version tag you pulled. |
| 66 | + |
| 67 | +**For NGINX Plus R33 or later**: |
| 68 | + |
| 69 | +- Use the `NGINX_LICENSE_JWT` variable to pass your JWT license. Replace `YOUR_JWT_HERE` with your JWT. |
| 70 | + |
| 71 | +For more details, see [About subscription licenses]({{< ref "solutions/about-subscription-licenses.md" >}}). |
| 72 | + |
| 73 | +```sh |
| 74 | +sudo docker run \ |
| 75 | +--env=NGINX_LICENSE_JWT="YOUR_JWT_HERE" \ |
| 76 | +--env=NGINX_AGENT_SERVER_GRPCPORT=443 \ |
| 77 | +--env=NGINX_AGENT_SERVER_HOST=agent.connect.nginx.com \ |
| 78 | +--env=NGINX_AGENT_SERVER_TOKEN="YOUR_NGINX_ONE_DATA_PLANE_KEY_HERE" \ |
| 79 | +--env=NGINX_AGENT_TLS_ENABLE=true \ |
| 80 | +--restart=always \ |
| 81 | +--runtime=runc \ |
| 82 | +-d private-registry.nginx.com/nginx-plus/agent:<VERSION_TAG> |
| 83 | +``` |
| 84 | + |
| 85 | +<br> |
| 86 | + |
| 87 | +{{<call-out "" "Example:" "" >}} |
| 88 | +To start the container with the `debian` image: |
| 89 | + |
| 90 | +```sh |
| 91 | +sudo docker run \ |
| 92 | +--env=NGINX_LICENSE_JWT="YOUR_JWT_HERE" \ |
| 93 | +--env=NGINX_AGENT_SERVER_GRPCPORT=443 \ |
| 94 | +--env=NGINX_AGENT_SERVER_HOST=agent.connect.nginx.com \ |
| 95 | +--env=NGINX_AGENT_SERVER_TOKEN="YOUR_NGINX_ONE_DATA_PLANE_KEY_HERE" \ |
| 96 | +--env=NGINX_AGENT_TLS_ENABLE=true \ |
| 97 | +--restart=always \ |
| 98 | +--runtime=runc \ |
| 99 | +-d private-registry.nginx.com/nginx-plus/agent:debian |
| 100 | +``` |
| 101 | + |
| 102 | +{{</call-out>}} |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## References |
| 107 | + |
| 108 | +For more details, see: |
| 109 | + |
| 110 | +- [Deploying NGINX and NGINX Plus on Docker](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker/) |
| 111 | +- [Full List of Agent Environment Variables](https://docs.nginx.com/nginx-agent/configuration/configuration-overview/#nginx-agent-environment-variables) |
| 112 | +- [NGINX One Data Plane Keys](https://docs.nginx.com/nginx-one/how-to/data-plane-keys/create-manage-data-plane-keys/) |
| 113 | +- [My F5 Knowledge Article](https://my.f5.com/manage/s/article/K000090257) |
0 commit comments