Browse Source

Set up ILM docs. (#32823)

* [DOCS] Added ILM docs to the ref.

* [DOCS] Added structure for ILM docs.

* [DOCS] Made the intro a bit more general per Tal's comment.
debadair 7 years ago
parent
commit
5011aa2c2b

+ 2 - 0
docs/reference/index.asciidoc

@@ -57,6 +57,8 @@ include::index-modules.asciidoc[]
 
 include::ingest.asciidoc[]
 
+include::{xes-repo-dir}/ilm/index.asciidoc[]
+
 include::sql/index.asciidoc[]
 
 include::monitoring/index.asciidoc[]

+ 10 - 0
x-pack/docs/en/ilm/get-index-lifecycle-information.asciidoc

@@ -0,0 +1,10 @@
+[[get-index-lifecycle-information]]
+== Get index lifecycle information
+
+Execution Model
+Discuss how actions are actually split up into discrete steps and how you can see more information about where an index is within a policy (info and all)
+Talk about the jump-to-step API
+Error Handling
+Show error in explain api
+Demonstrate the retry API
+Show how to get a sense of progress for things like the allocate step

+ 14 - 0
x-pack/docs/en/ilm/getting-started-ilm.asciidoc

@@ -0,0 +1,14 @@
+[[getting-started-index-lifecycle-management]]
+== Getting started with {ilm}
+
+Create a policy that rolls over after 1 day deletes an index after 30 days
+
+Show create policy API req/res
+
+Show assign policy to index API req/res
+
+Show both the API and how it is done with `index.lifecyce.name` using the
+create-index API
+
+Show explain API to show current state, but ignore the “step” related info,
+only focus on managed/phase/action

+ 4 - 0
x-pack/docs/en/ilm/ilm-api.asciidoc

@@ -0,0 +1,4 @@
+[[index-lifecycle-management-api]]
+== {ilm} API
+
+TBD

+ 69 - 0
x-pack/docs/en/ilm/index.asciidoc

@@ -0,0 +1,69 @@
+[[index-lifecycle-management]]
+= Managing Indices
+
+:ilm:             index lifecycle management
+:ILM:             Index lifecycle management
+[partintro]
+--
+The {ILM} APIs enable you to automate how you want to manage your indices over
+time. Rather than simply performing management actions on your indices on a set
+schedule, you can base actions on other factors such as shard
+size and performance requirements.
+
+You control how indices are handled as they age by attaching a
+lifecycle policy to the index template used to create them. You can update
+the policy to modify the lifecycle of both new and existing indices.
+
+For time series indices, there are four stages in the index lifecycle:
+
+* Hot--the index is actively being updated and queried.
+* Warm--the index is no longer being updated, but is still being queried.
+* Cold--the index is no longer being updated and is seldom queried. The
+information still needs to be searchable, but it's okay if those queries are
+slower.
+* Delete--the index is no longer needed and can safely be deleted.
+
+The lifecycle policy governs how the index transitions through these stages and
+the actions that are performed on the index at each stage. The policy can
+specify:
+
+* The maximum size or age at which you want to roll over to a new index.
+* The point at which the index is no longer being updated and the number of
+primary shards can be reduced.
+* When to force a merge to permanently delete documents marked for deletion.
+* The point at which the index can be moved to less performant hardware.
+* The point at which the availability is not as critical and the number of
+replicas can be reduced.
+* When the index can be safely deleted.
+
+For example, if you are indexing metrics data from a fleet of ATMs into
+Elasticsearch, you might define a policy that says:
+
+. When the index reaches 5GB, roll over to a new index.
+. Move the old index into the warm stage, mark it read only, and shrink it down
+to a single shard.
+. After 7 days, move the index into the cold stage and move it to less expensive
+hardware.
+. Delete the index once the required 30 day retention period is reached.
+--
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/getting-started-ilm.asciidoc
+include::getting-started-ilm.asciidoc[]
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/using-policies--rollover.asciidoc
+include::using-policies-rollover.asciidoc[]
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/set-up-policy.asciidoc
+include::set-up-lifecycle-policy.asciidoc[]
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/update-lifecycle-policy.asciidoc
+include::update-lifecycle-policy.asciidoc[]
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/get-index-lifecycle-information.asciidoc
+include::get-index-lifecycle-information.asciidoc[]
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/pause-resume-ilm.asciidoc
+include::pause-resume-ilm.asciidoc[]
+
+:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/index-lifecycle-management/getting-started-ilm.asciidoc
+include::ilm-api.asciidoc[]

+ 4 - 0
x-pack/docs/en/ilm/pause-resume-ilm.asciidoc

@@ -0,0 +1,4 @@
+[[pause-resume-ilm]]
+== Pause and resume {ilm}
+ILM can be skipped on a per-index basis
+ILM as a whole can be placed in maintenance mode

+ 6 - 0
x-pack/docs/en/ilm/set-up-lifecycle-policy.asciidoc

@@ -0,0 +1,6 @@
+[[set-up-lifecycle-policy]]
+== Set up {ilm} policy
+
+Focus on how this is done in the general sense, not the fine points about
+rollover just yet. Specifically that `index.lifecycle.name` can be used here
+too, not just the create index API explicitly.

+ 5 - 0
x-pack/docs/en/ilm/update-lifecycle-policy.asciidoc

@@ -0,0 +1,5 @@
+[[update-lifecycle-policy]]
+== Update lifecycle policy
+
+Discuss how one updates an existing policy (when allowed, when not),
+ as well as all the stuff about switching policies on indices.

+ 7 - 0
x-pack/docs/en/ilm/using-policies-rollover.asciidoc

@@ -0,0 +1,7 @@
+[[using-policies-rollover]]
+== Using policies to manage index rollover
+
+Demonstrate Template Usage - letting `is_write_index` default to true
+Demonstrate alias swapping - rollover will set new index to the write index
+Discuss how the `after` param will now be relative to the rollover time
+Show how after/rollover-conditions interplay with one another