chef-provisioning-virtualbox 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a313485825890b234b29ba256946a59476a2c5
|
4
|
+
data.tar.gz: 0bb308347c0a3462e658fcb6ed1c90b8011527b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91b7f491fca2d754556f633805ced93b7773980f1bc424218fee5bd970c54839b0b7c56f824480e7a7100e943569fb9d8dad0b5a64282305be1433e8e1531738
|
7
|
+
data.tar.gz: 56aae60b7586ecc337517745a3a5261278e1d02587dca3d03cefa45bf7e6e1b94ea89bfa8b47c113dd9a1d7a983313f9a498212bc51620770543fb81bff68b1e
|
@@ -20,15 +20,21 @@ module VirtualboxDriver
|
|
20
20
|
Virtualbox.connect('/usr/local/bin/vboxmanage')
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
# * initialize(driver_url) - create a new driver with the given URL
|
24
|
+
# * driver_url - a URL representing everything unique about your driver. (NOT credentials)
|
25
|
+
# * allocate_machine - ask the driver to allocate a machine to you.
|
26
|
+
# * ready_machine - get the machine "ready" - wait for it to be booted and accessible (for example, accessible via SSH transport).
|
27
|
+
# * stop_machine - stop the machine.
|
28
|
+
# * destroy_machine - delete the machine.
|
29
|
+
# * connect_to_machine - connect to the given machine.
|
30
|
+
|
31
|
+
def driver.create_server(name, machine_options)
|
26
32
|
machine_spec.reference['server_id'] = %x(/usr/local/bin/createvm-q.sh "#{name}" 10)
|
27
33
|
end
|
28
34
|
|
29
35
|
def allocate_machine(action_handler, machine_spec, machine_options)
|
30
36
|
if machine_spec.reference
|
31
|
-
if !
|
37
|
+
if !driver.server_exists?(machine_spec.reference['server_id'])
|
32
38
|
action_handler.perform_action "Machine #{machine_spec.reference['server_id']} does not exist. Recreating ..." do
|
33
39
|
machine_spec.reference = nil
|
34
40
|
end
|
@@ -37,7 +43,7 @@ module VirtualboxDriver
|
|
37
43
|
if !machine_spec.reference
|
38
44
|
action_handler.perform_action "Creating server #{machine_spec.name} with options #{machine_options}" do
|
39
45
|
private_key = get_private_key('bootstrapkey')
|
40
|
-
server_id =
|
46
|
+
server_id = driver.create_server(machine_spec.name, machine_options, :bootstrap_ssh_key => private_key)
|
41
47
|
machine_spec.reference = {
|
42
48
|
'driver_url' => driver_url,
|
43
49
|
'driver_version' => VirtualboxDriver::VERSION,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-provisioning-virtualbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Reilly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Virtualbox Driver for chef provisioning
|
14
14
|
email: robertjreilly@gmail.com
|