mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
[DOCS] Update remote cluster docs (#77043)
* [DOCS] Update remote cluster docs * Add files, rename files, write new stuff * Plethora of changes * Add test and update snippets * Redirects, moved files, and test updates * Moved file to x-pack for tests * Remove older CCS page and add redirects * Cleanup, link updates, and some rewrites * Update image * Incorporating user feedback and rewriting much of the remote clusters page * More changes from review feedback * Numerous updates, including request examples for CCS and Kibana * More changes from review feedback * Minor clarifications on security for remote clusters * Incorporate review feedback Co-authored-by: Yang Wang <ywangd@gmail.com> * Some review feedback and some editorial changes Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Yang Wang <ywangd@gmail.com>
This commit is contained in:
parent
15baf4017a
commit
6940673e8a
34 changed files with 830 additions and 628 deletions
|
@ -73,7 +73,7 @@ the new patterns.
|
|||
==== {api-request-body-title}
|
||||
|
||||
`remote_cluster`::
|
||||
(Required, string) The <<modules-remote-clusters,remote cluster>> containing
|
||||
(Required, string) The <<remote-clusters,remote cluster>> containing
|
||||
the leader indices to match against.
|
||||
|
||||
`leader_index_patterns`::
|
||||
|
|
|
@ -122,7 +122,7 @@ to read from the leader again.
|
|||
//End parameters
|
||||
|
||||
`remote_cluster`::
|
||||
(string) The <<modules-remote-clusters,remote cluster>> that contains the
|
||||
(string) The <<remote-clusters,remote cluster>> that contains the
|
||||
leader index.
|
||||
|
||||
`status`::
|
||||
|
|
|
@ -162,7 +162,7 @@ task.
|
|||
//End read_exceptions
|
||||
|
||||
`remote_cluster`::
|
||||
(string) The <<modules-remote-clusters,remote cluster>> containing the leader
|
||||
(string) The <<remote-clusters,remote cluster>> containing the leader
|
||||
index.
|
||||
|
||||
`shard_id`::
|
||||
|
|
|
@ -115,7 +115,7 @@ the <<ccr-post-unfollow,unfollow API>> is invoked.
|
|||
|
||||
`leader_remote_cluster`::
|
||||
(Required, string) The alias (from the perspective of the cluster containing
|
||||
the follower index) of the <<modules-remote-clusters,remote cluster>>
|
||||
the follower index) of the <<remote-clusters,remote cluster>>
|
||||
containing the leader index.
|
||||
|
||||
[[ccr-post-forget-follower-examples]]
|
||||
|
|
|
@ -74,7 +74,7 @@ referenced leader index. When this API returns, the follower index exists, and
|
|||
(Required, string) The name of the index in the leader cluster to follow.
|
||||
|
||||
`remote_cluster`::
|
||||
(Required, string) The <<modules-remote-clusters,remote cluster>> containing
|
||||
(Required, string) The <<remote-clusters,remote cluster>> containing
|
||||
the leader index.
|
||||
|
||||
include::../follow-request-body.asciidoc[]
|
||||
|
|
|
@ -29,9 +29,9 @@ Auto-follow patterns are especially useful with
|
|||
new indices on the cluster containing the leader index.
|
||||
|
||||
[[ccr-access-ccr-auto-follow]]
|
||||
To start using {ccr} auto-follow patterns, access {kib} and go to
|
||||
*Management > Stack Management*. In the side navigation, select
|
||||
*Cross-Cluster Replication* and choose the *Auto-follow patterns* tab
|
||||
To start using {ccr} auto-follow patterns from Stack Management in {kib}, select
|
||||
*Cross-Cluster Replication* from the side navigation and choose the
|
||||
*Auto-follow patterns* tab.
|
||||
|
||||
[[ccr-auto-follow-create]]
|
||||
==== Create auto-follow patterns
|
||||
|
@ -41,12 +41,8 @@ When an index is created in the remote cluster with a name that matches one of
|
|||
the patterns in the collection, a follower index is configured in the local
|
||||
cluster. The follower index uses the new index as its leader index.
|
||||
|
||||
[%collapsible]
|
||||
.Use the API
|
||||
====
|
||||
Use the <<ccr-put-auto-follow-pattern,create auto-follow pattern API>> to add a
|
||||
new auto-follow pattern configuration.
|
||||
====
|
||||
|
||||
[[ccr-auto-follow-retrieve]]
|
||||
==== Retrieve auto-follow patterns
|
||||
|
@ -57,12 +53,8 @@ Select the auto-follow pattern that you want to view details about. From there,
|
|||
you can make changes to the auto-follow pattern. You can also view your
|
||||
follower indices included in the auto-follow pattern.
|
||||
|
||||
[%collapsible]
|
||||
.Use the API
|
||||
====
|
||||
Use the <<ccr-get-auto-follow-pattern,get auto-follow pattern API>> to inspect
|
||||
all configured auto-follow pattern collections.
|
||||
====
|
||||
|
||||
[[ccr-auto-follow-pause]]
|
||||
==== Pause and resume auto-follow patterns
|
||||
|
@ -73,14 +65,10 @@ and pause replication.
|
|||
To resume replication, select the pattern and choose
|
||||
*Manage pattern > Resume replication*.
|
||||
|
||||
[%collapsible]
|
||||
.Use the API
|
||||
====
|
||||
Use the <<ccr-pause-auto-follow-pattern,pause auto-follow pattern API>> to
|
||||
pause auto-follow patterns.
|
||||
Use the <<ccr-resume-auto-follow-pattern,resume auto-follow pattern API>> to
|
||||
resume auto-follow patterns.
|
||||
====
|
||||
|
||||
[[ccr-auto-follow-delete]]
|
||||
==== Delete auto-follow patterns
|
||||
|
@ -91,9 +79,5 @@ and pause replication.
|
|||
When the pattern status changes to Paused, choose
|
||||
*Manage pattern > Delete pattern*.
|
||||
|
||||
[%collapsible]
|
||||
.Use the API
|
||||
====
|
||||
Use the <<ccr-delete-auto-follow-pattern,delete auto-follow pattern API>> to
|
||||
delete a configured auto-follow pattern collection.
|
||||
====
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[role="xpack"]
|
||||
[testenv="platinum"]
|
||||
[[ccr-getting-started]]
|
||||
[[ccr-getting-started-tutorial]]
|
||||
=== Tutorial: Set up {ccr}
|
||||
++++
|
||||
<titleabbrev>Set up {ccr}</titleabbrev>
|
||||
|
@ -56,7 +56,7 @@ response time
|
|||
|
||||
In this guide, you'll learn how to:
|
||||
|
||||
* Configure a <<modules-remote-clusters,remote cluster>> with a leader index
|
||||
* Configure a <<remote-clusters,remote cluster>> with a leader index
|
||||
* Create a follower index on a local cluster
|
||||
* Create an auto-follow pattern to automatically follow time series indices
|
||||
that are periodically created in a remote cluster
|
||||
|
@ -72,23 +72,18 @@ can <<modules-cross-cluster-search,search across clusters>> and set up {ccr}.
|
|||
==== Prerequisites
|
||||
To complete this tutorial, you need:
|
||||
|
||||
* The `manage` cluster privilege on the local cluster.
|
||||
* A license on both clusters that includes {ccr}. {kibana-ref}/managing-licenses.html[Activate a free 30-day trial].
|
||||
* The `read_ccr` cluster privilege and `monitor` and `read` privileges
|
||||
for the leader index on the remote cluster. <<stack-management-ccr-remote,Configure remote cluster privileges>>.
|
||||
* The `manage_ccr` cluster privilege and `monitor`, `read`, `write` and
|
||||
`manage_follow_index` privileges to configure remote clusters and follower
|
||||
indices on the local cluster. <<stack-management-ccr-local,Configure local cluster privileges>>.
|
||||
* An index on the remote cluster that contains the data you want to replicate.
|
||||
This tutorial uses the sample eCommerce orders data set.
|
||||
{kibana-ref}/get-started.html#gs-get-data-into-kibana[Load sample data].
|
||||
* In the local cluster, all nodes with the `master` <<node-roles,node role>> must
|
||||
also have the <<remote-node,`remote_cluster_client`>> role. The local cluster
|
||||
must also have at least one node with both a data role and the
|
||||
<<remote-node,`remote_cluster_client`>> role. Individual tasks for coordinating
|
||||
replication scale based on the number of data nodes with the
|
||||
`remote_cluster_client` role in the local cluster.
|
||||
also have the <<remote-node,`remote_cluster_client`>> role. The local cluster
|
||||
must also have at least one node with both a data role and the
|
||||
<<remote-node,`remote_cluster_client`>> role. Individual tasks for coordinating
|
||||
replication scale based on the number of data nodes with the
|
||||
`remote_cluster_client` role in the local cluster.
|
||||
|
||||
[[ccr-getting-started-remote-cluster]]
|
||||
==== Connect to a remote cluster
|
||||
To replicate an index on a remote cluster (Cluster A) to a local cluster (Cluster B), you configure Cluster A as a remote on Cluster B.
|
||||
|
||||
|
@ -102,13 +97,14 @@ cluster (`ClusterA`) followed by the transport port (defaults to `9300`). For
|
|||
example, `cluster.es.eastus2.staging.azure.foundit.no:9400` or
|
||||
`192.168.1.1:9300`.
|
||||
|
||||
[%collapsible]
|
||||
[%collapsible%open]
|
||||
.API example
|
||||
====
|
||||
Use the <<cluster-update-settings,cluster update settings API>> to add a remote cluster:
|
||||
You can also use the <<cluster-update-settings,cluster update settings API>> to
|
||||
add a remote cluster:
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
----
|
||||
PUT /_cluster/settings
|
||||
{
|
||||
"persistent" : {
|
||||
|
@ -123,7 +119,7 @@ PUT /_cluster/settings
|
|||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
----
|
||||
// TEST[setup:host]
|
||||
// TEST[s/127.0.0.1:9300/\${transport_host}/]
|
||||
<1> Specifies the hostname and transport port of a seed node in the remote
|
||||
|
@ -133,36 +129,34 @@ You can verify that the local cluster is successfully connected to the remote
|
|||
cluster.
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
----
|
||||
GET /_remote/info
|
||||
--------------------------------------------------
|
||||
----
|
||||
// TEST[continued]
|
||||
|
||||
The API will respond by showing that the local cluster is connected to the
|
||||
remote cluster.
|
||||
The API response indicates that the local cluster is connected to the remote
|
||||
cluster with cluster alias `leader`.
|
||||
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
----
|
||||
{
|
||||
"leader" : {
|
||||
"seeds" : [
|
||||
"127.0.0.1:9300"
|
||||
],
|
||||
"connected" : true, <1>
|
||||
"num_nodes_connected" : 1, <2>
|
||||
"connected" : true,
|
||||
"num_nodes_connected" : 1, <1>
|
||||
"max_connections_per_cluster" : 3,
|
||||
"initial_connect_timeout" : "30s",
|
||||
"skip_unavailable" : false,
|
||||
"mode" : "sniff"
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
----
|
||||
// TESTRESPONSE[s/127.0.0.1:9300/$body.leader.seeds.0/]
|
||||
// TEST[s/"connected" : true/"connected" : $body.leader.connected/]
|
||||
// TEST[s/"num_nodes_connected" : 1/"num_nodes_connected" : $body.leader.num_nodes_connected/]
|
||||
<1> This shows the local cluster is connected to the remote cluster with cluster
|
||||
alias `leader`
|
||||
<2> This shows the number of nodes in the remote cluster the local cluster is
|
||||
<1> The number of nodes in the remote cluster the local cluster is
|
||||
connected to.
|
||||
====
|
||||
|
||||
|
@ -174,6 +168,8 @@ soft deletes enabled, you must reindex it and use the new index as the leader
|
|||
index. Soft deletes are enabled by default on new indices
|
||||
created with {es} 7.0.0 and later.
|
||||
|
||||
include::../../../x-pack/docs/en/security/authentication/remote-clusters-privileges.asciidoc[tag=configure-ccr-privileges]
|
||||
|
||||
[[ccr-getting-started-follower-index]]
|
||||
==== Create a follower index to replicate a specific index
|
||||
When you create a follower index, you reference the remote cluster and the
|
||||
|
@ -202,26 +198,25 @@ in the follower index.
|
|||
[role="screenshot"]
|
||||
image::images/ccr-follower-index.png["The Cross-Cluster Replication page in {kib}"]
|
||||
|
||||
[%collapsible]
|
||||
[%collapsible%open]
|
||||
.API example
|
||||
====
|
||||
Use the <<ccr-put-follow,create follower API>> to create follower indices.
|
||||
When you create a follower index, you must reference the remote cluster and the
|
||||
leader index that you created in the
|
||||
remote cluster.
|
||||
You can also use the <<ccr-put-follow,create follower API>> to create follower
|
||||
indices. When you create a follower index, you must reference the remote cluster
|
||||
and the leader index that you created in the remote cluster.
|
||||
|
||||
When initiating the follower request, the response returns before the
|
||||
<<ccr-remote-recovery, remote recovery>> process completes. To wait for the process
|
||||
to complete, add the `wait_for_active_shards` parameter to your request.
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
----
|
||||
PUT /server-metrics-follower/_ccr/follow?wait_for_active_shards=1
|
||||
{
|
||||
"remote_cluster" : "leader",
|
||||
"leader_index" : "server-metrics"
|
||||
}
|
||||
--------------------------------------------------
|
||||
----
|
||||
// TEST[continued]
|
||||
|
||||
//////////////////////////
|
||||
|
@ -239,7 +234,7 @@ PUT /server-metrics-follower/_ccr/follow?wait_for_active_shards=1
|
|||
|
||||
Use the
|
||||
<<ccr-get-follow-stats,get follower stats API>> to inspect the status of
|
||||
replication
|
||||
replication.
|
||||
|
||||
//////////////////////////
|
||||
|
||||
|
@ -289,14 +284,14 @@ image::images/auto-follow-patterns.png["The Auto-follow patterns page in {kib}"]
|
|||
|
||||
// end::ccr-create-auto-follow-pattern-tag[]
|
||||
|
||||
[%collapsible]
|
||||
[%collapsible%open]
|
||||
.API example
|
||||
====
|
||||
Use the <<ccr-put-auto-follow-pattern,create auto-follow pattern API>> to
|
||||
configure auto-follow patterns.
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
----
|
||||
PUT /_ccr/auto_follow/beats
|
||||
{
|
||||
"remote_cluster" : "leader",
|
||||
|
@ -307,7 +302,7 @@ PUT /_ccr/auto_follow/beats
|
|||
],
|
||||
"follow_index_pattern" : "{{leader_index}}-copy" <3>
|
||||
}
|
||||
--------------------------------------------------
|
||||
----
|
||||
// TEST[continued]
|
||||
<1> Automatically follow new {metricbeat} indices.
|
||||
<2> Automatically follow new {packetbeat} indices.
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 75 KiB |
|
@ -52,7 +52,7 @@ secondary cluster
|
|||
|
||||
Watch the
|
||||
https://www.elastic.co/webinars/replicate-elasticsearch-data-with-cross-cluster-replication-ccr[{ccr} webinar] to learn more about the following use cases.
|
||||
Then, <<ccr-getting-started,set up {ccr}>> on your local machine and work
|
||||
Then, <<ccr-getting-started-tutorial,set up {ccr}>> on your local machine and work
|
||||
through the demo from the webinar.
|
||||
|
||||
[discrete]
|
||||
|
@ -163,7 +163,7 @@ image::images/ccr-arch-central-reporting.png[Three clusters in different regions
|
|||
[discrete]
|
||||
[[ccr-replication-mechanics]]
|
||||
=== Replication mechanics
|
||||
Although you <<ccr-getting-started,set up {ccr}>> at the index level, {es}
|
||||
Although you <<ccr-getting-started-tutorial,set up {ccr}>> at the index level, {es}
|
||||
achieves replication at the shard level. When a follower index is created,
|
||||
each shard in that index pulls changes from its corresponding shard in the
|
||||
leader index, which means that a follower index has the same number of
|
||||
|
@ -306,7 +306,7 @@ enabled.
|
|||
This following sections provide more information about how to configure
|
||||
and use {ccr}:
|
||||
|
||||
* <<ccr-getting-started>>
|
||||
* <<ccr-getting-started-tutorial>>
|
||||
* <<ccr-managing>>
|
||||
* <<ccr-auto-follow>>
|
||||
* <<ccr-upgrading>>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue