Create and manage instance groups
You can easily manage multiple NGINX instances as a single entity by creating an instance group in Instance Manager and adding NGINX instances to it.
To complete the instructions in this guide, you need the following:
- An installed version of Instance Manager
- One or more NGINX data plane instances
To create an instance group:
-
In a web browser, go to the FQDN for your NGINX Instance Manager host and log in. Then, select Instance Manager from the Launchpad menu.
-
On the left navigation menu, select Instance Groups.
-
Select Create.
-
On the Create Instance Group form, complete the necessary fields:
- Name: add a name for the instance group.
- Display Name: add a friendly name to show for the instance group.
- (Optional) Description: add a brief description for the instance group.
-
Select Save.
When an Instance Group is initially created via the UI/API, its NGINX config will be empty. Adding an Instance to the Instance Group will populated the Instance Group NGINX nginx with the first member’s NGINX config.
You can assign NGINX instances to instance groups in the following ways:
- (Preferred) Edit the
agent-dynamic.conf
file on an NGINX instance and specify the instance group. - Alternatively, when installing the NGINX Agent, you can specify the instance group as a command-line option.
You can easily add instances to a default instance group that you specify. To do so, install the NGINX Agent on an instance, then edit the /var/lib/nginx-agent/agent-dynamic.conf
file as described below.
If you’re running Instance Manager 2.10.1 or earlier or NGINX Agent 2.25.1 or earlier, theagent-dynamic.conf
file is located in/etc/nginx-agent/
.
If the specified instance group doesn’t already exist, the NGINX Agent installer will create it, using the current instance’s config file as the group’s config file. This means that all instances added to the group later will use this config as well. If you’re using a script to add instances, you should consider carefully which instance to run the script on first.