vcloud-launcher 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/LICENSE.txt +1 -1
- data/README.md +23 -11
- data/lib/vcloud/launcher/preamble.rb +2 -0
- data/lib/vcloud/launcher/schema/vm.rb +1 -0
- data/lib/vcloud/launcher/version.rb +1 -1
- data/lib/vcloud/launcher/vm_orchestrator.rb +1 -1
- data/spec/vcloud/launcher/vm_orchestrator_spec.rb +2 -2
- data/vcloud-launcher.gemspec +1 -1
- metadata +62 -24
- data/spec/integration/README.md +0 -40
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 1.1.0 (2015-07-09)
|
2
|
+
|
3
|
+
- Add optional MAC address to the schema for a VM
|
4
|
+
- Only run guest customization when there is something to customise
|
5
|
+
- Fix bug where OpenStruct must be explicity required
|
6
|
+
- Bump dependency on vcloud-core from 1.0.0 to 1.1.0
|
7
|
+
|
1
8
|
## 1.0.0 (2015-01-22)
|
2
9
|
|
3
10
|
- Release 1.0.0 since the public API is now stable.
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2014
|
3
|
+
Copyright (c) 2014 Crown Copyright (Government Digital Service)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
data/README.md
CHANGED
@@ -79,22 +79,34 @@ If you want to be sure you are pinning to 5.1, or use 5.5, you can set the API v
|
|
79
79
|
|
80
80
|
`export EXCON_DEBUG=true` - this will print out the API requests and responses.
|
81
81
|
|
82
|
-
`export DEBUG=true` - this will show you the stack trace when there is an exception instead of just the message.
|
83
|
-
|
84
82
|
## Testing
|
85
83
|
|
86
84
|
Run the default suite of tests (e.g. lint, unit, features):
|
87
85
|
|
88
86
|
bundle exec rake
|
89
87
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
88
|
+
There are also integration tests. These are slower and require a real environment.
|
89
|
+
See the [vCloud Tools website](http://gds-operations.github.io/vcloud-tools/testing/) for details of how to set up and run the integration tests.
|
90
|
+
|
91
|
+
The parameters required to run the vCloud Launcher integration tests are:
|
92
|
+
|
93
|
+
````
|
94
|
+
default: # This is the fog credential that refers to your testing environment, e.g. `test_credential`
|
95
|
+
vdc_1_name: # The name of a VDC
|
96
|
+
vdc_2_name: # The name of another VDC - you need two in your organisation to run these tests
|
97
|
+
catalog: # A catalog
|
98
|
+
vapp_template: # A vApp Template within that catalog
|
99
|
+
network_1: # The name of the primary network
|
100
|
+
network_1_ip: # The IP address of the primary network
|
101
|
+
network_2: # The name of a secondary network
|
102
|
+
network_2_ip: # The IP address of the secondary network
|
103
|
+
storage_profile: # The name of a storage profile (not the default)
|
104
|
+
default_storage_profile_name: # The name of the default storage profile
|
105
|
+
default_storage_profile_href: # The href of the default storage profile
|
106
|
+
vdc_1_storage_profile_href: # The href of `storage_profile` in `vdc_1`
|
107
|
+
vdc_2_storage_profile_href: # The href of `storage_profile` in `vdc_2`
|
108
|
+
````
|
109
|
+
|
110
|
+
There is an additional rake task on vCloud Launcher that runs the integration tests minus some that are very slow:
|
95
111
|
|
96
112
|
bundle exec rake integration:quick
|
97
|
-
|
98
|
-
You need access to a suitable vCloud Director organization to run the
|
99
|
-
integration tests. See the [integration tests README](/spec/integration/README.md) for
|
100
|
-
further details.
|
@@ -23,7 +23,7 @@ module Vcloud
|
|
23
23
|
|
24
24
|
preamble = vm_config[:bootstrap] ? generate_preamble(vm_config) : ''
|
25
25
|
|
26
|
-
@vm.configure_guest_customization_section(preamble)
|
26
|
+
@vm.configure_guest_customization_section(preamble) unless preamble.nil? || preamble.empty?
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
@@ -136,8 +136,8 @@ describe Vcloud::Launcher::VmOrchestrator do
|
|
136
136
|
subject.customize(vm_config_without_bootstrap)
|
137
137
|
end
|
138
138
|
|
139
|
-
it "
|
140
|
-
expect(vm).
|
139
|
+
it "skips customization if nothing to customize" do
|
140
|
+
expect(vm).not_to receive(:configure_guest_customization_section)
|
141
141
|
subject.customize(vm_config_without_bootstrap)
|
142
142
|
end
|
143
143
|
end
|
data/vcloud-launcher.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.required_ruby_version = '>= 1.9.3'
|
22
22
|
|
23
|
-
s.add_runtime_dependency 'vcloud-core', '~> 1.
|
23
|
+
s.add_runtime_dependency 'vcloud-core', '~> 1.1.0'
|
24
24
|
s.add_development_dependency 'gem_publisher', '1.2.0'
|
25
25
|
s.add_development_dependency 'pry'
|
26
26
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcloud-launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,33 +9,43 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vcloud-core
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.0
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: gem_publisher
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
|
-
- - =
|
35
|
+
- - '='
|
31
36
|
- !ruby/object:Gem::Version
|
32
37
|
version: 1.2.0
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.2.0
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: pry
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: rake
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: '0'
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: rspec
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ~>
|
@@ -65,10 +85,15 @@ dependencies:
|
|
65
85
|
version: 2.14.1
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 2.14.1
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: rubocop
|
71
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
98
|
requirements:
|
74
99
|
- - ~>
|
@@ -76,10 +101,15 @@ dependencies:
|
|
76
101
|
version: 0.23.0
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.23.0
|
80
110
|
- !ruby/object:Gem::Dependency
|
81
111
|
name: simplecov
|
82
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
114
|
requirements:
|
85
115
|
- - ~>
|
@@ -87,10 +117,15 @@ dependencies:
|
|
87
117
|
version: 0.7.1
|
88
118
|
type: :development
|
89
119
|
prerelease: false
|
90
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.7.1
|
91
126
|
- !ruby/object:Gem::Dependency
|
92
127
|
name: vcloud-tools-tester
|
93
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
94
129
|
none: false
|
95
130
|
requirements:
|
96
131
|
- - ~>
|
@@ -98,7 +133,12 @@ dependencies:
|
|
98
133
|
version: 1.0.0
|
99
134
|
type: :development
|
100
135
|
prerelease: false
|
101
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.0.0
|
102
142
|
description:
|
103
143
|
email:
|
104
144
|
- anna.shipman@digital.cabinet-office.gov.uk
|
@@ -136,7 +176,6 @@ files:
|
|
136
176
|
- lib/vcloud/launcher/vm_orchestrator.rb
|
137
177
|
- scripts/basic.erb
|
138
178
|
- spec/erb_helper.rb
|
139
|
-
- spec/integration/README.md
|
140
179
|
- spec/integration/launcher/data/basic_preamble_test.erb
|
141
180
|
- spec/integration/launcher/data/false_cmd
|
142
181
|
- spec/integration/launcher/data/happy_path.yaml.erb
|
@@ -177,16 +216,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
216
|
version: '0'
|
178
217
|
segments:
|
179
218
|
- 0
|
180
|
-
hash:
|
219
|
+
hash: 3247835755938666789
|
181
220
|
requirements: []
|
182
221
|
rubyforge_project:
|
183
|
-
rubygems_version: 1.8.
|
222
|
+
rubygems_version: 1.8.23
|
184
223
|
signing_key:
|
185
224
|
specification_version: 3
|
186
225
|
summary: Tool to launch and configure vCloud vApps
|
187
226
|
test_files:
|
188
227
|
- spec/erb_helper.rb
|
189
|
-
- spec/integration/README.md
|
190
228
|
- spec/integration/launcher/data/basic_preamble_test.erb
|
191
229
|
- spec/integration/launcher/data/false_cmd
|
192
230
|
- spec/integration/launcher/data/happy_path.yaml.erb
|
data/spec/integration/README.md
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# Running vCloud Launcher Integration Tests
|
2
|
-
|
3
|
-
## Prerequisites
|
4
|
-
|
5
|
-
- Access to a suitable vCloud Director organisation.
|
6
|
-
|
7
|
-
**NB** It is not safe to run them against an environment that is in use (e.g. production, preview) as
|
8
|
-
many of the tests clear down all config at the beginning and/or end to ensure the environment is as
|
9
|
-
the tests expect.
|
10
|
-
|
11
|
-
- A config file with the settings configured.
|
12
|
-
|
13
|
-
There is a [template file](/spec/integration/vcloud_tools_testing_config.yaml.template) to help with this. Copy the template file to `/spec/integration` (i.e. next to the template file) and remove the `.template`. This file will now be ignored by Git and you can safely add the parameters relevant to your environment.
|
14
|
-
|
15
|
-
- You need to include the set-up for your testing environment in your [fog file](https://github.com/gds-operations/vcloud-launcher#credentials).
|
16
|
-
|
17
|
-
- The tests use the [vCloud Tools Tester](http://rubygems.org/gems/vcloud-tools-tester) gem. You do not need to install this, `bundler` will do this for you.
|
18
|
-
|
19
|
-
## Parameters
|
20
|
-
|
21
|
-
````
|
22
|
-
default: # This is the fog credential that refers to your testing environment, e.g. `test_credential`
|
23
|
-
vdc_1_name: # The name of a VDC
|
24
|
-
vdc_2_name: # The name of another VDC - you need two in your organisation to run these tests
|
25
|
-
catalog: # A catalog
|
26
|
-
vapp_template: # A vApp Template within that catalog
|
27
|
-
network_1: # The name of the primary network
|
28
|
-
network_1_ip: # The IP address of the primary network
|
29
|
-
network_2: # The name of a secondary network
|
30
|
-
network_2_ip: # The IP address of the secondary network
|
31
|
-
storage_profile: # The name of a storage profile (not the default)
|
32
|
-
default_storage_profile_name: # The name of the default storage profile
|
33
|
-
default_storage_profile_href: # The href of the default storage profile
|
34
|
-
vdc_1_storage_profile_href: # The href of `storage_profile` in `vdc_1`
|
35
|
-
vdc_2_storage_profile_href: # The href of `storage_profile` in `vdc_2`
|
36
|
-
````
|
37
|
-
|
38
|
-
## To run the tests
|
39
|
-
|
40
|
-
`FOG_CREDENTIAL=test_credential bundle exec integration`
|