chef-provisioning-vsphere 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -16
- data/lib/chef/provisioning/vsphere_driver/driver.rb +5 -5
- data/lib/chef/provisioning/vsphere_driver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc055e1b2d6b786a8f6283601e4b639d8c366721
|
4
|
+
data.tar.gz: 055c8b542e35ac504d6e32a17fe220efcfdc2d1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de7ecf45f3b2cb52a0d56e1f0e9807f328d7268908b7519023e678fb061990aec6dbc159034e92d3a46509e3fa66ccbba23fb4eeb9b9c90e23bf2849b45de7c
|
7
|
+
data.tar.gz: 3df8118f086fa318d4f3bd8dbb0c1af69ffd28ce021cf61bff428f4c168e3a48f88c5c24b5374edf3c9e09709eb9bb2f96ef170d1b95b62812384a8843613846
|
data/README.md
CHANGED
@@ -11,17 +11,17 @@ chef-provisioning-vsphere supports provisioning Unix/ssh and Windows/winrm guest
|
|
11
11
|
|
12
12
|
A vcenter and valid login credentials.
|
13
13
|
|
14
|
-
### VM
|
14
|
+
### VM Template
|
15
15
|
|
16
16
|
A VM template capable of installing Chef 11.8 or newer. This can be either windows or linux flavored.
|
17
17
|
|
18
18
|
### A provisioning node (can be local)
|
19
19
|
|
20
|
-
An environment equipped with the chef client and the chef-
|
20
|
+
An environment equipped with the chef client and the chef-provisioning-vsphere gem.
|
21
21
|
|
22
22
|
## A basic provisioning recipe
|
23
23
|
|
24
|
-
This is a minimal machine
|
24
|
+
This is a minimal machine definition that will use a dhcp assigned ip (it assumes the presense of a dhcp server). For test purposes this uses a linked clone for a faster provisioning time. This recipe should be used with a linux template. Windows provisioned servers need to point to a chef server for the cookbooks since winrm does not support port forwarding and there fore cannot reach back on the chef-zero port to get the local cookbooks. See examples below.
|
25
25
|
|
26
26
|
```
|
27
27
|
chef_gem 'chef-provisioning-vsphere' do
|
@@ -135,14 +135,12 @@ with_machine_options :bootstrap_options => {
|
|
135
135
|
|
136
136
|
### Domain joined windows machine
|
137
137
|
|
138
|
-
Note: You must run chef-client against a server for a windows box. You cn do this locally since the provisioning recipe should not change the state of the provisioner. You will need to upload the cookbook (both the one doing the provisioning and the one used in the provisioned machine's runlist) before running `chef-client`.
|
139
|
-
|
140
138
|
```
|
141
139
|
with_machine_options :bootstrap_options => {
|
142
140
|
use_linked_clone: true,
|
143
141
|
num_cpus: 2,
|
144
142
|
memory_mb: 4096,
|
145
|
-
network_name: [
|
143
|
+
network_name: ['vlan_20_172.21.20'],
|
146
144
|
datacenter: 'datacenter_name',
|
147
145
|
resource_pool: 'cluster',
|
148
146
|
template_name: 'path to template',
|
@@ -150,20 +148,29 @@ with_machine_options :bootstrap_options => {
|
|
150
148
|
ipsettings: {
|
151
149
|
dnsServerList: ['1.2.3.31','1.2.3.41']
|
152
150
|
},
|
153
|
-
domain
|
154
|
-
domainAdmin
|
155
|
-
domainAdminPassword
|
156
|
-
org_name
|
157
|
-
product_id
|
158
|
-
win_time_zone
|
151
|
+
domain: 'blah.com',
|
152
|
+
domainAdmin: 'administrator@blah.com',
|
153
|
+
domainAdminPassword: 'Passwordyoyoyo',
|
154
|
+
org_name: 'acme',
|
155
|
+
product_id: 'CDAA-87DC-3455-FF77-2AAC',
|
156
|
+
win_time_zone: 4
|
159
157
|
}
|
160
|
-
:
|
161
|
-
:
|
162
|
-
:
|
163
|
-
:
|
158
|
+
ssh: {
|
159
|
+
user: 'administrator',
|
160
|
+
password: 'password',
|
161
|
+
paranoid: false,
|
164
162
|
}
|
163
|
+
},
|
164
|
+
:convergence_options => {
|
165
|
+
:ssl_verify_mode => :verify_none
|
165
166
|
}
|
166
167
|
```
|
168
|
+
Note: You must run chef-client against a server for a windows box. You can do this locally since the provisioning recipe should not change the state of the provisioner. You will need to upload the cookbook (both the one doing the provisioning and the one used in the provisioned machine's runlist) before running `chef-client`.
|
169
|
+
|
170
|
+
```
|
171
|
+
knife cookbook upload my_cookbook
|
172
|
+
chef-client -o 'my_cookbook::provision' -c .chef/knife.rb
|
173
|
+
```
|
167
174
|
|
168
175
|
## Kitchen Driver
|
169
176
|
|
@@ -292,7 +292,7 @@ module ChefProvisioningVsphere
|
|
292
292
|
vm.config.instanceUuid,
|
293
293
|
'started but SSH did not come up. Rebooting...'
|
294
294
|
))
|
295
|
-
restart_server(action_handler, machine_spec,
|
295
|
+
restart_server(action_handler, machine_spec, machine_options)
|
296
296
|
wait_until_ready(action_handler, machine_spec, machine_options, vm)
|
297
297
|
wait_for_transport(action_handler, machine_spec, machine_options, vm)
|
298
298
|
end
|
@@ -315,7 +315,7 @@ module ChefProvisioningVsphere
|
|
315
315
|
action_handler.report_progress(msg.join)
|
316
316
|
start_vm(vm)
|
317
317
|
else
|
318
|
-
restart_server(action_handler, machine_spec,
|
318
|
+
restart_server(action_handler, machine_spec, machine_options)
|
319
319
|
end
|
320
320
|
wait_for_ip(vm, machine_options, action_handler)
|
321
321
|
end
|
@@ -411,10 +411,10 @@ module ChefProvisioningVsphere
|
|
411
411
|
vm
|
412
412
|
end
|
413
413
|
|
414
|
-
def restart_server(action_handler, machine_spec,
|
414
|
+
def restart_server(action_handler, machine_spec, machine_options)
|
415
415
|
action_handler.perform_action "restart machine #{machine_spec.name} (#{vm.config.instanceUuid} on #{driver_url})" do
|
416
|
-
stop_machine(action_handler, machine_spec,
|
417
|
-
|
416
|
+
stop_machine(action_handler, machine_spec, machine_options)
|
417
|
+
start_machine(action_handler, machine_spec, machine_options)
|
418
418
|
machine_spec.location['started_at'] = Time.now.utc.to_s
|
419
419
|
end
|
420
420
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-provisioning-vsphere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CenturyLink Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbvmomi
|