vagrant-google 1.0.0 → 2.0.0.rc0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +140 -95
- data/CHANGELOG.md +18 -0
- data/README.md +20 -18
- data/example_boxes/gce-test/Vagrantfile +1 -0
- data/google-test.box +0 -0
- data/google.box +0 -0
- data/lib/vagrant-google/action.rb +3 -4
- data/lib/vagrant-google/action/assign_instance_groups.rb +14 -10
- data/lib/vagrant-google/action/connect_google.rb +11 -5
- data/lib/vagrant-google/action/read_ssh_info.rb +2 -2
- data/lib/vagrant-google/action/read_state.rb +2 -2
- data/lib/vagrant-google/action/run_instance.rb +56 -22
- data/lib/vagrant-google/action/stop_instance.rb +0 -2
- data/lib/vagrant-google/action/terminate_instance.rb +2 -0
- data/lib/vagrant-google/config.rb +28 -24
- data/lib/vagrant-google/provider.rb +5 -0
- data/lib/vagrant-google/version.rb +1 -1
- data/locales/en.yml +3 -6
- data/tasks/acceptance.rake +8 -4
- data/test/acceptance/skeletons/generic/Vagrantfile +5 -4
- data/test/acceptance/skeletons/instance_groups/Vagrantfile +6 -5
- data/test/acceptance/skeletons/multi_instance/Vagrantfile +6 -4
- data/test/acceptance/skeletons/preemptible/Vagrantfile +8 -7
- data/test/acceptance/skeletons/scopes/Vagrantfile +6 -5
- data/test/unit/base.rb +3 -1
- data/test/unit/common/config_test.rb +28 -36
- data/vagrant-google.gemspec +11 -10
- data/vagrant-spec.config.rb +1 -1
- data/vagrantfile_examples/Vagrantfile.simple +2 -0
- metadata +59 -32
- data/lib/vagrant-google/action/sync_folders.rb +0 -106
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3de3e5c8c3002f1dfb3b01ce2a07aa96ee9c904b
|
4
|
+
data.tar.gz: d1ae149feea9e3c24529cb3cf9455cffa57b6792
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da3d11aa820d64a4fc4ed216ed29452f17700a75ea1acd27af6c8596935c649c13463b17e2dbc53a13dd703f1fb2dafa1767918c380fd352c0d8d5ce7ebe5738
|
7
|
+
data.tar.gz: 886634d649fe59215e9da565df5d6ea1cfc8c47bcf00e7f7178d59582416bac71937eb74e436071b6eae61c7e7c9b8348572f587d0bd84b8b2bf315a84233025
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,13 +1,65 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2017-10-29 18:43:35 +1100 using RuboCop version 0.51.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: SupportedStyles, IndentationWidth.
|
12
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
13
|
+
Layout/IndentHash:
|
14
|
+
EnforcedStyle: consistent
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
# Cop supports --auto-correct.
|
18
|
+
# Configuration parameters: Width, IgnoredPatterns.
|
19
|
+
Layout/IndentationWidth:
|
20
|
+
Exclude:
|
21
|
+
- 'lib/vagrant-google/action/connect_google.rb'
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
Layout/LeadingCommentSpace:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/vagrant-google/action/sync_folders.rb'
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
# Cop supports --auto-correct.
|
31
|
+
Layout/SpaceAfterComma:
|
32
|
+
Exclude:
|
33
|
+
- 'test/unit/common/config_test.rb'
|
34
|
+
|
35
|
+
# Offense count: 2
|
36
|
+
# Cop supports --auto-correct.
|
37
|
+
# Configuration parameters: SupportedStyles.
|
38
|
+
# SupportedStyles: space, no_space
|
39
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
40
|
+
EnforcedStyle: no_space
|
41
|
+
|
42
|
+
# Offense count: 3
|
43
|
+
# Cop supports --auto-correct.
|
44
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, SupportedStylesForEmptyBraces.
|
45
|
+
# SupportedStyles: space, no_space
|
46
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
47
|
+
Layout/SpaceBeforeBlockBraces:
|
48
|
+
Exclude:
|
49
|
+
- 'lib/vagrant-google/action/sync_folders.rb'
|
50
|
+
- 'tasks/acceptance.rake'
|
51
|
+
|
52
|
+
# Offense count: 2
|
53
|
+
# Cop supports --auto-correct.
|
54
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
|
55
|
+
# SupportedStyles: space, no_space
|
56
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
57
|
+
Layout/SpaceInsideBlockBraces:
|
58
|
+
Exclude:
|
59
|
+
- 'lib/vagrant-google/action/sync_folders.rb'
|
60
|
+
|
9
61
|
# Offense count: 2
|
10
|
-
Lint/
|
62
|
+
Lint/LiteralAsCondition:
|
11
63
|
Exclude:
|
12
64
|
- 'lib/vagrant-google/action/run_instance.rb'
|
13
65
|
- 'lib/vagrant-google/action/start_instance.rb'
|
@@ -24,7 +76,7 @@ Lint/RescueException:
|
|
24
76
|
|
25
77
|
# Offense count: 1
|
26
78
|
# Cop supports --auto-correct.
|
27
|
-
# Configuration parameters: IgnoreEmptyBlocks.
|
79
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
28
80
|
Lint/UnusedBlockArgument:
|
29
81
|
Exclude:
|
30
82
|
- 'lib/vagrant-google/action/sync_folders.rb'
|
@@ -40,16 +92,21 @@ Lint/UselessAssignment:
|
|
40
92
|
Exclude:
|
41
93
|
- 'lib/vagrant-google/plugin.rb'
|
42
94
|
|
43
|
-
# Offense count:
|
95
|
+
# Offense count: 12
|
44
96
|
Metrics/AbcSize:
|
45
|
-
Max:
|
97
|
+
Max: 59
|
98
|
+
|
99
|
+
# Offense count: 7
|
100
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
101
|
+
Metrics/BlockLength:
|
102
|
+
Max: 224
|
46
103
|
|
47
104
|
# Offense count: 4
|
48
105
|
Metrics/CyclomaticComplexity:
|
49
|
-
Max:
|
106
|
+
Max: 19
|
50
107
|
|
51
|
-
# Offense count:
|
52
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
108
|
+
# Offense count: 84
|
109
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
53
110
|
# URISchemes: http, https
|
54
111
|
Metrics/LineLength:
|
55
112
|
Max: 131
|
@@ -57,18 +114,26 @@ Metrics/LineLength:
|
|
57
114
|
# Offense count: 15
|
58
115
|
# Configuration parameters: CountComments.
|
59
116
|
Metrics/MethodLength:
|
60
|
-
Max:
|
117
|
+
Max: 43
|
61
118
|
|
62
119
|
# Offense count: 3
|
63
120
|
Metrics/PerceivedComplexity:
|
64
|
-
Max:
|
121
|
+
Max: 19
|
65
122
|
|
66
123
|
# Offense count: 1
|
67
|
-
|
124
|
+
Naming/AccessorMethodName:
|
68
125
|
Exclude:
|
69
126
|
- 'test/unit/common/config_test.rb'
|
70
127
|
|
71
|
-
# Offense count:
|
128
|
+
# Offense count: 2
|
129
|
+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
130
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
131
|
+
Naming/FileName:
|
132
|
+
Exclude:
|
133
|
+
- 'lib/vagrant-google.rb'
|
134
|
+
- 'vagrant-spec.config.rb'
|
135
|
+
|
136
|
+
# Offense count: 4
|
72
137
|
# Cop supports --auto-correct.
|
73
138
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
74
139
|
# SupportedStyles: always, conditionals
|
@@ -76,8 +141,23 @@ Style/AndOr:
|
|
76
141
|
Exclude:
|
77
142
|
- 'example_boxes/gce-test/Vagrantfile'
|
78
143
|
- 'lib/vagrant-google/config.rb'
|
144
|
+
|
145
|
+
# Offense count: 1
|
146
|
+
# Cop supports --auto-correct.
|
147
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
148
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
149
|
+
Style/BracesAroundHashParameters:
|
150
|
+
Exclude:
|
79
151
|
- 'test/unit/common/config_test.rb'
|
80
152
|
|
153
|
+
# Offense count: 1
|
154
|
+
# Cop supports --auto-correct.
|
155
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
156
|
+
# SupportedStyles: assign_to_condition, assign_inside_condition
|
157
|
+
Style/ConditionalAssignment:
|
158
|
+
Exclude:
|
159
|
+
- 'lib/vagrant-google/config.rb'
|
160
|
+
|
81
161
|
# Offense count: 18
|
82
162
|
Style/Documentation:
|
83
163
|
Exclude:
|
@@ -96,64 +176,36 @@ Style/Documentation:
|
|
96
176
|
- 'lib/vagrant-google/provider.rb'
|
97
177
|
- 'lib/vagrant-google/util/timer.rb'
|
98
178
|
|
99
|
-
# Offense count:
|
179
|
+
# Offense count: 49
|
100
180
|
# Cop supports --auto-correct.
|
101
181
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
102
|
-
# SupportedStyles:
|
103
|
-
Style/
|
182
|
+
# SupportedStyles: when_needed, always, never
|
183
|
+
Style/FrozenStringLiteralComment:
|
104
184
|
Enabled: false
|
105
185
|
|
106
|
-
# Offense count:
|
107
|
-
# Cop supports --auto-correct.
|
108
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
109
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
110
|
-
Style/EmptyLinesAroundBlockBody:
|
111
|
-
Exclude:
|
112
|
-
|
113
|
-
|
114
|
-
# Offense count: 1
|
115
|
-
# Cop supports --auto-correct.
|
116
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
117
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
118
|
-
Style/EmptyLinesAroundClassBody:
|
119
|
-
Exclude:
|
120
|
-
- 'lib/vagrant-google/action/stop_instance.rb'
|
121
|
-
|
122
|
-
# Offense count: 1
|
123
|
-
# Cop supports --auto-correct.
|
124
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
125
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
126
|
-
Style/EmptyLinesAroundModuleBody:
|
127
|
-
Exclude:
|
128
|
-
- 'lib/vagrant-google/action/stop_instance.rb'
|
129
|
-
|
130
|
-
# Offense count: 2
|
131
|
-
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
|
132
|
-
Style/FileName:
|
133
|
-
Exclude:
|
134
|
-
- 'lib/vagrant-google.rb'
|
135
|
-
- 'vagrant-spec.config.rb'
|
136
|
-
|
137
|
-
# Offense count: 2
|
138
|
-
# Cop supports --auto-correct.
|
139
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
140
|
-
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
141
|
-
Style/FirstParameterIndentation:
|
142
|
-
Exclude:
|
143
|
-
- 'lib/vagrant-google/action/run_instance.rb'
|
144
|
-
|
145
|
-
# Offense count: 1
|
186
|
+
# Offense count: 4
|
146
187
|
# Configuration parameters: MinBodyLength.
|
147
188
|
Style/GuardClause:
|
148
189
|
Exclude:
|
190
|
+
- 'lib/vagrant-google/action/connect_google.rb'
|
149
191
|
- 'lib/vagrant-google/action/run_instance.rb'
|
192
|
+
- 'lib/vagrant-google/plugin.rb'
|
150
193
|
|
151
|
-
# Offense count:
|
194
|
+
# Offense count: 45
|
152
195
|
# Cop supports --auto-correct.
|
153
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
154
|
-
# SupportedStyles: ruby19,
|
196
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
197
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
155
198
|
Style/HashSyntax:
|
156
|
-
|
199
|
+
Exclude:
|
200
|
+
- 'lib/vagrant-google/action/connect_google.rb'
|
201
|
+
- 'lib/vagrant-google/action/read_ssh_info.rb'
|
202
|
+
- 'lib/vagrant-google/action/run_instance.rb'
|
203
|
+
- 'lib/vagrant-google/action/start_instance.rb'
|
204
|
+
- 'lib/vagrant-google/action/stop_instance.rb'
|
205
|
+
- 'lib/vagrant-google/action/sync_folders.rb'
|
206
|
+
- 'tasks/acceptance.rake'
|
207
|
+
- 'tasks/boxes.rake'
|
208
|
+
- 'test/unit/common/config_test.rb'
|
157
209
|
|
158
210
|
# Offense count: 2
|
159
211
|
# Cop supports --auto-correct.
|
@@ -164,9 +216,9 @@ Style/InfiniteLoop:
|
|
164
216
|
|
165
217
|
# Offense count: 1
|
166
218
|
# Cop supports --auto-correct.
|
167
|
-
Style/
|
219
|
+
Style/MultilineIfThen:
|
168
220
|
Exclude:
|
169
|
-
- 'lib/vagrant-google/action/
|
221
|
+
- 'lib/vagrant-google/action/read_ssh_info.rb'
|
170
222
|
|
171
223
|
# Offense count: 1
|
172
224
|
# Cop supports --auto-correct.
|
@@ -182,17 +234,25 @@ Style/NilComparison:
|
|
182
234
|
Exclude:
|
183
235
|
- 'test/unit/common/config_test.rb'
|
184
236
|
|
237
|
+
# Offense count: 2
|
238
|
+
# Cop supports --auto-correct.
|
239
|
+
# Configuration parameters: PreferredDelimiters.
|
240
|
+
Style/PercentLiteralDelimiters:
|
241
|
+
Exclude:
|
242
|
+
- 'tasks/acceptance.rake'
|
243
|
+
|
185
244
|
# Offense count: 1
|
186
245
|
# Cop supports --auto-correct.
|
187
246
|
Style/PerlBackrefs:
|
188
247
|
Exclude:
|
189
248
|
- 'lib/vagrant-google/action/sync_folders.rb'
|
190
249
|
|
191
|
-
# Offense count:
|
250
|
+
# Offense count: 4
|
192
251
|
# Cop supports --auto-correct.
|
193
252
|
# Configuration parameters: AllowMultipleReturnValues.
|
194
253
|
Style/RedundantReturn:
|
195
254
|
Exclude:
|
255
|
+
- 'lib/vagrant-google/action/connect_google.rb'
|
196
256
|
- 'lib/vagrant-google/action/read_ssh_info.rb'
|
197
257
|
- 'lib/vagrant-google/action/read_state.rb'
|
198
258
|
|
@@ -212,49 +272,34 @@ Style/RegexpLiteral:
|
|
212
272
|
|
213
273
|
# Offense count: 2
|
214
274
|
# Cop supports --auto-correct.
|
215
|
-
# Configuration parameters:
|
216
|
-
|
217
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
218
|
-
EnforcedStyle: no_space
|
219
|
-
|
220
|
-
# Offense count: 3
|
221
|
-
# Cop supports --auto-correct.
|
222
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
223
|
-
# SupportedStyles: space, no_space
|
224
|
-
Style/SpaceBeforeBlockBraces:
|
225
|
-
Enabled: false
|
226
|
-
|
227
|
-
# Offense count: 1
|
228
|
-
# Cop supports --auto-correct.
|
229
|
-
Style/SpaceBeforeComma:
|
275
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil.
|
276
|
+
Style/SafeNavigation:
|
230
277
|
Exclude:
|
231
|
-
- '
|
232
|
-
|
233
|
-
# Offense count: 2
|
234
|
-
# Cop supports --auto-correct.
|
235
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
236
|
-
# SupportedStyles: space, no_space
|
237
|
-
Style/SpaceInsideBlockBraces:
|
238
|
-
Enabled: false
|
239
|
-
|
240
|
-
# Offense count: 392
|
241
|
-
# Cop supports --auto-correct.
|
242
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
243
|
-
# SupportedStyles: single_quotes, double_quotes
|
244
|
-
Style/StringLiterals:
|
245
|
-
Enabled: false
|
278
|
+
- 'lib/vagrant-google/action/run_instance.rb'
|
279
|
+
- 'lib/vagrant-google/action/terminate_instance.rb'
|
246
280
|
|
247
|
-
# Offense count:
|
281
|
+
# Offense count: 8
|
248
282
|
# Cop supports --auto-correct.
|
249
283
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
250
284
|
# SupportedStyles: single_quotes, double_quotes
|
251
285
|
Style/StringLiteralsInInterpolation:
|
252
|
-
|
286
|
+
Exclude:
|
287
|
+
- 'lib/vagrant-google/action/run_instance.rb'
|
288
|
+
- 'lib/vagrant-google/action/start_instance.rb'
|
289
|
+
- 'lib/vagrant-google/config.rb'
|
290
|
+
- 'tasks/acceptance.rake'
|
291
|
+
|
292
|
+
# Offense count: 5
|
293
|
+
# Cop supports --auto-correct.
|
294
|
+
# Configuration parameters: MinSize, SupportedStyles.
|
295
|
+
# SupportedStyles: percent, brackets
|
296
|
+
Style/SymbolArray:
|
297
|
+
EnforcedStyle: brackets
|
253
298
|
|
254
299
|
# Offense count: 4
|
255
300
|
# Cop supports --auto-correct.
|
256
301
|
# Configuration parameters: IgnoredMethods.
|
257
|
-
# IgnoredMethods: respond_to
|
302
|
+
# IgnoredMethods: respond_to, define_method
|
258
303
|
Style/SymbolProc:
|
259
304
|
Exclude:
|
260
305
|
- 'test/unit/common/config_test.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
# 2.0.0 (March 2018)
|
2
|
+
|
3
|
+
* Update to use fog-google gem v1
|
4
|
+
* Add new configuration option `labels` for setting [labels](https://cloud.google.com/compute/docs/labeling-resources)
|
5
|
+
on GCE instances
|
6
|
+
* Fix disk cleanup issue causing the disk to be marked as created before insertion
|
7
|
+
* Test environment fixups to avoid 'Encoded files can't be read outside of the Vagrant installer.'
|
8
|
+
* Breaking changes:
|
9
|
+
* Drop support for configuration option `google_key_location`(GCP P12 key)
|
10
|
+
* `image` parameter no longer defaults to an arbitrary image and must be
|
11
|
+
specified at runtime
|
12
|
+
* Rsync behavior now consistent with Vagrant's default, removed old rsync code
|
13
|
+
|
14
|
+
# 1.0.0 (July 2017)
|
15
|
+
# 0.2.5 (October 2016)
|
16
|
+
# 0.2.4 (April 2016)
|
17
|
+
# 0.2.3 (January 2016)
|
18
|
+
|
1
19
|
# 0.2.2 (October 2015)
|
2
20
|
|
3
21
|
* Cleanup instance and disks on backend failures [p0deje]
|
data/README.md
CHANGED
@@ -18,7 +18,8 @@ The maintainers for this plugin are @temikus(primary), @erjohnso(backup).
|
|
18
18
|
* Boot Google Compute Engine instances.
|
19
19
|
* SSH into the instances.
|
20
20
|
* Provision the instances with any built-in Vagrant provisioner.
|
21
|
-
*
|
21
|
+
* Synced folder support via Vagrant's
|
22
|
+
[rsync action](https://www.vagrantup.com/docs/synced-folders/rsync.html).
|
22
23
|
* Define zone-specific configurations so Vagrant can manage machines in
|
23
24
|
multiple zones.
|
24
25
|
|
@@ -88,7 +89,9 @@ Vagrant.configure("2") do |config|
|
|
88
89
|
google.google_project_id = "YOUR_GOOGLE_CLOUD_PROJECT_ID"
|
89
90
|
google.google_client_email = "YOUR_SERVICE_ACCOUNT_EMAIL_ADDRESS"
|
90
91
|
google.google_json_key_location = "/path/to/your/private-key.json"
|
91
|
-
|
92
|
+
|
93
|
+
google.image_family = 'ubuntu-1604-lts'
|
94
|
+
|
92
95
|
override.ssh.username = "USERNAME"
|
93
96
|
override.ssh.private_key_path = "~/.ssh/id_rsa"
|
94
97
|
#override.ssh.private_key_path = "~/.ssh/google_compute_engine"
|
@@ -99,10 +102,11 @@ end
|
|
99
102
|
|
100
103
|
And then run `vagrant up --provider=google`.
|
101
104
|
|
102
|
-
This will start a
|
103
|
-
with an `n1-standard-1` machine, and the `"default"`
|
104
|
-
project. And assuming your SSH information (see below) was
|
105
|
-
within your Vagrantfile, SSH and provisioning will work as
|
105
|
+
This will start a latest version of Ubuntu 16.04 LTS instance in the
|
106
|
+
`us-central1-f` zone, with an `n1-standard-1` machine, and the `"default"`
|
107
|
+
network within your project. And assuming your SSH information (see below) was
|
108
|
+
filled in properly within your Vagrantfile, SSH and provisioning will work as
|
109
|
+
well.
|
106
110
|
|
107
111
|
Note that normally a lot of this boilerplate is encoded within the box file,
|
108
112
|
but the box file used for the quick start, the "google" box, has no
|
@@ -165,15 +169,15 @@ This provider exposes quite a few provider-specific configuration options:
|
|
165
169
|
|
166
170
|
* `google_client_email` - The Client Email address for your Service Account.
|
167
171
|
(Can also be configured with `GOOGLE_CLIENT_EMAIL` environment variable.)
|
168
|
-
* `google_key_location` - The location of the P12 private key file matching your
|
169
|
-
Service Account.
|
170
|
-
(Can also be configured with `GOOGLE_KEY_LOCATION` environment variable.)
|
171
172
|
* `google_json_key_location` - The location of the JSON private key file matching your
|
172
173
|
Service Account.
|
173
174
|
(Can also be configured with `GOOGLE_JSON_KEY_LOCATION` environment variable.)
|
174
175
|
* `google_project_id` - The Project ID for your Google Cloud Platform account.
|
175
176
|
(Can also be configured with `GOOGLE_PROJECT_ID` environment variable.)
|
176
177
|
* `image` - The image name to use when booting your instance.
|
178
|
+
* `image_family` - Specify an "image family" to pull the latest image from. For example: `centos-7`
|
179
|
+
will pull the most recent CentOS 7 image. For more info, refer to
|
180
|
+
[Google Image documentation](https://cloud.google.com/compute/docs/images#image_families).
|
177
181
|
* `instance_group` - Unmanaged instance group to add the machine to. If one
|
178
182
|
doesn't exist it will be created.
|
179
183
|
* `instance_ready_timeout` - The number of seconds to wait for the instance
|
@@ -182,6 +186,7 @@ This provider exposes quite a few provider-specific configuration options:
|
|
182
186
|
* `disk_size` - The disk size in GB. The default is 10.
|
183
187
|
* `disk_name` - The disk name to use. If the disk exists, it will be reused, otherwise created.
|
184
188
|
* `disk_type` - Whether to use Standard disk or SSD disk. Use either `pd-ssd` or `pd-standard`.
|
189
|
+
* `autodelete_disk` - Boolean whether to delete the disk when the instance is deleted or not. Default is true.
|
185
190
|
* `metadata` - Custom key/value pairs of metadata to add to the instance.
|
186
191
|
* `name` - The name of your instance. The default is "i-yyyymmddhh-randomsd",
|
187
192
|
e.g. 10/08/2015 13:15:15 is "i-2015081013-15637fda".
|
@@ -189,13 +194,14 @@ This provider exposes quite a few provider-specific configuration options:
|
|
189
194
|
"default".
|
190
195
|
* `subnetwork` - The name of the subnetwork to use for the instance.
|
191
196
|
* `tags` - An array of tags to apply to this instance.
|
197
|
+
* `labels` - Custom key/value pairs of labels to add to the instance.
|
192
198
|
* `zone` - The zone name where the instance will be created.
|
193
199
|
* `can_ip_forward` - Boolean whether to enable IP Forwarding.
|
194
200
|
* `external_ip` - The external IP address to use (supports names). Set to `false` to not assign an external address.
|
195
201
|
* `use_private_ip` - Boolean whether to use private IP for SSH/provisioning. Default is false.
|
196
202
|
* `preemptible` - Boolean whether to enable preemptibility. Default is false.
|
197
203
|
* `auto_restart` - Boolean whether to enable auto_restart. Default is true.
|
198
|
-
* `on_host_maintenance` - What to do on host maintenance. Default is
|
204
|
+
* `on_host_maintenance` - What to do on host maintenance. Can be set to `MIGRATE` or `TERMINATE` Default is `MIGRATE`.
|
199
205
|
* `service_accounts` or `scopes` - An array of OAuth2 account scopes for
|
200
206
|
services that the instance will have access to. Those can be both full API
|
201
207
|
scopes, just endpoint aliases (the part after `...auth/`), and `gcloud`
|
@@ -236,7 +242,7 @@ Vagrant.configure("2") do |config|
|
|
236
242
|
|
237
243
|
google.zone_config "us-central1-f" do |zone1f|
|
238
244
|
zone1f.name = "testing-vagrant"
|
239
|
-
zone1f.image = "debian-8-jessie-
|
245
|
+
zone1f.image = "debian-8-jessie-v20180307"
|
240
246
|
zone1f.machine_type = "n1-standard-4"
|
241
247
|
zone1f.zone = "us-central1-f"
|
242
248
|
zone1f.metadata = {'custom' => 'metadata', 'testing' => 'foobarbaz'}
|
@@ -262,13 +268,9 @@ emit a warning, but will otherwise boot the GCE machine.
|
|
262
268
|
|
263
269
|
## Synced Folders
|
264
270
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
machine over SSH.
|
269
|
-
|
270
|
-
This is good enough for all built-in Vagrant provisioners (`shell`, `chef`, and
|
271
|
-
`puppet`) to work!
|
271
|
+
Since plugin version 2.0, this is implemented via built-in `SyncedFolders` action.
|
272
|
+
See Vagrant's [rsync action](https://www.vagrantup.com/docs/synced-folders/rsync.html)
|
273
|
+
documentation for more info.
|
272
274
|
|
273
275
|
## Development
|
274
276
|
|