anchor.diff:  
   To automate rollover and management of time-series indices with {ilm-init}, you:
   
  -. <<ilm-gs-create-policy, Create a lifecycle policy>> with the {ilm-init} put policy API.  
  +. <<ilm-gs-create-policy, Create a lifecycle policy>> with the {ilm-init} put policy API.
   . <<ilm-gs-apply-policy, Create an index template>> to apply the policy to each new index.
   . <<ilm-gs-bootstrap, Bootstrap an index>> as the initial write index.
  -. <<ilm-gs-check-progress, Verify indices are moving through the lifecycle phases>> 
  -as expected with the {ilm-init} explain API. 
  +. <<ilm-gs-check-progress, Verify indices are moving through the lifecycle phases>>
  +as expected with the {ilm-init} explain API.
   
   [float]
   [[ilm-gs-create-policy]]
  
positive.code: [[ilm-gs-apply-policy]]
  === Create an index template to apply the lifecycle policy
  
  To automaticaly apply a lifecycle policy to the new write index on rollover, 
  specify the policy in the index template used to create new indices.
  
  For example, the following request creates a `datastream_template` that is applied to new indices
  whose names match the `datastream-*` index pattern. 
  The template configures two {ilm-init} settings:
  
  * `index.lifecycle.name` specifies the name of the lifecycle policy to apply to all new indices that match 
  the index pattern.  
  * `index.lifecycle.rollover_alias` specifies the index alias to be rolled over 
  when the rollover action is triggered for an index.
  
  [source,console]
  -----------------------
  PUT _template/datastream_template
  {
    "index_patterns": ["datastream-*"],                 <1>
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1,
      "index.lifecycle.name": "datastream_policy",      <2>
      "index.lifecycle.rollover_alias": "datastream"    <3>
    }
  }
  -----------------------
  // TEST[continued]
  
  <1> Apply the template to a new index if its name starts with `datastream-`. 
  <2> The name of the lifecycle policy to apply to each new index.
  <3> The name of the alias used to reference these indices. 
  Required for policies that use the rollover action.
  
  //////////////////////////
  
  [source,console]
  --------------------------------------------------
  DELETE /_template/datastream_template
  --------------------------------------------------
  // TEST[continued]
  
  
negative.code: [[ilm-gs-check-progress]]
  === Checking progress
  
  To get status information for managed indices, you use the {ilm-init} explain API.
  This lets you find out things like:
  
  * What phase an index is in and when it entered that phase.
  * The current action and what step is being performed.
  * If any errors have occurred or progress is blocked.
  
  For example, the following request gets information about the `timeseries` indices:
  
  [source,console]
  --------------------------------------------------
  GET timeseries-*/_ilm/explain
  --------------------------------------------------
  // TEST[continued]
  
  The response below shows that the bootstrap index is waiting in the `hot` phase's `rollover` action.
  It remains in this state and {ilm-init} continues to call `attempt-rollover`
  until the rollover conditions are met.
  
  [[36818c6d9f434d387819c30bd9addb14]]
  [source,console-result]
  --------------------------------------------------
  {
    "indices": {
      "timeseries-000001": {
        "index": "timeseries-000001",
        "managed": true,
        "policy": "timeseries_policy",             <1>
        "lifecycle_date_millis": 1538475653281,
        "age": "30s",                              <2>
        "phase": "hot",
        "phase_time_millis": 1538475653317,
        "action": "rollover",
        "action_time_millis": 1538475653317,
        "step": "attempt-rollover",                <3>
        "step_time_millis": 1538475653317,
        "phase_execution": {
          "policy": "timeseries_policy",
          "phase_definition": {                    <4>
            "min_age": "0ms",
            "actions": {
  