chef-provisioning-opennebula 0.4.3 → 0.4.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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -18
  3. data/lib/chef/provider/one_template.rb +19 -3
  4. data/lib/chef/provisioning/opennebula_driver/one_lib.rb +11 -4
  5. data/lib/chef/provisioning/opennebula_driver/version.rb +1 -1
  6. data/spec/config_sample.rb +60 -0
  7. data/spec/integration/test_all_integration_spec.rb +264 -79
  8. data/spec/recipes/OneDriver/attach_back_one_vm_spec.rb +20 -0
  9. data/spec/recipes/OneDriver/attach_back_two_vm_spec.rb +20 -0
  10. data/spec/recipes/OneDriver/attach_one_image_spec.rb +20 -0
  11. data/spec/recipes/OneDriver/converge_back_one_vm_spec.rb +19 -0
  12. data/spec/recipes/OneDriver/converge_back_two_vm_spec.rb +19 -0
  13. data/spec/recipes/OneDriver/converge_bootstrap_vm_spec.rb +26 -0
  14. data/spec/recipes/OneDriver/create_back_one_vm_spec.rb +20 -0
  15. data/spec/recipes/OneDriver/create_back_two_vm_spec.rb +20 -0
  16. data/spec/recipes/OneDriver/create_bootstrap_vm_spec.rb +26 -0
  17. data/spec/recipes/OneDriver/create_one_image_spec.rb +23 -0
  18. data/spec/recipes/OneDriver/create_one_template_int_spec.rb +21 -0
  19. data/spec/recipes/OneDriver/create_one_template_spec.rb +21 -0
  20. data/spec/recipes/OneDriver/delete/OpenNebula-back-1-vm.rb +19 -0
  21. data/spec/recipes/OneDriver/delete/OpenNebula-back-2-vm.rb +19 -0
  22. data/spec/recipes/OneDriver/delete/OpenNebula-bootstrap-img.rb +19 -0
  23. data/spec/recipes/OneDriver/delete/OpenNebula-bootstrap-vm.rb +19 -0
  24. data/spec/recipes/OneDriver/delete/OpenNebula-snap-1-img.rb +19 -0
  25. data/spec/recipes/OneDriver/delete/OpenNebula-snap-2-img.rb +19 -0
  26. data/spec/recipes/OneDriver/delete/OpenNebula-test-tpl-ints.rb +19 -0
  27. data/spec/recipes/OneDriver/delete/OpenNebula-test-tpl.rb +19 -0
  28. data/spec/recipes/OneDriver/delete/OpenNebula-tpl-1-vm.rb +19 -0
  29. data/spec/recipes/OneDriver/instantiate_one_template_spec.rb +25 -0
  30. data/spec/recipes/OneDriver/snapshot_one_image_spec.rb +21 -0
  31. data/spec/recipes/OneDriver/snapshot_two_image_spec.rb +21 -0
  32. data/spec/recipes/driver_options_spec.rb +19 -62
  33. data/spec/spec_helper.rb +42 -14
  34. data/spec/support/opennebula_support.rb +69 -34
  35. metadata +27 -17
  36. data/spec/recipes/attach_back_one_vm_spec.rb +0 -20
  37. data/spec/recipes/attach_back_two_vm_spec.rb +0 -20
  38. data/spec/recipes/attach_one_image_spec.rb +0 -20
  39. data/spec/recipes/converge_back_one_vm_spec.rb +0 -19
  40. data/spec/recipes/converge_back_two_vm_spec.rb +0 -19
  41. data/spec/recipes/converge_bootstrap_vm_spec.rb +0 -34
  42. data/spec/recipes/create_back_one_vm_spec.rb +0 -20
  43. data/spec/recipes/create_back_two_vm_spec.rb +0 -20
  44. data/spec/recipes/create_bootstrap_vm_spec.rb +0 -34
  45. data/spec/recipes/create_one_image_spec.rb +0 -21
  46. data/spec/recipes/create_one_template_spec.rb +0 -52
  47. data/spec/recipes/delete_all_spec.rb +0 -47
  48. data/spec/recipes/instantiate_one_template_spec.rb +0 -35
  49. data/spec/recipes/snapshot_one_image_spec.rb +0 -21
  50. data/spec/recipes/snapshot_two_image_spec.rb +0 -21
@@ -1,20 +0,0 @@
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-back-2-vm'
19
- action :attach
20
- end
@@ -1,20 +0,0 @@
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
- machine_id 'OpenNebula-bootstrap-vm'
19
- action :attach
20
- end
@@ -1,19 +0,0 @@
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-1-vm" do
18
- run_list []
19
- end
@@ -1,19 +0,0 @@
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
- run_list []
19
- end
@@ -1,34 +0,0 @@
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
- run_list []
34
- end
@@ -1,20 +0,0 @@
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-1-vm" do
18
- from_image "OpenNebula-snap-1-img"
19
- action :ready
20
- end
@@ -1,20 +0,0 @@
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
@@ -1,34 +0,0 @@
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
@@ -1,21 +0,0 @@
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
@@ -1,52 +0,0 @@
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
@@ -1,47 +0,0 @@
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
@@ -1,35 +0,0 @@
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
-
@@ -1,21 +0,0 @@
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
@@ -1,21 +0,0 @@
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