-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Add steps for quickly testing to the READMEs of ILM, Rollup, and CCR. #67213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cjcenizal
merged 3 commits into
elastic:master
from
cjcenizal:chore-ilm-rollup-ccr-readme
May 26, 2020
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Cross-Cluster Replication | ||
|
|
||
| ## Quick steps for testing cross-cluster replication | ||
|
|
||
| You can run a local cluster and simulate a remote cluster within a single Kibana directory. | ||
|
|
||
| 1. Run `yarn es snapshot --license=trial` and kill the process once the snapshot has been installed. | ||
| 2. Duplicate the ES installation by running `cp -aR .es/8.0.0 .es/8.0.0-2`. | ||
| 3. Start your "local" cluster by running `.es/8.0.0/bin/elasticsearch` and starting Kibana. | ||
| 4. Start your "remote" cluster by running `.es/8.0.0-2/bin/elasticsearch -E cluster.name=europe -E transport.port=9400`. | ||
| 5. Index a document into your remote cluster by running `curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"`. | ||
| Note that these settings are required for testing auto-follow pattern conflicts errors (see below). | ||
|
|
||
| Now you can create follower indices and auto-follow patterns to replicate the `my-leader-index` | ||
| index on the remote cluster that's available at `127.0.0.1:9400`. | ||
|
|
||
| ### Auto-follow pattern conflict errors | ||
|
|
||
| You can view conflict errors by creating two auto-follow patterns with overlapping patterns (e.g. `my*` and `my-*`) that will both capture the `my-leader-index` index on your remote cluster. Run the curl command to create `my-leader-index2` on your remote cluster, since auto-follow patterns don't replicate existing indices. | ||
|
|
||
| Now, when you open the details flyout of one of the auto-follow patterns you will see a list of recent errors. | ||
|
|
||
|  | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| # Index Lifecycle Management | ||
|
|
||
| ## Quick steps for testing ILM in Index Management | ||
|
|
||
| You can test that the `Frozen` badge, phase filtering, and lifecycle information is surfaced in | ||
| Index Management by running this series of requests in Console: | ||
|
|
||
| ``` | ||
| PUT /_ilm/policy/full | ||
| { | ||
| "policy": { | ||
| "phases" : { | ||
| "hot" : { | ||
| "min_age" : "0ms", | ||
| "actions" : { | ||
| "rollover" : { | ||
| "max_docs" : 1 | ||
| } | ||
| } | ||
| }, | ||
| "warm" : { | ||
| "min_age" : "15s", | ||
| "actions" : { | ||
| "forcemerge" : { | ||
| "max_num_segments" : 1 | ||
| }, | ||
| "shrink" : { | ||
| "number_of_shards" : 1 | ||
| } | ||
| } | ||
| }, | ||
| "cold" : { | ||
| "min_age" : "30s", | ||
| "actions" : { | ||
| "freeze": {} | ||
| } | ||
| }, | ||
| "delete" : { | ||
| "min_age" : "1d", | ||
| "actions" : { | ||
| "delete" : { } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| PUT _template/test | ||
| { | ||
| "index_patterns": ["test-*"], | ||
| "settings": { | ||
| "number_of_shards": 3, | ||
| "number_of_replicas": 0, | ||
| "index.lifecycle.name": "full", | ||
| "index.lifecycle.rollover_alias": "test-alias" | ||
| } | ||
| } | ||
|
|
||
| PUT /test-000001 | ||
| { | ||
| "aliases": { | ||
| "test-alias": { | ||
| "is_write_index": true | ||
| } | ||
| } | ||
| } | ||
|
|
||
| PUT test-alias/_doc/1 | ||
| { | ||
| "a": "a" | ||
| } | ||
|
|
||
| PUT /_cluster/settings | ||
| { | ||
| "transient": { | ||
| "logger.org.elasticsearch.xpack.core.indexlifecycle": "TRACE", | ||
| "logger.org.elasticsearch.xpack.indexlifecycle": "TRACE", | ||
| "logger.org.elasticsearch.xpack.core.ilm": "TRACE", | ||
| "logger.org.elasticsearch.xpack.ilm": "TRACE", | ||
| "indices.lifecycle.poll_interval": "10s" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Then go into Index Management and, after about 1 minute, you'll see a frozen index and | ||
| you'll be able to filter by the various lifecycle phases and statuses. | ||
|
|
||
|  | ||
|
|
||
| Next, add the Kibana sample data and attach the `full` policy to the index that gets created. | ||
| After about a minute, there should be an error on this index. When you click the index you'll see | ||
| ILM information in the detail panel as well as an error. You can dismiss the error by clicking | ||
| `Manage > Retry lifecycle step`. | ||
|
|
||
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the "see below" is referring to. Should there be more information regarding testing conflict errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, copy/pasta from #62890. I'll incorporate the information referenced in that PR description. Thanks for catching this!