Skip to content

Commit c7633d5

Browse files
eedugonflorent-leborgneshainaraskas
authored andcommitted
ipv6 support for remote addresses added (elastic#3361)
This PR describes that the Stack 9.2 supports IPv6 addresses when configuring a remote cluster within Kibana. Extra improvements: - The ECE -> self-managed and ECH -> self-managed docs have been improved and converted to snippets. - Also the Kibana specific steps have been improved to match the reality. Closes elastic#3093 --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co> Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
1 parent 18ca993 commit c7633d5

File tree

6 files changed

+97
-215
lines changed

6 files changed

+97
-215
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
This snippet is in use in the following locations:
3+
- ece-remote-cluster-self-managed.md
4+
- ec-remote-cluster-self-managed.md
5+
-->
6+
To configure a self-managed cluster as a remote cluster, use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings). Configure the following fields:
7+
8+
* `mode`: `proxy`
9+
* `proxy_address`: Enter the endpoint of the remote self-managed cluster, including the hostname, FQDN, or IP address, and the port. Both IPv4 and IPv6 addresses are supported.
10+
11+
Make sure you use the correct port for your authentication method:
12+
* **API keys**: Use the port configured in the remote cluster interface of the remote cluster (defaults to `9443`).
13+
* **TLS Certificates**: Use the {{es}} transport port (defaults to `9300`).
14+
15+
When using an IPv6 address, enclose it in square brackets followed by the port number. For example: `[2001:db8::1]:9443`.
16+
17+
* `server_name`: Specify a value if the certificate presented by the remote cluster is signed for a different name than the proxy_address.
18+
19+
This is an example of the API call to `_cluster/settings`:
20+
21+
```json
22+
PUT /_cluster/settings
23+
{
24+
"persistent": {
25+
"cluster": {
26+
"remote": {
27+
"alias-for-my-remote-cluster": {
28+
"mode":"proxy",
29+
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9300",
30+
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
31+
}
32+
}
33+
}
34+
}
35+
}
36+
```
37+
38+
::::{note}
39+
When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI.
40+
::::
41+
42+
For a full list of available client connection settings in proxy mode, refer to [remote cluster settings reference](elasticsearch://reference/elasticsearch/configuration-reference/remote-clusters.md#remote-cluster-proxy-settings).
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!--
2+
This snippet is in use in the following locations:
3+
- ece-remote-cluster-self-managed.md
4+
- ec-remote-cluster-self-managed.md
5+
-->
6+
1. Go to the **Remote Clusters** management page in the navigation menu or use the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md).
7+
2. Select **Add a remote cluster**.
8+
2. In **Select connection type**, choose the authentication mechanism you prepared earlier (**API keys** or **Certificates**), and click **Next**.
9+
10+
3. In **Add connection information**, fill in the following fields:
11+
12+
* **Remote cluster name**: This *cluster alias* is a unique identifier that represents the connection to the remote cluster and is used to distinguish local and remote indices.
13+
14+
When using API key authentication, this alias must match the **Remote cluster name** you configured when adding the API key in the Cloud UI.
15+
* **Remote address**: Enter the endpoint of the remote self-managed cluster, including the hostname, FQDN, or IP address, and the port.
16+
17+
Make sure you use the correct port for your authentication method:
18+
* **API keys**: Use the port configured in the remote cluster interface of the remote cluster (defaults to `9443`).
19+
* **TLS Certificates**: Use the {{es}} transport port (defaults to `9300`).
20+
21+
Starting with {{kib}} 9.2, this field also supports IPv6 addresses. When using an IPv6 address, enclose it in square brackets followed by the port number. For example: `[2001:db8::1]:9443`.
22+
23+
* **Configure advanced options** (optional): Expand this section if you need to customize additional settings.
24+
* **TLS server name**: Specify a value if the certificate presented by the remote cluster is signed for a different name than the remote address.
25+
* **Socket connections**: Define the number of connections to open with the remote cluster.
26+
27+
4. Click **Next**.
28+
5. In **Confirm setup**, click **Add remote cluster** (you have already established trust in a previous step).

deploy-manage/remote-clusters/ec-remote-cluster-self-managed.md

Lines changed: 4 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -221,109 +221,13 @@ On the local cluster, add the remote cluster using {{kib}} or the {{es}} API.
221221

222222
### Using {{kib}} [ec_using_kibana_4]
223223

224-
1. Go to the **Remote Clusters** management page in the navigation menu or use the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md).
225-
2. Select **Add a remote cluster**.
226-
2. Enable **Manually enter proxy address and server name**.
227-
3. Fill in the following fields:
228-
229-
* **Name**: This *cluster alias* is a unique identifier that represents the connection to the remote cluster and is used to distinguish local and remote indices.
230-
231-
When using API key authentication, this alias must match the **Remote cluster name** you configured when adding the API key in the Cloud UI.
232-
* **Proxy address**: This value can be found on the **Security** page of the {{ech}} deployment you want to use as a remote.<br>
233-
234-
::::{tip}
235-
If you’re using API keys as security model, change the port to `9443`.
236-
::::
237-
238-
* **Server name**: This value can be found on the **Security** page of the {{ech}} deployment you want to use as a remote.
239-
240-
::::{note}
241-
If you’re having issues establishing the connection and the remote cluster is part of an {{ece}} environment with a private certificate, make sure that the proxy address and server name match with the the certificate information. For more information, refer to [Administering endpoints in {{ece}}](/deploy-manage/deploy/cloud-enterprise/change-endpoint-urls.md).
242-
::::
243-
244-
4. Click **Next**.
245-
5. Click **Add remote cluster** (you have already established trust in a previous step).
246-
224+
:::{include} _snippets/rcs-kibana-api-snippet-self.md
225+
:::
247226

248227
### Using the {{es}} API [ec_using_the_elasticsearch_api_4]
249228

250-
To configure a deployment as a remote cluster, use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings). Configure the following fields:
251-
252-
* `mode`: `proxy`
253-
* `proxy_address`: This value can be found on the **Security** page of the {{ech}} deployment you want to use as a remote. Also, using the API, this value can be obtained from the {{es}} resource info, concatenating the field `metadata.endpoint` and port `9400` using a semicolon.
254-
255-
::::{tip}
256-
If you’re using API keys as security model, change the port into `9443`.
257-
::::
258-
259-
260-
* `server_name`: This value can be found on the **Security** page of the {{ech}} deployment you want to use as a remote. Also, using the API, this can be obtained from the {{es}} resource info field `metadata.endpoint`.
261-
262-
This is an example of the API call to `_cluster/settings`:
263-
264-
```json
265-
PUT /_cluster/settings
266-
{
267-
"persistent": {
268-
"cluster": {
269-
"remote": {
270-
"alias-for-my-remote-cluster": {
271-
"mode":"proxy",
272-
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9400",
273-
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
274-
}
275-
}
276-
}
277-
}
278-
}
279-
```
280-
281-
::::{note}
282-
When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI.
283-
::::
284-
285-
### Using the {{ecloud}} RESTful API [ec_using_the_elasticsearch_service_restful_api_4]
286-
287-
::::{note}
288-
This section only applies if you’re using TLS certificates as cross-cluster security model and when both clusters belong to the same organization. For other scenarios, the [{{es}} API](#ec_using_the_elasticsearch_api_4) should be used instead.
289-
::::
290-
291-
292-
```sh
293-
curl -H 'Content-Type: application/json' -X PUT -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters -d '
294-
{
295-
"resources" : [
296-
{
297-
"deployment_id": "$DEPLOYMENT_ID_REMOTE",
298-
"elasticsearch_ref_id": "$REF_ID_REMOTE",
299-
"alias": "alias-your-remote",
300-
"skip_unavailable" : true
301-
}
302-
]
303-
}'
304-
```
305-
306-
`DEPLOYMENT_ID_REMOTE`
307-
: The ID of your remote deployment, as shown in the Cloud UI or obtained through the API.
308-
309-
`REF_ID_REMOTE`
310-
: The unique ID of the {{es}} resources inside your remote deployment (you can obtain these values through the API).
311-
312-
Note the following when using the {{ecloud}} RESTful API:
313-
314-
1. A cluster alias must contain only letters, numbers, dashes (-), or underscores (_).
315-
2. To learn about skipping disconnected clusters, refer to the [{{es}} documentation](/solutions/search/cross-cluster-search.md#skip-unavailable-clusters).
316-
3. When remote clusters are already configured for a deployment, the `PUT` request replaces the existing configuration with the new configuration passed. Passing an empty array of resources will remove all remote clusters.
317-
318-
The following API request retrieves the remote clusters configuration:
319-
320-
```sh
321-
curl -X GET -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters
322-
```
323-
324-
::::{note}
325-
The response will include just the remote clusters from the same {{ecloud}} organization. In order to obtain the whole list of remote clusters, use {{kib}} or the [{{es}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info) directly.
326-
::::
229+
:::{include} _snippets/rcs-elasticsearch-api-snippet-self.md
230+
:::
327231

328232
## Configure roles and users [ec_configure_roles_and_users_4]
329233

deploy-manage/remote-clusters/ece-remote-cluster-self-managed.md

Lines changed: 7 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -217,122 +217,20 @@ You can now connect remotely to the trusted clusters.
217217

218218
On the local cluster, add the remote cluster using {{kib}} or the {{es}} API.
219219

220-
221-
### Using {{kib}} [ece_using_kibana_4]
222-
223-
1. Go to the **Remote Clusters** management page in the navigation menu or use the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md).
224-
2. Select **Add a remote cluster**.
225-
2. Enable **Manually enter proxy address and server name**.
226-
3. Fill in the following fields:
227-
228-
* **Name**: This *cluster alias* is a unique identifier that represents the connection to the remote cluster and is used to distinguish local and remote indices.
229-
230-
When using API key authentication, this alias must match the **Remote cluster name** you configured when adding the API key in the Cloud UI.
231-
* **Proxy address**: This value can be found on the **Security** page of the {{ece}} deployment you want to use as a remote.<br>
232-
233-
::::{tip}
234-
If you’re using API keys as security model, change the port into `9443`.
235-
::::
236-
237-
* **Server name**: This value can be found on the **Security** page of the {{ece}} deployment you want to use as a remote.
238-
239-
:::{image} /deploy-manage/images/cloud-enterprise-ce-copy-remote-cluster-parameters.png
240-
:alt: Remote Cluster Parameters in Deployment
241-
:screenshot:
242-
:::
243-
244-
::::{note}
245-
If you’re having issues establishing the connection and the remote cluster is part of an {{ece}} environment with a private certificate, make sure that the proxy address and server name match with the the certificate information. For more information, refer to [Administering endpoints in {{ece}}](/deploy-manage/deploy/cloud-enterprise/change-endpoint-urls.md).
246-
::::
247-
248-
4. Click **Next**.
249-
5. Click **Add remote cluster** (you have already established trust in a previous step).
250-
220+
% ECE locals only
251221
::::{note}
252-
This configuration of remote clusters uses the [Proxy mode](/deploy-manage/remote-clusters/remote-clusters-self-managed.md#proxy-mode) and it requires that the allocators can communicate via http with the proxies.
222+
This configuration of remote clusters uses the [Proxy mode](/deploy-manage/remote-clusters/remote-clusters-self-managed.md#proxy-mode) and requires the ECE allocators to be able to connect to the remote address endpoint.
253223
::::
254224

225+
### Using {{kib}} [ece_using_kibana_4]
255226

227+
:::{include} _snippets/rcs-kibana-api-snippet-self.md
228+
:::
256229

257230
### Using the {{es}} API [ece_using_the_elasticsearch_api_4]
258231

259-
To configure a deployment as a remote cluster, use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings). Configure the following fields:
260-
261-
* `mode`: `proxy`
262-
* `proxy_address`: This value can be found on the **Security** page of the {{ece}} deployment you want to use as a remote. Also, using the API, this value can be obtained from the {{es}} resource info, concatenating the field `metadata.endpoint` and port `9300` using a semicolon.
263-
264-
::::{tip}
265-
If you’re using API keys as security model, change the port into `9443`.
266-
::::
267-
268-
269-
* `server_name`: This value can be found on the **Security** page of the {{ece}} deployment you want to use as a remote. Also, using the API, this can be obtained from the {{es}} resource info field `metadata.endpoint`.
270-
271-
This is an example of the API call to `_cluster/settings`:
272-
273-
```json
274-
PUT /_cluster/settings
275-
{
276-
"persistent": {
277-
"cluster": {
278-
"remote": {
279-
"alias-for-my-remote-cluster": {
280-
"mode":"proxy",
281-
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9300",
282-
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
283-
}
284-
}
285-
}
286-
}
287-
}
288-
```
289-
290-
::::{note}
291-
When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI.
292-
::::
293-
294-
### Using the {{ece}} RESTful API [ece_using_the_elastic_cloud_enterprise_restful_api_4]
295-
296-
::::{note}
297-
This section only applies if you’re using TLS certificates as cross-cluster security model and when both clusters belong to the same ECE environment. For other scenarios, the [{{es}} API](#ece_using_the_elasticsearch_api_4) should be used instead.
298-
::::
299-
300-
301-
```sh
302-
curl -k -H 'Content-Type: application/json' -X PUT -H "Authorization: ApiKey $ECE_API_KEY" https://$COORDINATOR_HOST:12443/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters -d '
303-
{
304-
"resources" : [
305-
{
306-
"deployment_id": "$DEPLOYMENT_ID_REMOTE",
307-
"elasticsearch_ref_id": "$REF_ID_REMOTE",
308-
"alias": "alias-your-remote",
309-
"skip_unavailable" : true
310-
}
311-
]
312-
}'
313-
```
314-
315-
`DEPLOYMENT_ID_REMOTE`
316-
: The ID of your remote deployment, as shown in the Cloud UI or obtained through the API.
317-
318-
`REF_ID_REMOTE`
319-
: The unique ID of the {{es}} resources inside your remote deployment (you can obtain these values through the API).
320-
321-
Note the following when using the {{ece}} RESTful API:
322-
323-
1. A cluster alias must contain only letters, numbers, dashes (-), or underscores (_).
324-
2. To learn about skipping disconnected clusters, refer to the [{{es}} documentation](/solutions/search/cross-cluster-search.md#skip-unavailable-clusters).
325-
3. When remote clusters are already configured for a deployment, the `PUT` request replaces the existing configuration with the new configuration passed. Passing an empty array of resources will remove all remote clusters.
326-
327-
The following API request retrieves the remote clusters configuration:
328-
329-
```sh
330-
curl -k -X GET -H "Authorization: ApiKey $ECE_API_KEY" https://$COORDINATOR_HOST:12443/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters
331-
```
332-
333-
::::{note}
334-
The response includes just the remote clusters from the same ECE environment. In order to obtain the whole list of remote clusters, use {{kib}} or the [{{es}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info) directly.
335-
::::
232+
:::{include} _snippets/rcs-elasticsearch-api-snippet-self.md
233+
:::
336234

337235
## Configure roles and users [ece_configure_roles_and_users_4]
338236

deploy-manage/remote-clusters/remote-clusters-api-key.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,28 @@ If a remote cluster is part of an {{ech}} (ECH) deployment, the remote cluster s
148148
You must have the `manage` cluster privilege to connect remote clusters.
149149
::::
150150
151-
152151
The local cluster uses the [remote cluster interface](elasticsearch://reference/elasticsearch/configuration-reference/networking-settings.md) to establish communication with remote clusters. The coordinating nodes in the local cluster establish [long-lived](elasticsearch://reference/elasticsearch/configuration-reference/networking-settings.md#long-lived-connections) TCP connections with specific nodes in the remote cluster. {{es}} requires these connections to remain open, even if the connections are idle for an extended period.
153152
154-
To add a remote cluster in {{kib}}:
153+
### Using {{kib}}
154+
155+
To add a remote cluster from Stack Management in {{kib}}:
155156
156157
1. Go to the **Remote Clusters** management page in the navigation menu or use the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md).
157158
2. Select **Add a remote cluster**.
158159
3. Select **API keys** as the connection type.
159160
4. Enter a name (*cluster alias*) for the remote cluster.
160161
5. Specify the {{es}} endpoint URL, or the IP address or host name of the remote cluster followed by the remote cluster port (defaults to `9443`). For example, `cluster.es.eastus2.staging.azure.foundit.no:9443` or `192.168.1.1:9443`.
161162
163+
Starting with {{kib}} 9.2, you can also specify IPv6 addresses.
164+
165+
### Using the {{es}} API
166+
167+
Alternatively, use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) to add a remote cluster. You can also use this API to dynamically configure remote clusters for *every* node in the local cluster. To configure remote clusters on individual nodes in the local cluster, define static settings in [`elasticsearch.yml`](/deploy-manage/stack-settings.md) for each node.
168+
162169
::::{note}
163170
If the remote cluster is part of an {{ech}}, {{ece}}, or {{eck}} deployment, configure the connection to use `proxy`. The default `sniff` mode doesn't work in these environments. Refer to the [connection modes](/deploy-manage/remote-clusters/remote-clusters-self-managed.md#sniff-proxy-modes) description for more information.
164171
::::
165172

166-
Alternatively, use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) to add a remote cluster. You can also use this API to dynamically configure remote clusters for *every* node in the local cluster. To configure remote clusters on individual nodes in the local cluster, define static settings in [`elasticsearch.yml`](/deploy-manage/stack-settings.md) for each node.
167-
168173
The following request adds a remote cluster with an alias of `cluster_one`. This *cluster alias* is a unique identifier that represents the connection to the remote cluster and is used to distinguish between local and remote indices.
169174

170175
```console

0 commit comments

Comments
 (0)