chef-provisioning-opennebula 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +532 -0
- data/Rakefile +6 -0
- data/lib/chef/provider/one_image.rb +244 -0
- data/lib/chef/provider/one_template.rb +95 -0
- data/lib/chef/provider/one_user.rb +105 -0
- data/lib/chef/provider/one_vnet.rb +122 -0
- data/lib/chef/provider/one_vnet_lease.rb +133 -0
- data/lib/chef/provisioning/driver_init/opennebula.rb +17 -0
- data/lib/chef/provisioning/opennebula_driver.rb +18 -0
- data/lib/chef/provisioning/opennebula_driver/credentials.rb +105 -0
- data/lib/chef/provisioning/opennebula_driver/driver.rb +572 -0
- data/lib/chef/provisioning/opennebula_driver/one_lib.rb +352 -0
- data/lib/chef/provisioning/opennebula_driver/resources.rb +20 -0
- data/lib/chef/provisioning/opennebula_driver/version.rb +30 -0
- data/lib/chef/resource/one_image.rb +65 -0
- data/lib/chef/resource/one_template.rb +46 -0
- data/lib/chef/resource/one_user.rb +50 -0
- data/lib/chef/resource/one_vnet.rb +51 -0
- data/lib/chef/resource/one_vnet_lease.rb +46 -0
- data/spec/integration/test_all_integration_spec.rb +102 -0
- data/spec/recipes/attach_back_one_vm_spec.rb +20 -0
- data/spec/recipes/attach_back_two_vm_spec.rb +20 -0
- data/spec/recipes/attach_one_image_spec.rb +20 -0
- data/spec/recipes/converge_back_one_vm_spec.rb +19 -0
- data/spec/recipes/converge_back_two_vm_spec.rb +19 -0
- data/spec/recipes/converge_bootstrap_vm_spec.rb +34 -0
- data/spec/recipes/create_back_one_vm_spec.rb +20 -0
- data/spec/recipes/create_back_two_vm_spec.rb +20 -0
- data/spec/recipes/create_bootstrap_vm_spec.rb +34 -0
- data/spec/recipes/create_one_image_spec.rb +21 -0
- data/spec/recipes/create_one_template_spec.rb +52 -0
- data/spec/recipes/delete_all_spec.rb +47 -0
- data/spec/recipes/driver_options_spec.rb +70 -0
- data/spec/recipes/instantiate_one_template_spec.rb +35 -0
- data/spec/recipes/snapshot_one_image_spec.rb +21 -0
- data/spec/recipes/snapshot_two_image_spec.rb +21 -0
- data/spec/spec_helper.rb +35 -0
- data/spec/support/opennebula_support.rb +64 -0
- metadata +168 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
machine "OpenNebula-back-2-vm" do
|
18
|
+
from_image "OpenNebula-snap-2-img"
|
19
|
+
action :ready
|
20
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
machine "OpenNebula-bootstrap-vm" do
|
18
|
+
machine_options :bootstrap_options => ({
|
19
|
+
:user_variables => {'MEMORY' => '2048', 'CONTEXT/TEST' => 'test'},
|
20
|
+
:template_name => 'OpenNebula-test-tpl'
|
21
|
+
}),
|
22
|
+
:ssh_user => 'local',
|
23
|
+
:ssh_options => {
|
24
|
+
:keys_only => false,
|
25
|
+
:forward_agent => true,
|
26
|
+
:use_agent => true,
|
27
|
+
:user_known_hosts_file => '/dev/null'
|
28
|
+
},
|
29
|
+
:ssh_execute_options => {
|
30
|
+
:prefix => 'sudo '
|
31
|
+
},
|
32
|
+
:cached_installer => true
|
33
|
+
action :ready
|
34
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
one_image "OpenNebula-bootstrap-img" do
|
18
|
+
size 2048
|
19
|
+
datastore_id 103
|
20
|
+
action :create
|
21
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
home = "#{ENV['HOME']}".dup
|
18
|
+
httpbase = "#{ENV['ONE_HTTPBASE']}".dup
|
19
|
+
|
20
|
+
one_template "OpenNebula-test-tpl" do
|
21
|
+
template ({
|
22
|
+
"HTTPBASE" => "#{httpbase}",
|
23
|
+
"MEMORY" => "1024",
|
24
|
+
"CPU" => "1",
|
25
|
+
"VCPU" => "1",
|
26
|
+
"OS" => {
|
27
|
+
"ARCH" => "x86_64"
|
28
|
+
},
|
29
|
+
"DISK" => {
|
30
|
+
"IMAGE" => "Ubuntu-12.04.5-pre-prod-20141216",
|
31
|
+
"IMAGE_UNAME" => "m_plumb",
|
32
|
+
"DRIVER" => "qcow2"
|
33
|
+
},
|
34
|
+
"NIC" => {
|
35
|
+
"NETWORK" => "PUB-52-10.236",
|
36
|
+
"NETWORK_UNAME" => "neutrino"
|
37
|
+
},
|
38
|
+
"GRAPHICS" => {
|
39
|
+
"LISTEN" => "0.0.0.0",
|
40
|
+
"TYPE" => "vnc"
|
41
|
+
},
|
42
|
+
"CONTEXT" => {
|
43
|
+
"NETWORK" => "YES",
|
44
|
+
"HOSTNAME" => "$NAME",
|
45
|
+
"INSTALL_CHEF_CLIENT_COMMAND" => "dpkg -E -i /mnt/chef-client.deb",
|
46
|
+
"SSH_USER" => 'local',
|
47
|
+
"SSH_PUBLIC_KEY" => File.read("#{home}/.ssh/id_rsa.pub").strip,
|
48
|
+
"FILES" => "$HTTPBASE/01_chef $HTTPBASE/../chef-client.deb"
|
49
|
+
}
|
50
|
+
})
|
51
|
+
action :create
|
52
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
one_template "OpenNebula-test-tpl" do
|
18
|
+
action :delete
|
19
|
+
end
|
20
|
+
|
21
|
+
machine "OpenNebula-tpl-1-vm" do
|
22
|
+
action :destroy
|
23
|
+
end
|
24
|
+
|
25
|
+
machine "OpenNebula-bootstrap-vm" do
|
26
|
+
action :destroy
|
27
|
+
end
|
28
|
+
|
29
|
+
one_image "OpenNebula-bootstrap-img" do
|
30
|
+
action :destroy
|
31
|
+
end
|
32
|
+
|
33
|
+
machine "OpenNebula-back-1-vm" do
|
34
|
+
action :destroy
|
35
|
+
end
|
36
|
+
|
37
|
+
machine "OpenNebula-back-2-vm" do
|
38
|
+
action :destroy
|
39
|
+
end
|
40
|
+
|
41
|
+
one_image "OpenNebula-snap-1-img" do
|
42
|
+
action :destroy
|
43
|
+
end
|
44
|
+
|
45
|
+
one_image "OpenNebula-snap-2-img" do
|
46
|
+
action :destroy
|
47
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
endpoint = "#{ENV['ONE_XMLRPC']}".dup
|
18
|
+
home = "#{ENV['HOME']}".dup
|
19
|
+
auth = File.read(ENV['ONE_AUTH'])
|
20
|
+
httpbase = "#{ENV['ONE_HTTPBASE']}".dup
|
21
|
+
chef_repo_path = "#{ENV['CHEF_REPO_PATH']}".dup
|
22
|
+
|
23
|
+
with_driver "opennebula:#{endpoint}",
|
24
|
+
:credentials => "#{auth}"
|
25
|
+
|
26
|
+
with_machine_options :bootstrap_options => {
|
27
|
+
:template => {
|
28
|
+
"HTTPBASE" => "#{httpbase}",
|
29
|
+
"MEMORY" => "2048",
|
30
|
+
"CPU" => "1",
|
31
|
+
"VCPU" => "1",
|
32
|
+
"OS" => {
|
33
|
+
"ARCH" => "x86_64"
|
34
|
+
},
|
35
|
+
"DISK" => {
|
36
|
+
"IMAGE" => "Ubuntu-12.04.5-pre-prod-20141216",
|
37
|
+
"IMAGE_UNAME" => "m_plumb",
|
38
|
+
"DRIVER" => "qcow2"
|
39
|
+
},
|
40
|
+
"NIC" => {
|
41
|
+
"NETWORK" => "PUB-52-10.236",
|
42
|
+
"NETWORK_UNAME" => "neutrino"
|
43
|
+
},
|
44
|
+
"GRAPHICS" => {
|
45
|
+
"LISTEN" => "0.0.0.0",
|
46
|
+
"TYPE" => "vnc"
|
47
|
+
},
|
48
|
+
"CONTEXT" => {
|
49
|
+
"NETWORK" => "YES",
|
50
|
+
"HOSTNAME" => "$NAME",
|
51
|
+
"INSTALL_CHEF_CLIENT_COMMAND" => "dpkg -E -i /mnt/chef-client.deb",
|
52
|
+
"SSH_USER" => 'local',
|
53
|
+
"SSH_PUBLIC_KEY" => File.read("#{home}/.ssh/id_rsa.pub").strip,
|
54
|
+
"FILES" => "$HTTPBASE/01_chef $HTTPBASE/../chef-client.deb"
|
55
|
+
}
|
56
|
+
}
|
57
|
+
},
|
58
|
+
:ssh_user => 'local',
|
59
|
+
:ssh_options => {
|
60
|
+
:keys_only => false,
|
61
|
+
:forward_agent => true,
|
62
|
+
:use_agent => true,
|
63
|
+
:user_known_hosts_file => '/dev/null'
|
64
|
+
},
|
65
|
+
:ssh_execute_options => {
|
66
|
+
:prefix => 'sudo '
|
67
|
+
},
|
68
|
+
:cached_installer => true
|
69
|
+
|
70
|
+
with_chef_local_server :chef_repo_path => "#{chef_repo_path}"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
machine "OpenNebula-tpl-1-vm" do
|
18
|
+
machine_options :bootstrap_options => {
|
19
|
+
:template_name => "OpenNebula-test-tpl"
|
20
|
+
},
|
21
|
+
:ssh_user => 'local',
|
22
|
+
:ssh_options => {
|
23
|
+
:keys_only => false,
|
24
|
+
:forward_agent => true,
|
25
|
+
:use_agent => true,
|
26
|
+
:user_known_hosts_file => '/dev/null'
|
27
|
+
},
|
28
|
+
:ssh_execute_options => {
|
29
|
+
:prefix => 'sudo '
|
30
|
+
},
|
31
|
+
:cached_installer => true
|
32
|
+
run_list []
|
33
|
+
end
|
34
|
+
|
35
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
one_image "OpenNebula-snap-1-img" do
|
18
|
+
machine_id "OpenNebula-bootstrap-vm"
|
19
|
+
disk_id "OpenNebula-bootstrap-img"
|
20
|
+
action :snapshot
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/provisioning/opennebula_driver'
|
16
|
+
|
17
|
+
one_image "OpenNebula-snap-2-img" do
|
18
|
+
machine_id "OpenNebula-bootstrap-vm"
|
19
|
+
disk_id "OpenNebula-bootstrap-img"
|
20
|
+
action :snapshot
|
21
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'chef/dsl/recipe'
|
16
|
+
require 'chef/mixin/shell_out'
|
17
|
+
require 'chef/platform'
|
18
|
+
require 'chef/provisioning'
|
19
|
+
require 'chef/provisioning/opennebula_driver'
|
20
|
+
require 'chef/run_context'
|
21
|
+
require 'cheffish/rspec/matchers'
|
22
|
+
require 'opennebula'
|
23
|
+
require 'support/opennebula_support'
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
config.run_all_when_everything_filtered = true
|
27
|
+
config.filter_run :focus
|
28
|
+
config.before(:suite) do
|
29
|
+
Dir.mkdir("test-results") unless Dir.exists?("test-results")
|
30
|
+
Dir.glob("test-results/*").each do |file|
|
31
|
+
File.delete(file)
|
32
|
+
end
|
33
|
+
delete_all
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Copyright 2015, BlackBerry, Inc.
|
2
|
+
#
|
3
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
#you may not use this file except in compliance with the License.
|
5
|
+
#You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
#Unless required by applicable law or agreed to in writing, software
|
10
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
#See the License for the specific language governing permissions and
|
13
|
+
#limitations under the License.
|
14
|
+
|
15
|
+
require 'cheffish/rspec/chef_run_support'
|
16
|
+
require 'cheffish/rspec/matchers'
|
17
|
+
require 'chef/provisioning/opennebula_driver'
|
18
|
+
|
19
|
+
def chef_run(recipe)
|
20
|
+
chef_client = Mixlib::ShellOut.new("bundle exec chef-client -z ./spec/recipes/driver_options_spec.rb ./spec/recipes/#{recipe} --force-formatter", shellout_options({:timeout => 900}))
|
21
|
+
chef_client.run_command
|
22
|
+
chef_client.stdout
|
23
|
+
end
|
24
|
+
|
25
|
+
def shellout_options(options = {})
|
26
|
+
default_options = { :live_stream => STDOUT }
|
27
|
+
default_options.merge(options)
|
28
|
+
end
|
29
|
+
|
30
|
+
def delete_all
|
31
|
+
chef_run("delete_all_spec.rb")
|
32
|
+
end
|
33
|
+
|
34
|
+
# checks for runtime / idempotency-related errors in the stdout
|
35
|
+
def check_for_error(recipe, stdout, expected = nil, error = nil)
|
36
|
+
if stdout.include?("RuntimeError:")
|
37
|
+
return (stdout.split("RuntimeError:").last).split("\n").first
|
38
|
+
elsif stdout.include?("NoMethodError:")
|
39
|
+
return (stdout.split("NoMethodError:").last).split("\n").first
|
40
|
+
end
|
41
|
+
return nil if expected and stdout.include?(expected)
|
42
|
+
if recipe == "delete_all_spec.rb"
|
43
|
+
error_message = "A resource failed to delete successfully." if error and stdout.include?(error)
|
44
|
+
else
|
45
|
+
error_message = error if error and stdout.include?(error)
|
46
|
+
end
|
47
|
+
error_message
|
48
|
+
end
|
49
|
+
|
50
|
+
RSpec::Matchers.define :"converge_test_recipe" do |recipe, expected, error|
|
51
|
+
match do |recipe|
|
52
|
+
stdout = chef_run(recipe)
|
53
|
+
# logs each chef run
|
54
|
+
File.open("./test-results/#{File.basename(recipe, '.*')}_stdout.log", "w+") { |file| file.write(stdout) }
|
55
|
+
@error_message = check_for_error(recipe, stdout, expected, error)
|
56
|
+
# copies the stacktrace for tests that have failed
|
57
|
+
File.open("./test-results/#{File.basename(recipe, '.*')}_stacktrace.out", "w+") { |file| file.write(File.read("#{ENV['HOME']}/.chef/local-mode-cache/cache/chef-stacktrace.out")) } if @error_message
|
58
|
+
failed = true if @error_message
|
59
|
+
!failed
|
60
|
+
end
|
61
|
+
failure_message do
|
62
|
+
@error_message
|
63
|
+
end
|
64
|
+
end
|
metadata
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chef-provisioning-opennebula
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew J. Brown
|
8
|
+
- Bogdan Buczynski
|
9
|
+
- Evgeny Yurchenko
|
10
|
+
- Phil Oliva
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: chef
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: chef-provisioning
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0.15'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.15'
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: opennebula
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '4.10'
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '4.14'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '4.10'
|
61
|
+
- - "<"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '4.14'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: rspec
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rake
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
description: Driver for creating OpenNebula instances in Chef Provisioning.
|
93
|
+
email:
|
94
|
+
- anbrown@blackberry.com
|
95
|
+
- bbuczynski@blackberry.com
|
96
|
+
- eyurchenko@blackberry.com
|
97
|
+
- poliva@blackberry.com
|
98
|
+
executables: []
|
99
|
+
extensions: []
|
100
|
+
extra_rdoc_files:
|
101
|
+
- README.md
|
102
|
+
- LICENSE
|
103
|
+
files:
|
104
|
+
- LICENSE
|
105
|
+
- README.md
|
106
|
+
- Rakefile
|
107
|
+
- lib/chef/provider/one_image.rb
|
108
|
+
- lib/chef/provider/one_template.rb
|
109
|
+
- lib/chef/provider/one_user.rb
|
110
|
+
- lib/chef/provider/one_vnet.rb
|
111
|
+
- lib/chef/provider/one_vnet_lease.rb
|
112
|
+
- lib/chef/provisioning/driver_init/opennebula.rb
|
113
|
+
- lib/chef/provisioning/opennebula_driver.rb
|
114
|
+
- lib/chef/provisioning/opennebula_driver/credentials.rb
|
115
|
+
- lib/chef/provisioning/opennebula_driver/driver.rb
|
116
|
+
- lib/chef/provisioning/opennebula_driver/one_lib.rb
|
117
|
+
- lib/chef/provisioning/opennebula_driver/resources.rb
|
118
|
+
- lib/chef/provisioning/opennebula_driver/version.rb
|
119
|
+
- lib/chef/resource/one_image.rb
|
120
|
+
- lib/chef/resource/one_template.rb
|
121
|
+
- lib/chef/resource/one_user.rb
|
122
|
+
- lib/chef/resource/one_vnet.rb
|
123
|
+
- lib/chef/resource/one_vnet_lease.rb
|
124
|
+
- spec/integration/test_all_integration_spec.rb
|
125
|
+
- spec/recipes/attach_back_one_vm_spec.rb
|
126
|
+
- spec/recipes/attach_back_two_vm_spec.rb
|
127
|
+
- spec/recipes/attach_one_image_spec.rb
|
128
|
+
- spec/recipes/converge_back_one_vm_spec.rb
|
129
|
+
- spec/recipes/converge_back_two_vm_spec.rb
|
130
|
+
- spec/recipes/converge_bootstrap_vm_spec.rb
|
131
|
+
- spec/recipes/create_back_one_vm_spec.rb
|
132
|
+
- spec/recipes/create_back_two_vm_spec.rb
|
133
|
+
- spec/recipes/create_bootstrap_vm_spec.rb
|
134
|
+
- spec/recipes/create_one_image_spec.rb
|
135
|
+
- spec/recipes/create_one_template_spec.rb
|
136
|
+
- spec/recipes/delete_all_spec.rb
|
137
|
+
- spec/recipes/driver_options_spec.rb
|
138
|
+
- spec/recipes/instantiate_one_template_spec.rb
|
139
|
+
- spec/recipes/snapshot_one_image_spec.rb
|
140
|
+
- spec/recipes/snapshot_two_image_spec.rb
|
141
|
+
- spec/spec_helper.rb
|
142
|
+
- spec/support/opennebula_support.rb
|
143
|
+
homepage: https://github.com/blackberry/chef-provisioning-opennebula
|
144
|
+
licenses:
|
145
|
+
- Apache 2.0
|
146
|
+
metadata: {}
|
147
|
+
post_install_message:
|
148
|
+
rdoc_options: []
|
149
|
+
require_paths:
|
150
|
+
- lib
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
requirements: []
|
162
|
+
rubyforge_project:
|
163
|
+
rubygems_version: 2.4.8
|
164
|
+
signing_key:
|
165
|
+
specification_version: 4
|
166
|
+
summary: Driver for creating OpenNebula instances in Chef Provisioning.
|
167
|
+
test_files: []
|
168
|
+
has_rdoc:
|