You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/nginx-one/nginx-configs/config-sync-groups/manage-config-sync-groups.md
+80-1Lines changed: 80 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ When you plan Config Sync Groups, consider the following factors:
81
81
82
82
-**Single Config Sync Group membership**: You can add an instance to only one Config Sync Group.
83
83
84
-
-**NGINX Agent configuration file location**: When you run the NGINX Agent installation script to register an instance with NGINX One, the script creates the `agent-dynamic.conf` file, which contains settings for the NGINX Agent, including the specified Config Sync Group. This file is typically located in `/var/lib/nginx-agent/` on most systems; however, on FreeBSD, it's located at `/var/db/nginx-agent/`.
84
+
-**NGINX Agent configuration file location**: When you run the NGINX Agent installation script to register an instance with NGINX One, the script creates the `nginx-agent.conf` (or `agent-dynamic.conf`if you are using NGINX Agent 2.x) file, which contains settings for the NGINX Agent, including the specified Config Sync Group. This file is typically located in `/etc/nginx-agent/` on most systems.
85
85
86
86
-**Mixing NGINX Open Source and NGINX Plus instances**: You can add both NGINX Open Source and NGINX Plus instances to the same Config Sync Group, but there are limitations. If your configuration includes features exclusive to NGINX Plus, synchronization will fail on NGINX Open Source instances because they don't support these features. NGINX One allows you to mix NGINX instance types for flexibility, but it’s important to ensure that the configurations you're applying are compatible with all instances in the group.
87
87
@@ -104,6 +104,28 @@ Any instance that joins the group afterwards inherits that configuration.
104
104
105
105
You can add existing NGINX instances that are already registered with NGINX One to a Config Sync Group.
106
106
107
+
{{< tabs name="Add existing instance to Config Sync Group" >}}
108
+
109
+
{{%tab name="NGINX Agent 3.x"%}}
110
+
111
+
1. Open a command-line terminal on the NGINX instance.
112
+
2. Open the `/etc/nginx-agent/nginx-agent.conf` file in a text editor.
113
+
3. Find or create the `labels` section and change the `config_sync_group` label to the name of the new Config Sync Group.
114
+
115
+
```text
116
+
labels:
117
+
config_sync_group: <config_sync_group>
118
+
```
119
+
120
+
4. Restart NGINX Agent:
121
+
122
+
```shell
123
+
sudo systemctl restart nginx-agent
124
+
```
125
+
126
+
{{%/tab%}}
127
+
{{%tab name="NGINX Agent 2.x"%}}
128
+
107
129
1. Open a command-line terminal on the NGINX instance.
108
130
2. Open the `/var/lib/nginx-agent/agent-dynamic.conf` file in a text editor.
109
131
3. At the end of the file, add a new line beginning with `instance_group:`, followed by the Config Sync Group name.
@@ -118,6 +140,9 @@ You can add existing NGINX instances that are already registered with NGINX One
118
140
sudo systemctl restart nginx-agent
119
141
```
120
142
143
+
{{%/tab%}}
144
+
{{< /tabs >}}
145
+
121
146
### Add a new instance to a Config Sync Group {#add-a-new-instance-to-a-config-sync-group}
122
147
123
148
When adding a new NGINX instance that is not yet registered with NGINX One, you need a data plane key to securely connect the instance. You can generate a new data plane key during the process or use an existing one if you already have it.
@@ -185,6 +210,29 @@ For more details on creating and managing data plane keys, see [Create and manag
185
210
186
211
If you need to move an NGINX instance to a different Config Sync Group, follow these steps:
187
212
213
+
{{< tabs name="Move instance to Config Sync Group" >}}
214
+
215
+
{{%tab name="NGINX Agent 3.x"%}}
216
+
217
+
1. Open a command-line terminal on the NGINX instance.
218
+
2. Open the `/etc/nginx-agent/nginx-agent.conf` file in a text editor.
219
+
3. Find the `labels` section and change the `config_sync_group` label to the name of the new Config Sync Group.
220
+
221
+
```text
222
+
labels:
223
+
config-sync-group: <new_config_sync_group>
224
+
```
225
+
226
+
4. Restart NGINX Agent by running the following command:
227
+
228
+
```shell
229
+
sudo systemctl restart nginx-agent
230
+
```
231
+
232
+
{{%/tab%}}
233
+
{{%tab name="NGINX Agent 2.x"%}}
234
+
235
+
188
236
1. Open a command-line terminal on the NGINX instance.
189
237
2. Open the `/var/lib/nginx-agent/agent-dynamic.conf` file in a text editor.
190
238
3. Locate the line that begins with `instance_group:` and change it to the name of the new Config Sync Group.
@@ -199,12 +247,39 @@ If you need to move an NGINX instance to a different Config Sync Group, follow t
199
247
sudo systemctl restart nginx-agent
200
248
```
201
249
250
+
{{%/tab%}}
251
+
{{< /tabs >}}
252
+
253
+
202
254
If you move an instance with certificates from one Config Sync Group to another, NGINX One adds or removes those certificates from the data plane, to synchronize with the deployed certificates of the group.
203
255
204
256
### Remove an instance from a Config Sync Group
205
257
206
258
If you need to remove an NGINX instance from a Config Sync Group without adding it to another group, follow these steps:
207
259
260
+
261
+
{{< tabs name="Remove instance from Config Sync Group" >}}
262
+
263
+
{{%tab name="NGINX Agent 3.x"%}}
264
+
265
+
1. Open a command-line terminal on the NGINX instance.
266
+
2. Open the `/etc/nginx-agent/nginx-agent.conf` file in a text editor.
267
+
3. Locate the line that begins with `labels:` section and either remove the `config-sync-group` line or comment it out by adding a `#` at the beginning of the line.
268
+
269
+
```text
270
+
labels:
271
+
# config-sync-group: <new_config_sync_group>
272
+
```
273
+
274
+
4. Restart NGINX Agent:
275
+
276
+
```shell
277
+
sudo systemctl restart nginx-agent
278
+
```
279
+
280
+
{{%/tab%}}
281
+
{{%tab name="NGINX Agent 2.x"%}}
282
+
208
283
1. Open a command-line terminal on the NGINX instance.
209
284
2. Open the `/var/lib/nginx-agent/agent-dynamic.conf` file in a text editor.
210
285
3. Locate the line that begins with `instance_group:` and either remove it or comment it out by adding a `#` at the beginning of the line.
@@ -219,6 +294,10 @@ If you need to remove an NGINX instance from a Config Sync Group without adding
219
294
sudo systemctl restart nginx-agent
220
295
```
221
296
297
+
{{%/tab%}}
298
+
{{< /tabs >}}
299
+
300
+
222
301
By removing or commenting out this line, the instance will no longer be associated with any Config Sync Group.
223
302
224
303
## Publish the Config Sync Group configuration {#publish-the-config-sync-group-configuration}
0 commit comments