Commit Graph

144 Commits

Author SHA1 Message Date
James Rodewig fe2990829a
Update setting deprecation messages to remove major release references (#83528)
Updates our setting deprecation messages to avoid references to future major releases.
2022-02-04 13:53:20 -05:00
Dan Roscigno 302ce75a88
Add note about base_path and ECE to the snapshot repository docs (#83526)
Elastic Cloud Enterprise (ECE) shares snapshot repositories across multiple deployments. As a result, the `base_path` is generated by ECE, and the `base_path` setting is not allowed.  This PR adds a note to the S3, Azure, and GCS snapshot repository docs.
2022-02-04 11:34:48 -05:00
James Rodewig 88be4ed950
[DOCS] Fix get snapshot status API parameters (#81818)
* Documents `GET _snapshot/_status` and `GET _snapshot/<repository>/_status`.
* Notes the `<repository>` and `<snasphot>` parameters are optional.
* Removes erroneous mention of the `<snapshot>` parameter supporting the `_current` value.

Closes #81600

Relates to #80931
2022-02-03 10:55:23 -05:00
Joe Gallo 0935485684
Fix get-snapshot-api :docs:integTest (#83273) 2022-01-28 12:24:01 -05:00
James Rodewig cb6265f9bd
[DOCS] Move snapshot repo types to separate pages (#82826)
With https://github.com/elastic/elasticsearch/pull/81870, the Azure, GCS, and S3 repository types have separate, dedicated pages in the Elasticsearch guide. For consistency, this PR creates separate pages for the shared file system, read-only URL, and source-only repository types.

Related changes:

- Adds redirects to the plugins docs
- Fixes a few breaking changes that refer to the Azure, GCS, and S3 repositories as plugins.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2022-01-26 17:13:39 -05:00
David Turner 9633883c64
Add note on truststore for S3-compatible repos (#82669)
Today we note that the `repository-s3` plugin uses the JVM-wide
truststore in the docs for the `protocol` client setting, but it turns
out that this is easy to overlook since most installations will not need
to change the `protocol`. This commit adds the same detail to the
section on S3-compatible repositories where it is more likely to be
found.
2022-01-26 11:16:43 +00:00
James Rodewig 6b841325f1
[DOCS] Fix headings for Azure, GCS, and S3 snapshot repo pages (#82996)
Updates the headings to use sentence case.
2022-01-24 17:14:55 -05:00
James Rodewig cbeb2c2ce1
[DOCS] Fix typo (#82988) 2022-01-24 15:50:07 -05:00
Artem Prigoda 1ddaf253d5
Add support for HTTP Proxies for the GCS repository (#82737)
* Add support for HTTP Proxies for the GCS repository

The change adds 3 new client properties for the GCS repository:

* gcs.client.default.proxy.type
* gcs.client.default.proxy.host
* gcs.client.default.proxy.port

They allow to configure a [java.net.Proxy](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/Proxy.html)
for the GCS SDK to use when communicating with the GCS API.

Resolves #82444
2022-01-20 15:46:59 +01:00
Artem Prigoda e47b7a63f4
[s3-repository] Support IAM roles for Kubernetes service accounts (#81255)
There have been many requests to support repository-s3 authentication via IAM roles in Kubernetes service accounts.

The AWS SDK is supposed to support them out of the box with the aws-java-sdk-sts library. Unfortunately, we can't use WebIdentityTokenCredentialsProvider from the SDK. It reads the token from AWS_WEB_IDENTITY_TOKEN_FILE environment variable which is usually mounted to /var/run/secrets/eks.amazonaws.com/serviceaccount/token and the S3 repository doesn't have the read permission to read it. We don't want to hard-code a file permission for the repository, because the location of AWS_WEB_IDENTITY_TOKEN_FILE can change at any time in the future and we would also generally prefer to restrict the ability of plugins to access things outside of their config directory.

To overcome this limitation, this change adds a custom WebIdentityCredentials provider that reads the service account from a symlink to AWS_WEB_IDENTITY_TOKEN_FILE created in the repository's config directory. We expect the end user to create the symlink to indicate that they want to use service accounts for authentification.

Service accounts are checked and exchanged for session tokens by the AWS STS. To test the authentification flow, this change adds a test fixture which mocks the assume-role-with-web-identity call to the service and returns a response with test credentials.

Fixes #52625
2022-01-19 14:03:11 +01:00
Ievgen Degtiarenko e7d89910c2
validate snapshot has global state before restoring it (#82037)
It is possible to restore from a snapshot with a global
state even if it does not have one. This pr adds validation
to prevent this from happening.
2022-01-17 15:33:19 +01:00
James Rodewig 59ab3401a2
[DOCS] Swap 7.16 for `{prev-major-last}` var (#82616) 2022-01-14 09:50:34 -05:00
James Rodewig 631f502206 [DOCS] Use attribute in snapshot index compatibility 2022-01-13 16:16:27 -05:00
James Rodewig 93bd599f6d
[DOCS] Update snapshot vers compat table to use minor versions (#81885)
### Changes

* Updates the snapshot version compatibility table to use minor versions rather than major versions.
* Adds a index creation version and cluster compatibility table. Updates the index compatibility section to use minor versions.
* Moves the tables to separate files. This'll help prevent merge conflicts.
* Fixes the heading level for the "Warnings" section.
2022-01-13 15:50:18 -05:00
James Rodewig e45bfdbd1b
[DOCS] Reorder "Check SLM history" section (#81328)
Changes:

* Moves the get SLM policy API example _after_ the get SLM stats API. This seems to fit the normal workflow better where a user will drill-down into a particular policy to get more information.
* Notes some more information about what the get SLM policy API returns. In particular, it notes that you can get the error message for the last policy failure.
2022-01-13 09:01:56 -05:00
Rory Hunter d2dbef5063
Convert repository plugins to modules (#81870)
Closes #81652.

Convert the `repository-azure`, `repository-gcs` and `repository-s3`
plugins into modules, so that they are always included in the
Elasticsearch distribution. Also change plugin installation, removal
and syncing so that attempting to add or remove these plugins still
succeeds but is now a no-op.
2022-01-10 10:45:42 +00:00
David Turner 30bda56f9a
Readonly repos don't cache (#81674)
We say to mark repos as readonly to prevent corruption, but there's
other ways to prevent corruption that people sometimes use instead (e.g.
denying writes at the filesystem/bucket level). It's reasonable to think
that the readonly flag is redundant in that situation but it's not: they
should still mark the repo as readonly tho to bypass the cache and
re-read its contents on each access. This commit adds docs to that
effect.

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2021-12-13 18:36:26 +00:00
James Rodewig 1519bb6ecb
[DOCS] Update snapshot defaults for system indices (#81226)
Updates the snapshot and restore docs for https://github.com/elastic/elasticsearch/pull/79670.

Closes https://github.com/elastic/elasticsearch/issues/81183
2021-12-08 10:15:14 -05:00
David Turner 9955b49fab
Add explicit warning not to touch repository contents (#81295)
Manipulating the contents of a snapshot repository is a very bad idea,
but it turns out we don't call this out in the docs anywhere. This
commit adds a warning about this.
2021-12-06 13:22:01 +00:00
James Rodewig 4d19702221
[DOCS] Update xrefs for snapshot restore docs (#81023)
Changes:

* Removes a leading slash from the restore snapshot API's prerequisites.
* Updates several xrefs that point to redirected pages.
2021-11-29 11:52:02 -05:00
Adam Locke 247d124666
[DOCS] Update ES quick start for security ON by default (#80735)
* [DOCS] Update ES quick start for security ON by default

* Remove code.asciidoc, which is part of the overall doc build now

* Update node names for cleanup

* Add note with links to tools

* Add --net elastic network

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-11-17 17:48:07 -05:00
James Rodewig a48060313a
[DOCS] Remove soft limit for snapshot repositories (#80745)
As part of #74350, snapshot repositories no longer have a 200 snapshot soft limit. This removes docs related to the limit.
2021-11-16 12:24:18 -05:00
James Rodewig 659e0d3fd3
[DOCS] Overhaul snapshot and restore docs (#79081)
Makes several changes to consolidate snapshot and backup-related docs.

Highlights:

* Adds info about supported ESS snapshot repository types
* Adds docs for Kibana's Snapshot and Restore feature
* Combines tutorial pages related to taking and managing snapshots
* Consolidates explanations of the snapshot process
* Incorporates SLM into the snapshot tutorial
* Removes duplicate "back up a cluster" pages
2021-11-15 12:45:07 -05:00
James Rodewig 63d0d66a07
[DOCS] Remove `timeout` and `master_timeout` parameters from request body (#80708) (#80709)
The put repository API doesn't accept these parameters in the request body.

Co-authored-by: Ivonne Botello <87008515+ibotello@users.noreply.github.com>
2021-11-15 09:02:27 -05: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
edh-oss 3c23a9e9cd
[DOCS] Remove `[testenv="gold+"]` attributes (#79309)
Changes:

* Removes several `[testenv="gold+"]` attributes from the docs. `gold+` is not a valid [subscription level](https://www.elastic.co/subscriptions) or testenv value.
* Moves two `[testenv="basic"]` attributes to the file header. This makes the `testenv` placement consistent and fixes the yml file generated from `docs/reference/snapshot-restore/register-repository.asciidoc`.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-10-27 16:32:30 -04:00
James Rodewig 3ab614409d
[DOCS] Add docs for restoring to new cluster (#79683)
When restoring a snapshot to a new cluster, users may expect the cluster
to not contain any conflicting indices or data streams. However, some
features, such as the GeoIP processor, automatically create indices at
startup.

This adds and updates related procedures in the restore a snapshot tutorial.
I plan to improve other documentation related to feature states in snapshots
in a separate PR(s).

This PR also updates the restore snapshot API's example to include
the `indices` and `feature_states` parameters.

Relates to #79675
2021-10-26 17:27:11 -04:00
James Rodewig d65ed5649a
[DOCS] Clarify `max_count` only counts successful snapshot attempts (#79749)
The create SLM policy API's `max_count` parameter limits the number of
snapshots for a policy. Only successful snapshot attempts count toward
this limit. Failed snapshot attempts do not.
2021-10-26 17:22:50 -04:00
James Rodewig 12474b1b36
[DOCS] Fix create snapshot API parameters (#79209)
Changes:

- Notes snapshot names support date math
- Sorts request body parameters alphabetically
- Adds the `expand_wildcards` request body parameter
- Reuses cluster state contents list from the restore snapshot API
- Notes the `indices` and `feature_states` parameters support a special `none` value

Relates to #79081
2021-10-21 09:03:12 -04:00
James Rodewig 58abbe941f
[DOCS] Fix cluster update settings refs (#79580)
The API is named 'cluster update settings,' not 'update cluster settings.'
2021-10-20 13:16:35 -04:00
James Baiera 12d10b07d7
Deprecate Monitoring Settings (#79499)
This PR deprecates all monitoring settings as well as adds deprecation info entries for each setting.

Collecting and shipping monitoring data using the Monitoring plugin will be deprecated in 7.16 and will be removed at some point in the 8.x line after sufficient wait time. The recommended approach for collecting and shipping monitoring data going forward is to use Metricbeat. The recommended approach for alerting is Kibana alerting.
2021-10-20 01:15:44 -04:00
James Rodewig 7e5e05540f
[DOCS] Fix system index refs in restore tutorial (#78582)
Fixes a couple of erroneous references related to system indices in the snapshot restore tutorial:

* Calling the delete index API on `*` will only delete
  some system indices, such as the `.security`. It won't delete others, such as
  `.geoip_databases`.

* Not all dot indices are system indices. Some are just hidden indices.

Relates to #76929
2021-10-06 17:55:11 -04:00
David Turner 07a2acac93
Improve docs for pre-release version compatibility (#78428)
* Improve docs for pre-release version compatibility

Follow-up to #78317 clarifying a couple of points:

- a pre-release build can restore snapshots from released builds
- compatibility applies if at least one of the local or remote cluster
  is a released build

* Remote cluster build date nit
2021-09-29 04:49:07 -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
James Rodewig 36372b9743
[DOCS] Remove unneeded anchor from restore snapshot docs (#78041)
This anchor was added to fix a broken docs build. With
https://github.com/elastic/kibana/pull/112597 merged, this fix is no longer
needed.
2021-09-21 12:10:27 -04:00
James Rodewig 91fabb3b72 [DOCS] Add anchor to fix broken docs build 2021-09-20 14:01:47 -04:00
James Rodewig 2fc3d40a13
[DOCS] Convert 'Restore a snapshot' to tutorial (#76929)
Updates the 'Restore a snapshot' guide to be more tutorial-focused.
Adds a tutorial for restoring an entire cluster.

Closes #72497.
2021-09-20 13:17:24 -04:00
edh-oss 62a471aefe
Update JSON parser and snippets (#77983)
Related to issue  #77823

This does the following:

- Updates several asciidoc files that contained code snippets with
  invalid JSON, most involving unnecessary trailing commas.

- Makes the switch from the Groovy JSON parser to the Jackson parser,
  pursuant to the general goal of eliminating Groovy dependence.

- Makes testing of JSON validity at build time more strict.

Note that this update still allows backslash escaping for any
character. Currently that matters because of the file
"docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc",
specifically this part:

    "attributes" : {
      "ml.machine_memory" :
        "$body.datafeeds.0.node.attributes.ml\.machine_memory",
      "ml.max_open_jobs" : "512"
    }

It's not clear to me what change, if any, is appropriate there. So,
I've left in the escaped period and configured the parser to ignore
it for the time being.
2021-09-20 11:08:26 +01:00
Armin Braun 2544d913cf
Implement from_sort_value Parameter in Get Snapshots API (#77618)
Add `from_sort_value` parameter to allow for filtering snapshots by comparing to concrete sort column
values similar to the existing after parameter`.
2021-09-15 13:37:22 +02:00
Armin Braun f1a4551e93
Implement Exclude Patterns for Snapshot- and Repository Names in Get Snapshots API (#77308)
It's in the title. Adds support for exclude patterns combined with wildcard requests
similar to what we support for index names.
2021-09-10 15:00:44 +02:00
Armin Braun 7508720fe5
Add Filtering by SLM Policy to Get Snapshots API (#77321)
It's in the title, add new `slm_policy_filter` param as a filter to the get snapshots API.
2021-09-07 18:24:09 +02:00
Armin Braun 0920e21445
Implement Sort By Repository Name in Get Snapshots API (#77049)
This one is the last sort column not yet implemented but used by Kibana.
2021-09-01 13:01:58 +02:00
Armin Braun 48f3784a6d
Add Sort By Shard Count and Failed Shard Count to Get Snapshots API (#77011)
It's in the title. As requested by the Kibana team, adding these two additional sort columns.

relates #74350
2021-08-30 13:39:51 +02:00
James Rodewig 38fe33a870 [DOCS] Fix whitespace to hide attribute 2021-08-22 21:18:51 -04:00
James Rodewig 1c355bfda9
[DOCS] Reuse snapshot config in put SLM policy API docs (#76712)
Updates the put SLM policy API's `config` parameter to reuse the create snapshot API's request body parameters.
Previously, the `config` parameter was missing the `feature_states` parameter. This change should keep the two docs in sync.
2021-08-20 08:29:16 -04:00
James Rodewig 5c954df521
[DOCS] Fix data type for create snapshot API's `metadata` param (#76465) 2021-08-12 16:38:56 -04:00
James Rodewig 20f000e95a
[DOCS] Fix query params for create snapshot API (#76436)
Moves the `master_timeout` and `wait_for_completion` parameters to a query parameters section.
2021-08-12 13:11:12 -04:00
Glen Smith 263d9f2dac
[DOCS] Fix typo (#76213)
"can be only restored" -> "can only be restored"
2021-08-10 10:02:00 -04:00
Armin Braun ffaa0f2742
Implement Numeric Offset Parameter in Get Snapshots API (#76233)
Add numeric offset parameter to this API.

Relates #74350
2021-08-09 16:23:43 +02:00
Armin Braun a4983f5ab9
Return Total Result Count and Remaining Count in Get Snapshots Response (#76150)
Add total result count and remaining count to get snapshots response.
2021-08-09 11:34:24 +02:00