Commit graph

101 commits

Author SHA1 Message Date
Adam Locke
33b72f34e2
[DOCS] Add note that write indices are not replicated (#82997)
* [DOCS] Add note that write indices are not replicated

* Clarify note about is_write_index

* Clarify leader aliases with is_write_index

Co-authored-by: Henning Andersen <33268011+henningandersen@users.noreply.github.com>

Co-authored-by: Henning Andersen <33268011+henningandersen@users.noreply.github.com>
2022-01-28 13:24:53 -05:00
Ugo Sangiorgi
305ff20b8f
[DOCS] Add missing HTML anchors to CCR and ML (#80287) 2022-01-26 11:00:40 -08:00
James Rodewig
f56a0f4b66
[DOCS] Remove testenv annotations from doc snippet tests (#80023)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
2021-11-05 18:38:50 -04:00
David Turner
4782cf4d91
Add docs for pre-release version compatibility (#78317)
The reference manual includes docs on version compatibility in various
places, but it's not clear that these docs only apply to released
versions and that the rules for pre-release versions are stricter than
folks expect. This commit adds some words to the docs for unreleased
versions which explains this subtlety.
2021-09-27 16:56:35 +01:00
Adam Locke
6940673e8a
[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>
2021-09-22 16:02:33 -04:00
Adam Locke
c3f8d14a5b
[DOCS] Remove screenshot from managing CCR (#76193) 2021-08-05 15:57:51 -04:00
Adam Locke
b616c93696
[DOCS] Remove CCR video (#76121)
* [DOCS] Remove CCR video

* Remove unnecessary screencaps and update some text to match
2021-08-05 14:10:21 -04:00
bellengao
cd190dec2f
[DOCS] Fix typos in get follower stats API doc (#74599)
There are some typos in the document of get follower stats API.
2021-06-29 11:29:52 -04:00
Adam Locke
b1803e4514
[DOCS] Update central reporting image (#74195) 2021-06-16 17:29:30 -04:00
James Rodewig
3540b7ccc7
[DOCS] Fix typo in CCR connect example (#74100) 2021-06-14 14:55:34 -04:00
Francisco Fernández Castaño
a8101f346f
Add support for index pattern exclusion in CCR AutoFollow (#72935)
This commit adds the ability to specify exclusion patterns in Auto-Follow patterns. This allows excluding indices that match any of the inclusion patterns and also match some of the exclusion patterns giving more fine grained control in scenarios where this is important.

Related #67686
2021-06-04 13:53:30 +02:00
Adam Locke
0336e012ee
[DOCS] Update bi-directional CCR note (#72266)
* [DOCS] Update bi-directional CCR note

* Integrating note with a new sub-section

* Add "particularly"
2021-05-25 14:23:58 -04:00
Dan Hermann
30cd47e7f8
[DOCS] Clarify CCR auto-follow requirements for data streams (#72476) 2021-04-29 09:41:58 -05:00
Tanguy Leroux
e26e14441e
Document CCR auto-follow patterns and searchable snapshots indices (#70863)
This commit adds a note in CCR document about auto-follow 
patterns that should not match searchable snapshots indices.

Relates #70580 (comment)
2021-04-06 10:47:00 +02:00
Nik Everett
75342a2a71
Add teardown support for doc tests (#70831)
This adds named `teardown` support for doc tests similar to its support
for named `setup` section. This is useful when many doc files want to
share a similar `setup` AND `teardown`. I've introduced an example of
this in the CCR docs just to prove its works. We expect we'll use it for
datastreams as well.

Closes #70830

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-24 16:57:50 -04:00
Jason Tedor
cfad8376f4
Clarify remote_cluster_client role (#70186)
This commit addresses two aspects of the description in the docs of
configuring a local node to be a remote cluster client. First, the
documentation was referring to the legacy setting for configuring a
remote cluster client. Secondly, we clarify that additional features,
not only cross-cluster search, have requirements around the usage of the
remote_cluster_client role.

Co-authored-by: Przemysław Witek <przemyslaw.witek@elastic.co>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-11 20:28:26 -05:00
David Turner
8abc3fb796
Fix docs for behaviour of CCR after lease expiry (#69114)
Today we imply that CCR will automatically fall back to a full index
copy if it cannot replay any missing history. This was true for earlier
versions of the design but we ultimately decided not to do this without
adjusting the docs to match. This commit fixes the docs.
2021-02-17 13:26:48 +00:00
Adam Locke
5de8613c62
[DOCS] Add links to ESS for setting up remote clusters on cloud. (#68401) 2021-02-02 14:32:54 -05:00
Martijn van Groningen
52afaf2060
Protect replicated data streams against local rollovers (#64710)
When a data stream is being auto followed then a rollover in a local cluster can break auto following,
if the local cluster performs a rollover then it creates a new write index and if then later the remote
cluster rolls over as well then that new write index can't be replicated, because it has the same name
as in the write index in the local cluster, which was created earlier.

If a data stream is managed by ccr, then the local cluster should not do a rollover for those data streams.
The data stream should be rolled over in the remote cluster and that change should replicate to the local
cluster. Performing a rollover in the local cluster is an operation that the data stream support in ccr should
perform.

To protect against rolling over a replicated data stream, this PR adds a replicate field to DataStream class.
The rollover api will fail with an error in case a data stream is being rolled over and the targeted data stream is
a replicated data stream. When the put follow api creates a data stream in the local cluster then the replicate flag
is set to true. There should be a way to turn a replicated data stream into a regular data stream when for example
during disaster recovery. The newly added api in this pr (promote data stream api) is doing that. After a replicated
data stream is promoted to a regular data stream then the local data stream can be rolled over, so that the new
write index is no longer a follower index. Also if the put follow api is attempting to update this data stream
(for example to attempt to resume auto following) then that with fail, because the data stream is no longer a
replicated data stream.

Today with time based indices behind an alias, the is_write_index property isn't replicated from remote cluster
to the local cluster, so when attempting to rollover the alias in the local cluster the rollover fails, because the
alias doesn't have a write index. The added replicated field in the DataStream class and added validation
achieve the same kind of protection, but in a more robust way.

A followup from #61993.
2020-12-08 08:34:24 +01:00
Martijn van Groningen
c4c3c8b422
Add data stream support to CCR (#61993)
This commit adds support data stream support to CCR's auto following by making the following changes:
* When the auto follow coordinator iterates over the candidate indices to follow,
  the auto follow coordinator also checks whether the index is part of a data stream and
  if the name of data stream also matches with the auto follow pattern then the index
  will be auto followed.
* When following an index, the put follow api also checks whether that index is part
  of a data stream and if so then also replicates the data stream definition to the
  local cluster.
* In order for the follow index api to determine whether an index is part of a data
  stream, the cluster state api was modified to also fetch the data stream definition
  of the cluster state if only the state is queried for specific indices.

When a data stream is auto followed, only new backing indices are auto followed.
This is in line with how time based indices patterns are replicated today. This
means that the data stream isn't copied 1 to 1 into the local cluster. The local
cluster's data stream definition contains the same name, timestamp field and
generation, but the list of backing indices may be different (depending on when
a data stream was auto followed).

Closes #56259
2020-11-03 14:01:14 +01:00
Adam Locke
9de8a2f695
Removing erroneous screen capture. (#62561) 2020-09-17 12:22:37 -04:00
Adam Locke
b420caa723
[DOCS] Updating CCR setup to be more tutorial focused (#62256)
* Applying some initial changes.

* Updating intro and screenshots.

* Removing unnecessary links, streamlining content, and adding GIF.

* Adding what's next section.

* Removing what's next.

* Minor edits.

* Apply suggestions from code review

Co-authored-by: debadair <debadair@elastic.co>

* Incorporating review feedback.

* Moving CCR user privileges to another page, plus more edits.

* Apply suggestions from code review

Co-authored-by: debadair <debadair@elastic.co>

* Incorporating more review feedback.

* Adding TESTSETUP to fix build errors.

* Update docs/reference/ccr/getting-started.asciidoc

Co-authored-by: debadair <debadair@elastic.co>

* Swapping GIF for mp4 hosted on web team CMS.

* Removing GIF in favor of mp4.

Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-16 16:41:11 -04:00
James Rodewig
bfae8c7633
[DOCS] Fix typo in CCR Put Follow API docs (#61392) (#61471)
Co-authored-by: Mark Laney <mark1@elastic.co>
2020-08-24 09:46:32 -04:00
Adam Locke
610a47c792
[DOCS] Update CCR docs to focus on Kibana (#60555)
* First crack at rewriting the CCR introduction.

* Emphasizing Kibana in configuring CCR (part one).

* Many more edits, plus new files.

* Fixing test case.

* Removing overview page and consolidating that information in the main page.

* Adding redirects for moved and deleted pages.

* Removing, consolidating, and adding redirects.

* Fixing duplicate ID in redirects and removing outdated reference.

* Adding test case and steps for recreating a follower index.

* Adding steps for managing CCR tasks in Kibana.

* Adding tasks for managing auto-follow patterns.

* Fixing glossary link.

* Fixing glossary link, again.

* Updating the upgrade information and other stuff.

* Apply suggestions from code review

* Incorporating review feedback.

* Adding more edits.

* Fixing link reference.

* Adding use cases for #59812.

* Incorporating feedback from reviewers.

* Apply suggestions from code review

* Incorporating more review comments.

* Condensing some of the steps for accessing Kibana.

* Incorporating small changes from reviewers.

Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 15:36:54 -04:00
Adam Locke
f9d2cb8415
Adding new screenshots and updating copy. (#60407) 2020-07-30 15:30:40 -04:00
Adrien Grand
003a68f7fa
Mention how CCR can help optimize indexing throughput. (#54870) 2020-07-23 18:39:29 +02:00
James Rodewig
2774cd6938
[DOCS] Swap [float] for [discrete] (#60124)
Changes instances of `[float]` in our docs for `[discrete]`.

Asciidoctor prefers the `[discrete]` tag for floating headings:
https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
2020-07-23 11:48:22 -04:00
James Rodewig
80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
Jason Tedor
2e0274266f
Allow follower indices to override leader settings (#58103)
Today when creating a follower index via the put follow API, or via an
auto-follow pattern, it is not possible to specify settings overrides
for the follower index. Instead, we copy all of the leader index
settings to the follower. Yet, there are cases where a user would want
some different settings on the follower index such as the number of
replicas, or allocation settings. This commit addresses this by allowing
the user to specify settings overrides when creating follower index via
manual put follower calls, or via auto-follow patterns. Note that not
all settings can be overrode (e.g., index.number_of_shards) so we also
have detection that prevents attempting to override settings that must
be equal between the leader and follow index. Note that we do not even
allow specifying such settings in the overrides, even if they are
specified to be equal between the leader and the follower
index. Instead, the must be implicitly copied from the leader index, not
explicitly set by the user.
2020-06-18 10:55:17 -04:00
Lisa Cawley
751e2d0deb
[DOCS] Fixes license management links (#58213) 2020-06-16 16:43:54 -07:00
bellengao
411045bc4e
[DOCS] Fix typo in CCR overview docs (#57709) 2020-06-05 17:28:21 -04:00
CJ Cenizal
cde5126620
[Docs] Clarify that _ccr/info omits parameters from the response when the follower index is paused. (#55961) 2020-05-12 15:09:40 -07:00
Lisa Cawley
da531f4cf6
[DOCS] Collapse nested objects in CCR APIs (#54697) 2020-04-03 11:58:25 -07:00
Nhat Nguyen
ac8f5cd542
Remove outdated requirement of CCR (#50859)
With retention leases, users do not need to set 
index.soft_deletes.retention.operations. This change removes it from the
requirements of CCR
2020-01-13 19:59:50 -05:00
Tim Brooks
0cedb9e251
Update remote cluster stats to support simple mode (#49961)
Remote cluster stats API currently only returns useful information if
the strategy in use is the SNIFF mode. This PR modifies the API to
provide relevant information if the user is in the SIMPLE mode. This
information is the configured addresses, max socket connections, and
open socket connections.
2019-12-13 09:16:53 -07:00
James Rodewig
1a574115c1
[DOCS] Document CCR compatibility requirements (#49776)
* Creates a prerequisites section in the cross-cluster replication (CCR)
  overview.
* Adds concise definitions for local and remote cluster in a CCR context.
* Documents that the ES version of the local cluster must be the same
  or a newer compatible version as the remote cluster.
2019-12-02 15:52:13 -05:00
Yannick Welsch
be849b2a4d
Hide orphaned tasks from follower stats (#48901)
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700
2019-11-08 00:01:54 -05:00
bellengao
aee0a78674 [DOCS] Fix shard type in CCR overview doc (#48882)
Closes #48875
2019-11-07 10:08:38 -05:00
Tanguy Leroux
7cd156aab9
Add mention to Pause Auto-Follower API in Upgrade Clusters docs (#48764)
Relates #46665
2019-11-06 09:46:17 -05:00
Yannick Welsch
237e3f0755 Revert "Mute get-ccr-stats doctest (#48375)"
This reverts commit f861927e8b.
2019-10-30 11:12:25 +01:00
Alan Woodward
f861927e8b
Mute get-ccr-stats doctest (#48375)
This test is failing frequently, due to #47718
2019-10-23 15:19:44 +01:00
Tanguy Leroux
58ca9eeb02
Add documentation for Pause/Resume Auto-Follower APIs (#47985)
Relates #47510

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-10-15 08:24:51 +02:00
Tanguy Leroux
8b82e62ec2
Add Pause/Resume Auto Follower APIs (#47510)
This commit adds two APIs that allow to pause and resume 
CCR auto-follower patterns:

// pause auto-follower
POST /_ccr/auto_follow/my_pattern/pause

// resume auto-follower
POST /_ccr/auto_follow/my_pattern/resume

The ability to pause and resume auto-follow patterns can be 
useful in some situations, including the rolling upgrades of 
cluster using a bi-directional cross-cluster replication scheme 
(see #46665).

This committ adds a new active flag to the AutoFollowPattern 
and adapts the AutoCoordinator and AutoFollower classes so 
that it stops to fetch remote's cluster state when all auto-follow 
patterns associate to the remote cluster are paused.

When an auto-follower is paused, remote indices that match the 
pattern are just ignored: they are not added to the pattern's 
followed indices uids list that is maintained in the local cluster 
state. This way, when the auto-follow pattern is resumed the 
indices created in the remote cluster in the meantime will be 
picked up again and added as new following indices. Indices 
created and then deleted in the remote cluster will be ignored 
as they won't be seen at all by the auto-follower pattern at 
resume time.
2019-10-11 12:33:47 +02:00
Lisa Cawley
4e4990c6a0
[DOCS] Cleans up links to security content (#47610) 2019-10-04 16:10:26 -07:00
Pius
f25e58a257 [DOCS] Add 'remote clusters' requirement link to CCR docs (#47185) 2019-09-26 16:14:42 -04:00
James Rodewig
4281389c73
[DOCS] Remove leveloffset for CCR docs (#46818) 2019-09-18 09:44:28 -04:00
James Rodewig
a8873eff2b
[DOCS] Add CCR docs to the Elasticsearch Reference Guide (#45704)
Previously, cross-cluster replication (CCR) documentation was located in
the Stack Overview:
https://www.elastic.co/guide/en/elastic-stack-overview/master/xpack-ccr.html

This adds CCR documentation to the Elasticsearch Reference Guide with a
level offset for headings.

The level offset and CCR Stack Overview docs will be removed in later
commits.
2019-09-17 14:25:46 -04:00
James Rodewig
5772c1c7dd
[DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) 2019-09-09 13:13:41 -04:00
James Rodewig
e43be90e6c
[DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) 2019-09-06 14:05:36 -04:00
James Rodewig
466c59a4a7
[DOCS] Replace "// TESTRESPONSE" magic comments with "[source,console-result] (#46295) 2019-09-05 16:47:18 -04:00