Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This snippet is in use in the following locations:
-->
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:

* `Remote cluster alias`: When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI as **Remote cluster name**.
* `mode`: `proxy`
* `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.

Expand All @@ -16,17 +17,17 @@ To configure a self-managed cluster as a remote cluster, use the [cluster update

* `server_name`: Specify a value if the certificate presented by the remote cluster is signed for a different name than the proxy_address.

This is an example of the API call to `_cluster/settings`:
This is an example of the API call to add or update a remote cluster:

```json
PUT /_cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"alias-for-my-remote-cluster": {
"alias-for-my-remote-cluster": { // Align the alias with the remote cluster name used when adding the API key.
"mode":"proxy",
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9300",
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9400",
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
}
}
Expand All @@ -35,8 +36,4 @@ PUT /_cluster/settings
}
```

::::{note}
When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI.
::::

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).
For a full list of available client connection settings in proxy mode, refer to the [remote cluster settings reference](elasticsearch://reference/elasticsearch/configuration-reference/remote-clusters.md#remote-cluster-proxy-settings).
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
This snippet is in use in the following locations:
- ec-remote-cluster-same-ess.md
- ec-remote-cluster-other-ess.md
- ec-remote-cluster-ece.md
- ece-remote-cluster-same-ece.md
- ece-remote-cluster-other-ece.md
- ece-remote-cluster-ess.md

It requires remote_type substitution to be defined
-->
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:

* `Remote cluster alias`: When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI as **Remote cluster name**.
* `mode`: `proxy`
* `proxy_address`: This value can be found on the **Security** page of the {{remote_type}} you want to use as a remote. Copy the **Proxy address** from the **Remote cluster parameters** section.

Using the API, this value can be obtained from the {{es}} resource info, concatenating the field `metadata.endpoint` and port `9400` using a semicolon.

::::{note}
If you’re using API keys as security model, change the port to `9443`.
::::

* `server_name`: This value can be found on the **Security** page of the {{remote_type}} you want to use as a remote. Copy the **Server name** from the **Remote cluster parameters** section.

Using the API, this can be obtained from the {{es}} resource info field `metadata.endpoint`.

This example shows the API call to add or update a remote cluster. The alias `alias-for-my-remote-cluster` must match the remote cluster name used when adding the API key to the deployment:

```json
PUT /_cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"alias-for-my-remote-cluster": { // Remote cluster alias
"mode":"proxy",
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9400",
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
}
}
}
}
}
```

For a full list of available client connection settings in proxy mode, refer to the [remote cluster settings reference](elasticsearch://reference/elasticsearch/configuration-reference/remote-clusters.md#remote-cluster-proxy-settings).
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
This snippet is in use in the following locations:
- ec-remote-cluster-same-ess.md
- ec-remote-cluster-other-ess.md
- ec-remote-cluster-ece.md
- ece-remote-cluster-same-ece.md
- ece-remote-cluster-other-ece.md
- ece-remote-cluster-ess.md

It requires remote_type substitution to be defined
-->
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).
2. Select **Add a remote cluster**.
2. In **Select connection type**, choose the authentication mechanism you prepared earlier (**API keys** or **Certificates**), and then click **Next**.
3. In **Add connection information**, fill in the following fields:

* **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.

When using API key authentication, this alias must match the **Remote cluster name** you configured when adding the API key in the Cloud UI.

* **Remote address**: This value can be found on the **Security** page of the {{remote_type}} you want to use as a remote. Copy the **Proxy address** from the **Remote cluster parameters** section.

::::{note}
If you’re using API keys as security model, change the port to `9443`.
::::

* **Configure advanced options** (optional): Expand this section if you need to customize additional settings.
* **TLS server name**: Specify a value if the certificate presented by the remote cluster is signed for a different name than the remote address.

This value can be found on the **Security** page of the {{remote_type}} you want to use as a remote. Copy the **Server name** from the **Remote cluster parameters** section.

* **Socket connections**: Define the number of connections to open with the remote cluster.

For a full list of available client connection settings, refer to the [remote cluster settings reference](elasticsearch://reference/elasticsearch/configuration-reference/remote-clusters.md#remote-cluster-proxy-settings).

4. Click **Next**.
5. In **Confirm setup**, click **Add remote cluster** (you have already established trust in a previous step).
111 changes: 8 additions & 103 deletions deploy-manage/remote-clusters/ec-remote-cluster-ece.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ applies_to:
ece: ga
products:
- id: cloud-hosted
sub:
remote_type: Elastic Cloud Enterprise deployment
---

# Connect {{ech}} deployments to an {{ece}} environment [ec-remote-cluster-ece]
Expand Down Expand Up @@ -201,114 +203,17 @@ On the local cluster, add the remote cluster using {{kib}} or the {{es}} API.

### Using {{kib}} [ec_using_kibana_3]

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).
2. Select **Add a remote cluster**.
2. Enable **Manually enter proxy address and server name**.
3. Fill in the following fields:

* **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.

When using API key authentication, this alias must match the **Remote cluster name** you configured when adding the API key in the Cloud UI.
* **Proxy address**: This value can be found on the **Security** page of the {{ece}} deployment you want to use as a remote.<br>

::::{tip}
If you’re using API keys as security model, change the port into `9443`.
::::

* **Server name**: This value can be found on the **Security** page of the {{ece}} deployment you want to use as a remote.

:::{image} /deploy-manage/images/cloud-enterprise-ce-copy-remote-cluster-parameters.png
:alt: Remote Cluster Parameters in Deployment
:screenshot:
:::

::::{note}
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).
::::

4. Click **Next**.
5. Click **Add remote cluster** (you have already established trust in a previous step).


### Using the {{es}} API [ec_using_the_elasticsearch_api_3]

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:

* `mode`: `proxy`
* `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.

::::{tip}
If you’re using API keys as security model, change the port into `9443`.
::::


* `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`.

This is an example of the API call to `_cluster/settings`:

```json
PUT /_cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"alias-for-my-remote-cluster": {
"mode":"proxy",
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9400",
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
}
}
}
}
}
```

::::{note}
When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI.
::::

### Using the {{ecloud}} RESTful API [ec_using_the_elasticsearch_service_restful_api_3]
:::{include} _snippets/rcs-kibana-api-snippet.md
:::

::::{note}
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_3) should be used instead.
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).
::::

### Using the {{es}} API [ec_using_the_elasticsearch_api_3]

```sh
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 '
{
"resources" : [
{
"deployment_id": "$DEPLOYMENT_ID_REMOTE",
"elasticsearch_ref_id": "$REF_ID_REMOTE",
"alias": "alias-your-remote",
"skip_unavailable" : true
}
]
}'
```

`DEPLOYMENT_ID_REMOTE`
: The ID of your remote deployment, as shown in the Cloud UI or obtained through the API.

`REF_ID_REMOTE`
: The unique ID of the {{es}} resources inside your remote deployment (you can obtain these values through the API).

Note the following when using the {{ecloud}} RESTful API:

1. A cluster alias must contain only letters, numbers, dashes (-), or underscores (_).
2. To learn about skipping disconnected clusters, refer to the [{{es}} documentation](/solutions/search/cross-cluster-search.md#skip-unavailable-clusters).
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.

The following API request retrieves the remote clusters configuration:

```sh
curl -X GET -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters
```

::::{note}
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.
::::
:::{include} _snippets/rcs-elasticsearch-api-snippet.md
:::

## Configure roles and users [ec_configure_roles_and_users_3]

Expand Down
105 changes: 6 additions & 99 deletions deploy-manage/remote-clusters/ec-remote-cluster-other-ess.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ applies_to:
ess: ga
products:
- id: cloud-hosted
sub:
remote_type: Elastic Cloud Hosted deployment
---

# Connect to deployments in another {{ecloud}} organization [ec-remote-cluster-other-ess]
Expand Down Expand Up @@ -139,109 +141,14 @@ On the local cluster, add the remote cluster using {{kib}} or the {{es}} API.

### Using {{kib}} [ec_using_kibana_2]

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).
2. Select **Add a remote cluster**.
2. Enable **Manually enter proxy address and server name**.
3. Fill in the following fields:

* **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.

When using API key authentication, this alias must match the **Remote cluster name** you configured when adding the API key in the Cloud UI.
* **Proxy address**: This value can be found on the **Security** page of the {{ech}} deployment you want to use as a remote.<br>

::::{tip}
If you’re using API keys as security model, change the port into `9443`.
::::

* **Server name**: This value can be found on the **Security** page of the {{ech}} deployment you want to use as a remote.

::::{note}
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).
::::

4. Click **Next**.
5. Click **Add remote cluster** (you have already established trust in a previous step).
:::{include} _snippets/rcs-kibana-api-snippet.md
:::


### Using the {{es}} API [ec_using_the_elasticsearch_api_2]

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:

* `mode`: `proxy`
* `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.

::::{tip}
If you’re using API keys as security model, change the port into `9443`.
::::


* `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`.

This is an example of the API call to `_cluster/settings`:

```json
PUT /_cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"alias-for-my-remote-cluster": {
"mode":"proxy",
"proxy_address": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io:9400",
"server_name": "a542184a7a7d45b88b83f95392f450ab.192.168.44.10.ip.es.io"
}
}
}
}
}
```

::::{note}
When using API key authentication, the cluster alias must match the one you configured when adding the API key in the Cloud UI.
::::

### Using the {{ecloud}} RESTful API [ec_using_the_elasticsearch_service_restful_api_2]

::::{note}
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_2) should be used instead.
::::


```sh
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 '
{
"resources" : [
{
"deployment_id": "$DEPLOYMENT_ID_REMOTE",
"elasticsearch_ref_id": "$REF_ID_REMOTE",
"alias": "alias-your-remote",
"skip_unavailable" : true
}
]
}'
```

`DEPLOYMENT_ID_REMOTE`
: The ID of your remote deployment, as shown in the Cloud UI or obtained through the API.

`REF_ID_REMOTE`
: The unique ID of the {{es}} resources inside your remote deployment (you can obtain these values through the API).

Note the following when using the {{ecloud}} RESTful API:

1. A cluster alias must contain only letters, numbers, dashes (-), or underscores (_).
2. To learn about skipping disconnected clusters, refer to the [{{es}} documentation](/solutions/search/cross-cluster-search.md#skip-unavailable-clusters).
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.

The following API request retrieves the remote clusters configuration:

```sh
curl -X GET -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters
```

::::{note}
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.
::::
:::{include} _snippets/rcs-elasticsearch-api-snippet.md
:::

## Configure roles and users [ec_configure_roles_and_users_2]

Expand Down
Loading