Skip to content

Commit 69a40f8

Browse files
committed
Add documentation on GCS repository
1 parent fbdbcfb commit 69a40f8

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Google Compute Engine Cloud Plugin for Elasticsearch
22
====================================================
33

4-
The GCE Cloud plugin allows to use GCE API for the unicast discovery mechanism.
4+
The GCE Cloud plugin allows to:
5+
6+
* use the Google Compute Engine API for the unicast discovery mechanism
7+
* use the Google Cloud Storage service as a snapshot repository
58

69
In order to install the plugin, run:
710

@@ -31,6 +34,49 @@ plugin --install cloud-gce \
3134
```
3235

3336

37+
Google Cloud Storage Repository
38+
===============================
39+
40+
41+
The gcs repository is using the [Google Cloud Storage](https://cloud.google.com/storage/) service to store snapshots.
42+
The plugin uses a [service account](https://developers.google.com/accounts/docs/OAuth2ServiceAccount#creatinganaccount) authorization file
43+
to access to the GCS buckets. This way, the plugin can be used when deployed inside a Compute Engine instance or outside on a dedicated server.
44+
45+
To enable this fonctionnality, a service account file must be declared in the elasticsearch configuration file:
46+
47+
```yaml
48+
repositories:
49+
gce:
50+
credentials_file: "/path/to/elasticsearch-cloud-gce-ddabc90e45.json"
51+
52+
```
53+
54+
The repository can be created using the following command:
55+
56+
```sh
57+
$ curl -XPUT 'http://localhost:9200/_snapshot/my_gcs_repository' -d '{
58+
"type": "gcs",
59+
"settings": {
60+
"project_id": "my_project_id",
61+
"bucket": "my_bucket_name"
62+
}
63+
}'
64+
```
65+
66+
The following settings are supported:
67+
68+
* `project_id`: The id of the Google Cloud project. Defaults to `repositories.gcs.projet_id` or `cloud.gce.projet_id` (Mandatory)
69+
* `bucket`: The name of the bucket to be used for snapshots. (Mandatory)
70+
* `location`: The location where bucket is located. Defaults to US.
71+
* `base_path`: Specifies the path within bucket to repository data. Defaults to root directory.
72+
* `chunk_size`: Big files can be broken down into chunks during snapshotting if needed. The chunk size can be specified in bytes or by using size value notation, i.e. `1g`, `10m`, `5k`. Defaults to `100m`.
73+
* `compress`: When set to `true` metadata files are stored in compressed format. This setting doesn't affect index files that are already compressed by default. Defaults to `false`.
74+
* `buffer_size`: Size of the internal buffer used to upload snapshots to Google Cloud Storage. Defaults to `1mb`.
75+
* `application_name`: The name used by the plugin to connect to the Google Cloud Storage API. It can be changed to track quota. Defaults to `elasticsearch-google-cloud-storage-service`.
76+
77+
Multiple GCS repositories can be created. Please note that all buckets must have the correct permissions configured on the Google Cloud console for the service account file.
78+
79+
3480
Google Compute Engine Virtual Machine Discovery
3581
===============================
3682

0 commit comments

Comments
 (0)