@@ -47,7 +47,7 @@ multicast environments). Here is a simple sample configuration:
47
47
How to start (short story)
48
48
--------------------------
49
49
50
- * Create Google Compute Engine instance
50
+ * Create Google Compute Engine instance (with compute rw permissions)
51
51
* Install Elasticsearch
52
52
* Install Google Compute Engine Cloud plugin
53
53
* Modify ` elasticsearch.yml` file
@@ -113,6 +113,17 @@ gcloud compute ssh myesnode1 --zone europe-west1-a
113
113
ssh -i ~/.ssh/google_compute_engine 192.158.29.199
114
114
` ` `
115
115
116
+ *Note Regarding Service Account Permissions*
117
+
118
+ It's important when creating an instance that the correct permissions are set. At a minimum, you must ensure you have :
119
+
120
+ ` ` `
121
+ service_account_scope=compute-rw
122
+ ` ` `
123
+
124
+ Failing to set this will result in unauthorized messages when starting Elasticsearch.
125
+ See [Machine Permissions](#machine-permissions).
126
+
116
127
Once connected, install Elasticsearch :
117
128
118
129
` ` ` sh
@@ -313,6 +324,8 @@ gcutil setinstancemetadata myesnode1 \
313
324
Tips
314
325
----
315
326
327
+ # ## Store project id locally
328
+
316
329
If you don't want to repeat the project id each time, you can save it in `~/.gcutil.flags` file using :
317
330
318
331
` ` ` sh
@@ -325,6 +338,45 @@ gcutil getproject --project=es-cloud --cache_flag_values
325
338
--project=es-cloud
326
339
` ` `
327
340
341
+ # ## Machine Permissions
342
+
343
+ **Creating machines with gcutil**
344
+
345
+ Ensure the following flags are set :
346
+
347
+ ` ` ` `
348
+ --service_account_scope=compute-rw
349
+ ```
350
+
351
+ ** Creating with console (web)**
352
+
353
+ When creating an instance using the web portal, click ** Show advanced options** .
354
+
355
+ At the bottom of the page, under ` PROJECT ACCESS ` , choose ` >> Compute >> Read Write ` .
356
+
357
+ ** Creating with knife google**
358
+
359
+ Set the service account scopes when creating the machine:
360
+
361
+ ```
362
+ $ knife google server create www1 \
363
+ -m n1-standard-1 \
364
+ -I debian-7-wheezy-v20131120 \
365
+ -Z us-central1-a \
366
+ -i ~/.ssh/id_rsa \
367
+ -x jdoe \
368
+ --gce-service-account-scopes https://www.googleapis.com/auth/compute.full_control
369
+ ```
370
+
371
+ Or, you may use the alias:
372
+
373
+ ```
374
+ --gce-service-account-scopes compute-rw
375
+ ```
376
+
377
+ If you have created a machine without the correct permissions, you will see ` 403 unauthorized ` error messages. The only
378
+ way to alter these permissions is to delete the instance (NOT THE DISK). Then create another with the correct permissions.
379
+
328
380
License
329
381
-------
330
382
0 commit comments