chef-provisioning-vsphere 2.0.10 → 2.1.0

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: 4ca3d2606974b66b820aa053f32e8aa3e6804b92
4
- data.tar.gz: add6bbf1fd61a3b887f5880131bec8a2d109d3e1
3
+ metadata.gz: 1250ea80100fd698d506ffd6f006dc479c66d1e1
4
+ data.tar.gz: a5fcb5cea33734d3ade4eff3ed7cd0fe4baa80af
5
5
  SHA512:
6
- metadata.gz: 530c84cad6a830a35f8909400cfe4d09e07d796071b016fd3a79570f8fa1031a5844dbd26183b8c11b0c453cd5adfe19dd3df7af7eb3d28eb43c0d9b38180cfe
7
- data.tar.gz: 69ab9ad90c70fa67552b710fc5f0aae696a1a30887837223ac0f7281f9351e4901bc01f60889d5810d2440f260697bb885449b6c2fdd024ec98921f4a268da0c
6
+ metadata.gz: cbee2f3e9c9bf33d412b7fc247ee1c08d755570f6f07bbbdf10dd0cd34dd720f126eef620a2366bb0964e04e4d67e42d27106fb721757012177fbe5db3ac026e
7
+ data.tar.gz: a41a2f406b599ccd0500b69ade08d223e329007722e583ad95842704a06ae63b872ed8f7e1ec323921816f2095981879ad2824f603df00f642505835e07ce8e7
@@ -52,7 +52,7 @@ Metrics/BlockNesting:
52
52
  # Offense count: 3
53
53
  # Configuration parameters: CountComments.
54
54
  Metrics/ClassLength:
55
- Max: 638
55
+ Max: 643
56
56
 
57
57
  # Offense count: 11
58
58
  Metrics/CyclomaticComplexity:
@@ -1,7 +1,22 @@
1
1
  # Change Log
2
2
 
3
- ## [2.0.10](https://github.com/chef-partners/chef-provisioning-vsphere/tree/2.0.10) (2017-10-31)
4
- [Full Changelog](https://github.com/chef-partners/chef-provisioning-vsphere/compare/v2.0.9...2.0.10)
3
+ ## [v2.1.0](https://github.com/chef-partners/chef-provisioning-vsphere/tree/v2.1.0)
4
+
5
+ [Full Changelog](https://github.com/chef-partners/chef-provisioning-vsphere/compare/v2.0.10...v2.1.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - Setting network\_name disconnects all devices on OSX [\#62](https://github.com/chef-partners/chef-provisioning-vsphere/issues/62)
10
+ - IPv6 address returned by VM can cause failures [\#52](https://github.com/chef-partners/chef-provisioning-vsphere/issues/52)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - Handle IPv6 address returned by VM [\#81](https://github.com/chef-partners/chef-provisioning-vsphere/pull/81) ([jzinn](https://github.com/jzinn))
15
+ - fixed bootstrap ready timeout call [\#73](https://github.com/chef-partners/chef-provisioning-vsphere/pull/73) ([tuccimon](https://github.com/tuccimon))
16
+ - add initial\_iso\_image to support deployment from custom iso images [\#49](https://github.com/chef-partners/chef-provisioning-vsphere/pull/49) ([jjlimepoint](https://github.com/jjlimepoint))
17
+
18
+ ## [v2.0.10](https://github.com/chef-partners/chef-provisioning-vsphere/tree/v2.0.10) (2017-10-31)
19
+ [Full Changelog](https://github.com/chef-partners/chef-provisioning-vsphere/compare/v2.0.9...v2.0.10)
5
20
 
6
21
  **Closed issues:**
7
22
 
@@ -257,4 +272,4 @@
257
272
  ## [v0.1.3](https://github.com/chef-partners/chef-provisioning-vsphere/tree/v0.1.3) (2014-05-09)
258
273
 
259
274
 
260
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
275
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -17,7 +17,7 @@ A vCenter and valid login credentials.
17
17
 
18
18
  ### VM Template
19
19
 
20
- A VM template capable of installing Chef 11.8 or newer. This can be either windows or linux flavored.
20
+ A VM template capable of installing Chef 11.8 or newer. This can be either windows or linux flavored. Both IPv4 and IPv6 are supported.
21
21
 
22
22
  ### A provisioning node (can be local)
23
23
 
@@ -90,6 +90,7 @@ This will use chef-zero and needs no chef server (only works for ssh). Note that
90
90
  - `[:resource_pool]` - `{cluster}`/`{resource pool}` to use during provisioning
91
91
  (for single-host setups, use `{vsphere_ip / vsphere_hostname}`/`{resource pool}`)
92
92
  - `[:additional_disk_size_gb]` - an array of numbers, each signifying the number of gigabytes to assign to an additional disk (*this requires a datastore to be specified*)
93
+ - `[:initial_iso_file]` - an iso file to mount at boot. This is useful for custom OS installations. In the format of `[datastore] filename.iso`
93
94
  - `[:bootstrap_ipv4]` - `true` / `false`, set to `true` to wait for an IPv4 address to become available before bootstrapping.
94
95
  - `[:ipv4_timeout]` - use with `[:bootstrap_ipv4]`, set the time in seconds to wait before an IPv4 address is received (defaults to 30)
95
96
  - `[:ssh][:user]` user to use for ssh/winrm (defaults to root on linux/administrator on windows)
@@ -710,6 +710,28 @@ module ChefProvisioningVsphere
710
710
  task.wait_for_completion
711
711
  end
712
712
 
713
+ if bootstrap_options[:initial_iso_image]
714
+ d_obj = vm.config.hardware.device.select {|hw| hw.class == RbVmomi::VIM::VirtualCdrom}.first
715
+ backing = RbVmomi::VIM::VirtualCdromIsoBackingInfo(fileName: bootstrap_options[:initial_iso_image])
716
+ task = vm.ReconfigVM_Task(
717
+ spec: RbVmomi::VIM.VirtualMachineConfigSpec(
718
+ deviceChange: [
719
+ operation: :edit,
720
+ device: RbVmomi::VIM::VirtualCdrom(
721
+ backing: backing,
722
+ key: d_obj.key,
723
+ controllerKey: d_obj.controllerKey,
724
+ connectable: RbVmomi::VIM::VirtualDeviceConnectInfo(
725
+ startConnected: true,
726
+ connected: true,
727
+ allowGuestControl: true)
728
+ )
729
+ ]
730
+ )
731
+ )
732
+ task.wait_for_completion
733
+ end
734
+
713
735
  vm
714
736
  end
715
737
 
@@ -847,8 +869,13 @@ module ChefProvisioningVsphere
847
869
  else
848
870
  winrm_options.merge!(options[:winrm_opts])
849
871
  end
850
- endpoint = "http#{winrm_transport == :ssl ? 's' : ''}://"\
851
- "#{host}:#{port}/wsman"
872
+ scheme = winrm_transport == :ssl ? 'https' : 'http'
873
+ endpoint = URI::Generic.build(
874
+ scheme: scheme,
875
+ host: host,
876
+ port: port,
877
+ path: '/wsman'
878
+ ).to_s
852
879
 
853
880
  Chef::Provisioning::Transport::WinRM.new(
854
881
  endpoint,
@@ -890,7 +917,7 @@ module ChefProvisioningVsphere
890
917
  ## Check if true available
891
918
  vm_ip = bootstrap_options[:customization_spec][:ipsettings][:ip] unless vm_helper.ip?
892
919
  nb_attempts = 0
893
- until @vm_helper.open_port?(vm_ip, @vm_helper.port, 1) || nb_attempts > bootstrap_options[:ready_timeout]
920
+ until @vm_helper.open_port?(vm_ip, @vm_helper.port, 1) || (nb_attempts > (bootstrap_options[:ready_timeout] || 90))
894
921
  print '.'
895
922
  nb_attempts += 1
896
923
  end
@@ -3,5 +3,5 @@
3
3
  # Provisions machines in vSphere.
4
4
  module ChefProvisioningVsphere
5
5
  # The version of this awesome Gem. BOOM.
6
- VERSION = '2.0.10'.freeze
6
+ VERSION = '2.1.0'.freeze
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioning-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-31 00:00:00.000000000 Z
12
+ date: 2018-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef