dopv 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/.rspec +2 -0
  4. data/ChangeLog.md +456 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +260 -0
  7. data/Guardfile +22 -0
  8. data/LICENSE.txt +177 -0
  9. data/README.md +214 -0
  10. data/Rakefile +6 -0
  11. data/bin/dopv +4 -0
  12. data/dopv.gemspec +52 -0
  13. data/lib/dopv.rb +166 -0
  14. data/lib/dopv/cli.rb +54 -0
  15. data/lib/dopv/cli/command_add.rb +37 -0
  16. data/lib/dopv/cli/command_export.rb +26 -0
  17. data/lib/dopv/cli/command_import.rb +32 -0
  18. data/lib/dopv/cli/command_list.rb +18 -0
  19. data/lib/dopv/cli/command_remove.rb +29 -0
  20. data/lib/dopv/cli/command_run.rb +38 -0
  21. data/lib/dopv/cli/command_update.rb +35 -0
  22. data/lib/dopv/cli/command_validate.rb +30 -0
  23. data/lib/dopv/infrastructure.rb +40 -0
  24. data/lib/dopv/infrastructure/providers/baremetal.rb +12 -0
  25. data/lib/dopv/infrastructure/providers/base.rb +422 -0
  26. data/lib/dopv/infrastructure/providers/openstack.rb +308 -0
  27. data/lib/dopv/infrastructure/providers/ovirt.rb +228 -0
  28. data/lib/dopv/infrastructure/providers/vsphere.rb +322 -0
  29. data/lib/dopv/log.rb +14 -0
  30. data/lib/dopv/persistent_disk.rb +128 -0
  31. data/lib/dopv/plan.rb +17 -0
  32. data/lib/dopv/state_store.rb +87 -0
  33. data/lib/dopv/version.rb +3 -0
  34. data/spec/data/hooks/test_hook_script_1 +9 -0
  35. data/spec/data/hooks/test_hook_script_2 +10 -0
  36. data/spec/data/plans/test-plan-1.yaml +140 -0
  37. data/spec/spec_helper.rb +112 -0
  38. data/spec/unit/dopv/dopv_spec.rb +7 -0
  39. data/spec/unit/dopv/persistent_disk_spec.rb +38 -0
  40. data/spec/unit/dopv/plan_spec.rb +34 -0
  41. data/spec/unit/dopv/version_spec.rb +17 -0
  42. metadata +401 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 04b5fc85ce634cdb291b2a38bb329278f5124764
4
+ data.tar.gz: 2907715f813769b45dfdeb1cce85c569e6d146b5
5
+ SHA512:
6
+ metadata.gz: d2ebca4cb926ef33f761f860d1b854ce7201e2bfc64c909ef691f4754c021f0b2385f4716214b4838ec0896fbfddfea76e458fef97ab6c2a0c075105a1f84562
7
+ data.tar.gz: 7e0d5be2228cd57889fff41bca94d606d767c53edb875a615ac5ef614b6a4138a677566b703c9b6c7ded73256380286cbdd03c2a52487eda5da5263ec9ac6fc0
@@ -0,0 +1,23 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ # Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.sw[po]
19
+ vendor
20
+ tags
21
+ gems.tags
22
+ TAGS
23
+ .byebug*
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,456 @@
1
+ # 0.11.0 29.03.2017
2
+ ## [general]
3
+ * Split log files by nodes
4
+ * Prevent crash when a plan was deployed with an older version
5
+
6
+ ## [cli]
7
+ * Logfile options are now the same as in dopi
8
+ * The output format is now smaller by default. The old behaviour where the log entry contained
9
+ the code line of the message can be activated with the "--trace" flag.
10
+
11
+ # 0.10.1 08.03.2017
12
+
13
+ ## [cli]
14
+ * Add a resfresh command to update node information in the local state store
15
+ * Make sure the plan exists for deploy/undeploy/refresh commands
16
+
17
+ ## [general]
18
+ * Make sure the ip list in the state store is clean
19
+
20
+ # 0.10.0 22.02.2017
21
+
22
+ ## [base]
23
+ * Implement `erase_node_instance`
24
+
25
+ ## [vsphere]
26
+ * Implement `get_node_ip_addresses`
27
+
28
+ # 0.9.0 15.02.2017
29
+ ## [base]
30
+ * Implement node state recording
31
+
32
+ ## [openstack]
33
+ * Implement `get_node_ip_addresses`
34
+
35
+ ## [plan]
36
+ * Plan updates for l13ch and lab1ch
37
+
38
+ # 0.8.1 14.02.2017
39
+
40
+ ## [vsphere]
41
+ * Remove obsolete `searchdomains` method
42
+ * Move vsphere-related delegators into `VSPhere` class
43
+
44
+ # 0.8.0 02.02.2017
45
+
46
+ ## [plan]
47
+ * Use the preprocessor in the validation method
48
+
49
+ ## [cli]
50
+ * Removed deprecated options
51
+
52
+ ## [general]
53
+ * Parallelization impelentation
54
+ * Implement common configuration
55
+
56
+ ## [deps]
57
+ * Update of `dop_common`
58
+
59
+ # 0.7.3 21.12.2016
60
+
61
+ ## [log]
62
+ * Do not write color escape sequences into log files.
63
+
64
+ ## [cli]
65
+ * Deprecate required options in favor of arguments in order to make dopv cli
66
+ consistent with dopi's one
67
+
68
+ ## [plan]
69
+ * Make sure the plan update is automatically ignored for now and update on add
70
+ as well
71
+
72
+ ## [general]
73
+ * Implement console rake target
74
+
75
+ ## [spec]
76
+ * Implement basic rspec framework
77
+ * Implement basic tests of:
78
+ * `Dopv`
79
+ * `Dopv::VERSION`
80
+ * `Dopv::Plan`
81
+ * `Dopv::PersistentDisk::Entry`
82
+
83
+ # 0.7.2 07.12.2016
84
+ * Update `dop_common` and update required parts of `dopv` code
85
+
86
+ # 0.7.1 06.12.2016
87
+ * Update `dop_common`
88
+
89
+ # 0.7.0 06.12.2016
90
+
91
+ ## [doc]
92
+ * Update documentation
93
+
94
+ ## [general]
95
+ * Basic node filtering implemented
96
+
97
+ # 0.6.0 05.12.2016
98
+
99
+ ## [deps]
100
+ * Update `dop_common`
101
+
102
+ ## [base]
103
+ * Implement hooks
104
+
105
+ # 0.5.1 29.11.2016
106
+
107
+ ## [deps]
108
+ * Update `dop_common`
109
+
110
+ # 0.5.0 21.11.2016
111
+
112
+ ## [plan]
113
+ * Plan store implemented
114
+
115
+ ## [cli]
116
+ * CLI redesign
117
+
118
+ ## [general]
119
+ * Minor fixes
120
+
121
+
122
+ # 0.4.1 15.11.2016
123
+ * Revert `#895e4cdbf65`
124
+ * Reimplement logging
125
+ * Update to `dop_common` 0.9.1
126
+
127
+ ## [disk db]
128
+ * Update the disk DB to use `dop_common` plan store while keeping the
129
+ possibility to dump the file.
130
+
131
+ # 0.4.0 14.11.2016
132
+
133
+ ## [plan]
134
+ * Replaced with DopCommon parser v0.9.0
135
+
136
+ ## [ovirt]
137
+ * Use common parser
138
+
139
+ ## [openstack]
140
+ * Use common parser
141
+
142
+ ## [vsphere]
143
+ * Use common parser
144
+
145
+ # 0.3.9 06.11.2016
146
+
147
+ ## [openstack]
148
+ * Fix security groups removal
149
+ * Make sure floating IPs and network ports are removed before the node is
150
+ destroyed, otherwise the process leaves orphan network ports during
151
+ udeployment
152
+
153
+ # 0.3.8 02.11.2016
154
+
155
+ ## [plan]
156
+ * Improve parser
157
+ * Implement `domain_id` and `endpoint_type` infrastructure properties that
158
+ are required for openstack providers. The `domain_id` defaults to
159
+ `default` and the `endpoint_type` defaults to `publicURL`.
160
+
161
+ ## [openstack]
162
+ * Implement `provider_domain_id` and `provider_endpoint_type`
163
+
164
+ # 0.3.7 01.11.2016
165
+
166
+ ## [dependencies]
167
+ * Update to fog-1.36.0
168
+
169
+ ## [openstack]
170
+ * Use `openstack_project_name` instead of `openstack_tenant`.
171
+ * Use `openstack_domain_id`; `default` is used if it isn't specified.
172
+ * Remove `volume_provider` and use compute's volumes instead as it saves some
173
+ API calls.
174
+
175
+ # 0.3.6 17.10.2016
176
+
177
+ ## [dependencies]
178
+ * Use fog_profitbricks version that is compatible with ruby 1.9.x
179
+
180
+ # 0.3.5 21.09.2016
181
+
182
+ ## [plan]
183
+ * Fix that not all infrastructure_properties are required by providers
184
+
185
+ # 0.3.4 01.09.2016
186
+
187
+ ## [plan]
188
+ * Better error messages for infrastructure_properties validation.
189
+ * Implement support for security groups.
190
+
191
+ ## [openstack]
192
+ * Implement support for security groups.
193
+
194
+ # 0.3.3 24.08.2016
195
+
196
+ ## [samples]
197
+ * Include plan and disk DB for lab10ch.
198
+
199
+ ## [ovirt]
200
+ * Update rbovrit to fix cloudinit issues with multiple nameserver entries.
201
+
202
+ # 0.3.2 04.08.2016
203
+
204
+ ## [general]
205
+ * Better support for pry integration.
206
+ * Support for ruby193 and ruby22x.
207
+
208
+ # 0.3.1 03.08.2016
209
+
210
+ ## [ovirt]
211
+ * Automatically choose the first network, rather than a hardcoded one.
212
+
213
+ # 0.3.0 20.06.2016
214
+
215
+ ## [general]
216
+ * Drop support for ruby 1.9.3 in favor of 2.2+
217
+
218
+ # 0.2.8 14.06.2016
219
+
220
+ ## [plan]
221
+ * Make sure that `use_config_drive` is set to `true` if not present in node's
222
+ definition.
223
+
224
+ # 0.2.7 08.06.2016
225
+
226
+ ## [plan]
227
+ * Allow networks without a default gateway. Must set `ip_defgw` to `false` AND
228
+ `set_defaultgw` to `false` on a host level.
229
+
230
+ # 0.2.6 06.05.2016
231
+
232
+ ## [ovirt]
233
+ * `stop_node_instance` - wait until the node is down
234
+
235
+ ## [dependencies]
236
+ * Updated to use rbovirt-0.1.1
237
+
238
+ ## [plan]
239
+ * Implement `use_config_drive` infrastructure property. By default it is set to
240
+ `true`, i.e. to use config drive.
241
+
242
+ ## [openstack]
243
+ * Implement `config_drive?` method for switching the config drive on and off
244
+
245
+ # 0.2.5 11.01.2016
246
+
247
+ ## plan
248
+ * implement deprecation warning if no `ip` is defined for a network interface.
249
+ Please note that valid IP definitions are:
250
+ * valid IP string
251
+ * dhcp string
252
+ * none string
253
+
254
+ # 0.2.4 07.12.2015
255
+
256
+ ## plan
257
+ * make sure `{}` is accepted as a valid network entry
258
+ * implement newer definition of credentials
259
+ * support `nil` network definitions for backward compatibility
260
+
261
+ # 0.2.3 06.11.2015
262
+
263
+ ## [ovirt]
264
+ * implement default storage domain for root and data disks. This can be used to
265
+ specify which storage domain should be used for disks defined by the template
266
+ during provisioning of VM.
267
+ * Bundle rbovrit with cloud-init fix for RHEV 3.5.5 and above.
268
+
269
+ # 0.2.2 20.10.2015
270
+ ## [cli]
271
+ * improve error handling
272
+
273
+ ## [plan]
274
+ * make stricter validation of node's interfaces
275
+
276
+ ## [ovirt]
277
+ * implement management of additional NICs via cloud-init
278
+
279
+
280
+ # 0.2.1 18.08.2015
281
+ ## [core]
282
+ * Remove `lib/infrastructure/core.rb`. Move things into `lib/infrastructure.rb`
283
+
284
+ ## [doc]
285
+ * Update documentation
286
+
287
+ ## [general]
288
+ * Implement _undeploy_ action that removes a deployment according to a plan and
289
+ optionally removes also data volumes on a target cloud provider as well as
290
+ from persistent volumes database
291
+
292
+ ## [persistent_disk]
293
+ * Refactor of `PersistenDisk#update` and `PersistentDisk#delete` methods
294
+
295
+ ## [infrastructure]
296
+ * Refactor dynamic provider loader
297
+ * Simplify provider supported types and provider to class name lookups
298
+ * Fix broken memory definition of xlarge flavor
299
+
300
+ ## [base]
301
+ * `add_node_nic` returns freshly created nic object
302
+
303
+ ## [ovirt]
304
+ * `add_node_nic` returns freshly created nic object
305
+
306
+ ## [openstack]
307
+ * Wait until the node is down in `Infrastructure::OpenStack#stop_node_instance`
308
+ * Implement `manage_etc_hosts` in `Infrastructure::OpenStack#cloud_config`
309
+
310
+ # 0.2.0 23.07.2015
311
+
312
+ ## [core]
313
+ * Implement GLI parser for dopv command line tool
314
+ * Implement `exit_code` method to PlanError and ProviderError
315
+ * Fix parsing of `caller` in `Dopv::log_init` method
316
+ * Update to fog-1.31.0
317
+ * Update rhosapi-lab15ch deployment plan
318
+
319
+
320
+ # 0.1.1 22.07.2015
321
+ ## [openstack]
322
+ * Floating IP implementation
323
+
324
+ # 0.1.0 14.07.2015
325
+
326
+ ## [general]
327
+ New major release with rewritten infrastructure code base and bare metal and
328
+ openstack cloud providers
329
+
330
+ Following has been refactored:
331
+ * Infrastructure refactoring
332
+ * Unified method names and variables
333
+ * Ready to use destroy_* methods hence implementation of destroying of
334
+ deployment can be done easily
335
+ * Fixes in data disks manipulation routines
336
+
337
+ * Plan refactoring
338
+ * More information has been added to error messages in infrastructure and
339
+ network validation part
340
+
341
+ * General refactoring
342
+ * Error messages moved to appropriate modules
343
+
344
+ ## [plan]
345
+ * Simplify plan parser
346
+ * remove superfluos conditional statements in assignments of node properties
347
+ * do not evaluate networks definition for bare metal
348
+
349
+ ## [base]
350
+ * Add `set_gateway?` method
351
+ * Fix detachment of disks in destroy method
352
+
353
+ ## [openstack]
354
+ * Flavor method returns m1.medium as a flavor, hence the flavor keyword may be
355
+ optional
356
+ * change instance to node_instance in `wait_for_task_completion` method to keep
357
+ parameters consistent accross codebase
358
+ * Add openstack node customization
359
+ * Fix appending nil class to string
360
+ * Add support for customization
361
+ * Implement networking support. No floating IPs yet
362
+ * Fix syntax error in `add_network_port`
363
+ * Add initial network handling
364
+ * Initial implementation of openstack provider
365
+
366
+ ## [vsphere]
367
+ * Reword `apikey` keyword to `provider_pubkey_hash`
368
+ * Add automatic public key hash retrieval so that `provider_pubkey_hash` is
369
+ optional
370
+
371
+
372
+ # 0.0.20 29.06.2015
373
+
374
+ ## [vsphere]
375
+ * Fix NIC creation in VCenters with multiple DCs -> `:datacenter =>
376
+ vm.datacenter` is passed during NIC creation
377
+ [CLOUDDOPE-891](https://issue.swisscom.ch/browse/CLOUDDOPE-891)
378
+
379
+ # 0.0.20 23.06.2015
380
+
381
+ ## [parser]
382
+ * Improved network definition checks in infrastructures. They are checked as
383
+ in case they are defined thus baremetal may have network definitions as well
384
+ for future
385
+
386
+ # 0.0.19 23.06.2015
387
+
388
+ ## [parser]
389
+ * Make infrastructure credentials optional (defaults to `nil`)
390
+ * Make infrastructure endpoint optional (defaults to `nil`)
391
+ * Do not check for network definitions when the provider is *baremetal*
392
+
393
+ ## [baremetal]
394
+ * Fix wrong number of parameters error
395
+
396
+ # 0.0.18 18.06.2015
397
+
398
+ ## [ovirt]
399
+ * Support provisioning mechanism, i.e. tnin and/or thick provisioning of data
400
+ disks [CLOUDDOPE-873](https://issue.swisscom.ch/browse/CLOUDDOPE-873)
401
+
402
+ # 0.0.17 17.06.2015
403
+
404
+ ## [baremetal]
405
+ * Fix missing provider file for metal infrastructures
406
+ [CLOUDDOPE-828](https://issue.swisscom.ch/browse/CLOUDDOPE-828)
407
+
408
+ # 0.0.16 05.06.2015
409
+
410
+ ## [parser]
411
+ * Make `interfaces` and `image` of a node configuration hash optional
412
+
413
+ ## [baremetal]
414
+ * New provider for bare metal infrastructures
415
+ [CLOUDDOPE-828](https://issue.swisscom.ch/browse/CLOUDDOPE-828)
416
+
417
+ # 0.0.15 08.05.2015
418
+
419
+ ## [vsphere]
420
+ * Fix removal of empty interface list in add_interfaces
421
+ [CLOUDDOPE-732](https://issue.swisscom.ch/browse/CLOUDDOPE-732)
422
+
423
+ # 0.0.14 05.05.2015
424
+
425
+ ## [general]
426
+ * Fixed `can't convert nil into String` when no disk db file is given
427
+ [CLOUDDOPE-723](https://issue.swisscom.ch/browse/CLOUDDOPE-723)
428
+
429
+ # 0.0.13 01.05.2015
430
+
431
+ ## [general]
432
+ * Updated fog to 1.29.0
433
+ * Updated rbovirt to upstream@f4ff2b8daf89
434
+ * Removed obsolete deployment plans
435
+ * Added new example deployment plans
436
+
437
+ ## [parser]
438
+ * Added support for `virtual_switch`
439
+ * Updated error messages in `plan.rb`
440
+ * Fixed handling of `ip` record of a node
441
+
442
+ ## [vsphere]
443
+ * Added support for DVS -> the DV switch is defined by `virtual_switch`
444
+ property
445
+
446
+ # 0.0.12 28.04.2015
447
+
448
+ ## [parser]
449
+ * Added support for `dest_folder`
450
+
451
+ ## [rbovirt]
452
+ * None
453
+
454
+ ## [vsphere]
455
+ * Added support for `dest_folder`
456
+ * Added support for `default_pool`