chef-provisioning-vsphere 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db6d5c3d59108b03b2a029d28ea964177b662d3f
4
- data.tar.gz: 002c4faa621c11d98ac61aa0520cf01beda33f5e
3
+ metadata.gz: 8c7843e76054d8e24c2877c39e7ea977b058ad3d
4
+ data.tar.gz: c680975fe63a934184a35689cbf34edb20c089b0
5
5
  SHA512:
6
- metadata.gz: 19483a0d6ce2f112ddaa71021f01bb5e6bb01079d7ca48e060201fe167666e004b4476154d07b709be62fb02ad6e76ec0c0730c35566e4b7fa7d23ddc40c69fd
7
- data.tar.gz: bd2984e7b7daf67e1acf20d03969346cb949c423566adce6a45bf70f663da1d5aa14591b166b0846fa7e59bef2ea1a0667e28f0bc3a65430b44992c08e840d49
6
+ metadata.gz: 6f0319194b827e97857e621f2ab692124bc6054222055035425909e06c09054e4c3bb9c572f6754a13467b42d5c6d289ec998a2acc1f18dd05f260d172de1ab6
7
+ data.tar.gz: 518ceec81e5a94b73b239aa89563b153c9a064baa98f3e8a752973a97e1bd13c086d91e7b34ab65e7b7acff964c75b28ae2a4bc74772fef59f941aaa952814f3
data/.rubocop.yml CHANGED
@@ -3,6 +3,8 @@ AllCops:
3
3
  - "spec/**/*"
4
4
  - "vendor/**/*"
5
5
  - "pkg/**/*"
6
+ - "vsphere_testing/**/*"
7
+ - "examples/**/*"
6
8
  - "spec/unit/plugins/darwin/system_profiler_output.rb"
7
9
 
8
10
  inherit_from: .rubocop_todo.yml
data/CHANGELOG.md CHANGED
@@ -1,7 +1,23 @@
1
1
  # Change Log
2
2
 
3
- ## [2.0.5](https://github.com/chef-partners/chef-provisioning-vsphere/tree/2.0.5) (2017-06-06)
4
- [Full Changelog](https://github.com/chef-partners/chef-provisioning-vsphere/compare/v2.0.4...2.0.5)
3
+ ## [2.0.5](https://github.com/chef-partners/chef-provisioning-vsphere/tree/2.0.5) (2017-07-24)
4
+ [Full Changelog](https://github.com/chef-partners/chef-provisioning-vsphere/compare/v2.0.5...2.0.5)
5
+
6
+ **Closed issues:**
7
+
8
+ - Error: ArgumentError: wrong number of arguments \(given 0, expected 1..2\) When provisioning [\#51](https://github.com/chef-partners/chef-provisioning-vsphere/issues/51)
9
+ - action :destroy doesn't work, OR nodes/MACHINE.json not being written out. [\#43](https://github.com/chef-partners/chef-provisioning-vsphere/issues/43)
10
+ - Failing to test WinRM availability when creating vm [\#35](https://github.com/chef-partners/chef-provisioning-vsphere/issues/35)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - moving to development depenadcy [\#54](https://github.com/chef-partners/chef-provisioning-vsphere/pull/54) ([jjasghar](https://github.com/jjasghar))
15
+ - Adding github pull request setup [\#48](https://github.com/chef-partners/chef-provisioning-vsphere/pull/48) ([jjasghar](https://github.com/jjasghar))
16
+ - Jenkinsfile for Jenkins BlueOcean [\#46](https://github.com/chef-partners/chef-provisioning-vsphere/pull/46) ([jjasghar](https://github.com/jjasghar))
17
+ - Initial examples directory [\#45](https://github.com/chef-partners/chef-provisioning-vsphere/pull/45) ([jjasghar](https://github.com/jjasghar))
18
+
19
+ ## [v2.0.5](https://github.com/chef-partners/chef-provisioning-vsphere/tree/v2.0.5) (2017-06-06)
20
+ [Full Changelog](https://github.com/chef-partners/chef-provisioning-vsphere/compare/v2.0.4...v2.0.5)
5
21
 
6
22
  **Closed issues:**
7
23
 
data/Jenkinsfile ADDED
@@ -0,0 +1,82 @@
1
+ pipeline {
2
+ agent {
3
+ docker {
4
+ args "-u root"
5
+ reuseNode false
6
+ image "localhost:5000/jjkeysv5"
7
+ }
8
+ }
9
+ triggers {
10
+ pollSCM('H * * * *')
11
+ }
12
+ stages {
13
+ stage('Pull down ChefDK') {
14
+ steps {
15
+ sh '''apt-get update
16
+ apt-get install -y curl sudo git build-essential
17
+ curl -L https://chef.io/chef/install.sh | sudo bash -s -- -P chefdk -c current
18
+ if [ -d "vsphere_testing" ]; then rm -rf vsphere_testing; fi'''
19
+ }
20
+ }
21
+ stage('Bundle') {
22
+ steps {
23
+ sh 'chef exec bundle install'
24
+ }
25
+ }
26
+ stage('Checks') {
27
+ steps {
28
+ parallel(
29
+ "Unit": {
30
+ sh 'chef exec rake unit'
31
+
32
+ },
33
+ "Docs": {
34
+ sh 'chef exec rake yard'
35
+
36
+ }
37
+ )
38
+ }
39
+ }
40
+ stage('Kitchen setup') {
41
+ steps {
42
+ sh '''if [ -d "vsphere_testing" ]; then rm -rf vsphere_testing; fi
43
+ git clone https://github.com/jjasghar/vsphere_testing.git
44
+ cd vsphere_testing
45
+ for i in recipes/*; do sed -i 's/PASSWORD/Good4bye!/g' "$i"; done
46
+ sed -i 's/PASSWORD/Good4bye!/g' .kitchen.yml
47
+ sed -i 's/ORG/jj-model-t/g' recipes/windows_provision.rb
48
+ chef exec bundle install
49
+ chef exec gem install test-kitchen
50
+ chef exec bundle exec kitchen list'''
51
+ }
52
+ }
53
+ stage('Kitchen verify') {
54
+ steps {
55
+ sh '''cd vsphere_testing
56
+ chef exec bundle exec kitchen test -c 2'''
57
+ }
58
+ }
59
+ stage('chef-provisioning-vsphere create') {
60
+ steps {
61
+ parallel(
62
+ "Linux": {
63
+ sh '''cd vsphere_testing
64
+ chef exec bundle exec chef-client -z recipes/linux_provision.rb'''
65
+ },
66
+ "Windows": {
67
+ sh '''cd vsphere_testing
68
+ chef exec bundle exec chef-client -z recipes/windows_provision.rb'''
69
+ }
70
+ )
71
+ }
72
+ }
73
+ stage('chef-provisioning-vsphere delete') {
74
+ steps {
75
+ sh '''cd vsphere_testing
76
+ chef exec bundle exec chef-client -z recipes/destroy.rb
77
+ chef exec knife node delete testing-windows -y
78
+ chef exec knife client delete testing-windows -y'''
79
+ }
80
+ }
81
+ }
82
+ }
data/README.md CHANGED
@@ -350,5 +350,7 @@ You can run then `kitchen diagnose` to verify the nodes and settings that will b
350
350
 
351
351
  We have attempted to `TODO` markings. If you find one, whether it's documentation or a feature, it's a great place to start helping out. `$ grep -r "TODO" lib/`
352
352
 
353
+ We also have a Jenkinsfile with the complete testing suite for this repo. Please don't hesitate to pull it down and verify the changes locally with the complete integration tests that are required.
354
+
353
355
  [gem]: https://rubygems.org/gems/chef-provisioning-vsphere
354
356
  [travis]: https://travis-ci.org/chef-partners/chef-provisioning-vsphere
data/Rakefile CHANGED
@@ -2,7 +2,6 @@
2
2
  require "bundler/gem_tasks"
3
3
  require "chef/provisioning/vsphere_driver/version"
4
4
  require "rspec/core/rake_task"
5
- require "chefstyle"
6
5
  require "rubocop/rake_task"
7
6
  require "yard"
8
7
 
@@ -19,19 +19,19 @@ Gem::Specification.new do |s|
19
19
  s.files = `git ls-files -z`.split("\x0")
20
20
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
21
21
 
22
- s.add_dependency "rbvmomi", "~> 1.10"
22
+ s.add_dependency "chef", ">= 12.0", "< 14.0"
23
23
  s.add_dependency "chef-provisioning", "~> 2.0"
24
- s.add_dependency "github_changelog_generator"
25
24
  s.add_dependency "cheffish", ">= 4.0", "< 14.0"
26
- s.add_dependency "chef", ">= 12.0", "< 14.0"
25
+ s.add_dependency "rbvmomi", "~> 1.10"
27
26
 
28
- s.add_development_dependency "rspec"
29
- s.add_development_dependency "rake"
30
27
  s.add_development_dependency "chefstyle"
28
+ s.add_development_dependency "github_changelog_generator"
31
29
  s.add_development_dependency "pry"
32
30
  s.add_development_dependency "pry-byebug"
33
31
  s.add_development_dependency "pry-stack_explorer"
32
+ s.add_development_dependency "rake"
34
33
  s.add_development_dependency "rb-readline"
34
+ s.add_development_dependency "rspec"
35
35
  s.add_development_dependency "simplecov"
36
36
  s.add_development_dependency "yard"
37
37
  end
@@ -0,0 +1,45 @@
1
+ ---
2
+ driver:
3
+ name: vsphere
4
+ driver_options:
5
+ host: '172.16.20.2'
6
+ user: 'administrator@vsphere.local'
7
+ password: 'PASSWORD'
8
+ insecure: true
9
+ machine_options:
10
+ start_timeout: 600
11
+ create_timeout: 600
12
+ ready_timeout: 90
13
+ bootstrap_options:
14
+ use_linked_clone: true
15
+ datacenter: 'Datacenter'
16
+ template_name: 'ubuntu16'
17
+ template_folder: 'Linux'
18
+ resource_pool: 'Cluster'
19
+ num_cpus: 2
20
+ memory_mb: 4096
21
+ ssh:
22
+ user: ubuntu
23
+ paranoid: false
24
+ password: PASSWORD
25
+ port: 22
26
+
27
+ provisioner:
28
+ name: chef_zero
29
+ sudo_command: sudo
30
+
31
+ verifier:
32
+ name: inspec
33
+
34
+ transport:
35
+ username: "admini"
36
+ password: admini
37
+
38
+ platforms:
39
+ - name: ubuntu-16.04
40
+
41
+ suites:
42
+ - name: default
43
+ run_list:
44
+ - recipe[vsphere_demo::default]
45
+ attributes:
@@ -0,0 +1,35 @@
1
+ require 'chef/provisioning'
2
+ require 'chef/provisioning/vsphere_driver'
3
+
4
+ #
5
+ # This is the main way to connect to vSphere
6
+ #
7
+ with_vsphere_driver host: '172.16.20.2',
8
+ insecure: true,
9
+ user: 'administrator@vsphere.local',
10
+ password: 'PASSWORD'
11
+
12
+ #
13
+ # These are the machine_options that you need to declare
14
+ #
15
+ with_machine_options :bootstrap_options => {
16
+ num_cpus: 2,
17
+ memory_mb: 4096,
18
+ datacenter: 'Datacenter',
19
+ resource_pool: 'Cluster',
20
+ template_folder: 'Linux',
21
+ template_name: 'ubuntu16',
22
+ :ssh => {
23
+ :user => 'admini',
24
+ :password => 'PASSWORD',
25
+ :paranoid => false,
26
+ }
27
+ },
28
+ :sudo => true
29
+
30
+ #
31
+ # This is where you can declare the machine
32
+ #
33
+ machine "testing-ubuntu" do
34
+ tag "haha"
35
+ end
@@ -0,0 +1,47 @@
1
+ require 'chef/provisioning'
2
+ require 'chef/provisioning/vsphere_driver'
3
+
4
+
5
+ #
6
+ # This is the main way to connect to vSphere
7
+ #
8
+ with_vsphere_driver host: '172.16.20.2',
9
+ insecure: true,
10
+ user: 'administrator@vsphere.local',
11
+ password: 'PASSWORD'
12
+
13
+ #
14
+ # These are the machine_options that you need to declare
15
+ #
16
+ win_bootstrap_options = { :bootstrap_options => {
17
+ num_cpus: 2,
18
+ memory_mb: 8096,
19
+ datacenter: 'Datacenter',
20
+ resource_pool: 'Cluster',
21
+ template_folder: 'Windows',
22
+ template_name: 'windows2012R2',
23
+ :ssh => {
24
+ :user => 'Administrator',
25
+ :password => 'P@ssw0rd!!!',
26
+ :paranoid => false,
27
+ :port => "5985"
28
+ }
29
+ },
30
+ ssh_options: { :keepalive => true, :keepalive_interval => 50, :user_known_hosts_file => '/dev/null' },
31
+ ready_timeout: '30'
32
+ }
33
+
34
+ #
35
+ # WinRM requires a Chef server (not sure why) so you need to declare it here
36
+ #
37
+ with_chef_server "https://api.chef.io/organizations/ORG",
38
+ :client_name => Chef::Config[:node_name],
39
+ :signing_key_filename => Chef::Config[:client_key]
40
+
41
+ #
42
+ # This is where you can declare the machine
43
+ #
44
+ machine "testing-windows" do
45
+ machine_options win_bootstrap_options
46
+ tag "haha"
47
+ end
@@ -0,0 +1,63 @@
1
+ ---
2
+ driver:
3
+ name: vsphere
4
+ driver_options:
5
+ host: '172.16.20.2'
6
+ user: 'administrator@vsphere.local'
7
+ password: 'PASSWORD'
8
+ insecure: true
9
+ machine_options:
10
+ start_timeout: 600
11
+ create_timeout: 600
12
+ ready_timeout: 90
13
+ bootstrap_options:
14
+ use_linked_clone: true
15
+ datacenter: 'Datacenter'
16
+ template_name: 'ubuntu16'
17
+ template_folder: 'Linux'
18
+ resource_pool: 'Cluster'
19
+ num_cpus: 2
20
+ memory_mb: 4096
21
+ ssh:
22
+ user: ubuntu
23
+ paranoid: false
24
+ password: 'PASSWORD'
25
+ port: 22
26
+
27
+ provisioner:
28
+ name: chef_zero
29
+ sudo_command: sudo
30
+
31
+ verifier:
32
+ name: inspec
33
+
34
+ transport:
35
+ username: "ubuntu"
36
+ password: 'PASSWORD'
37
+
38
+ platforms:
39
+ - name: ubuntu-16.04
40
+ - name: windows
41
+ driver:
42
+ machine_options:
43
+ start_timeout: 600
44
+ create_timeout: 600
45
+ ready_timeout: 90
46
+ bootstrap_options:
47
+ use_linked_clone: true
48
+ datacenter: 'Datacenter'
49
+ template_name: 'windows2012R2'
50
+ template_folder: 'Windows'
51
+ resource_pool: 'Cluster'
52
+ num_cpus: 2
53
+ memory_mb: 8096
54
+ ssh:
55
+ user: "administrator"
56
+ paranoid: false
57
+ password: "P@ssw0rd!!!!"
58
+ port: 5985
59
+
60
+ suites:
61
+ - name: default
62
+ run_list:
63
+ - recipe[my_cookbook::default]
@@ -2,5 +2,5 @@
2
2
  # Provisions machines in vSphere.
3
3
  module ChefProvisioningVsphere
4
4
  # The version of this awesome Gem. BOOM.
5
- VERSION = "2.0.5".freeze
5
+ VERSION = "2.0.6".freeze
6
6
  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.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-06 00:00:00.000000000 Z
12
+ date: 2017-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rbvmomi
15
+ name: chef
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '1.10'
20
+ version: '12.0'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '14.0'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '1.10'
30
+ version: '12.0'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '14.0'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: chef-provisioning
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -39,20 +45,6 @@ dependencies:
39
45
  - - "~>"
40
46
  - !ruby/object:Gem::Version
41
47
  version: '2.0'
42
- - !ruby/object:Gem::Dependency
43
- name: github_changelog_generator
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
48
  - !ruby/object:Gem::Dependency
57
49
  name: cheffish
58
50
  requirement: !ruby/object:Gem::Requirement
@@ -74,27 +66,35 @@ dependencies:
74
66
  - !ruby/object:Gem::Version
75
67
  version: '14.0'
76
68
  - !ruby/object:Gem::Dependency
77
- name: chef
69
+ name: rbvmomi
78
70
  requirement: !ruby/object:Gem::Requirement
79
71
  requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '12.0'
83
- - - "<"
72
+ - - "~>"
84
73
  - !ruby/object:Gem::Version
85
- version: '14.0'
74
+ version: '1.10'
86
75
  type: :runtime
87
76
  prerelease: false
88
77
  version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.10'
82
+ - !ruby/object:Gem::Dependency
83
+ name: chefstyle
84
+ requirement: !ruby/object:Gem::Requirement
89
85
  requirements:
90
86
  - - ">="
91
87
  - !ruby/object:Gem::Version
92
- version: '12.0'
93
- - - "<"
88
+ version: '0'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '14.0'
95
+ version: '0'
96
96
  - !ruby/object:Gem::Dependency
97
- name: rspec
97
+ name: github_changelog_generator
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
@@ -108,7 +108,7 @@ dependencies:
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  - !ruby/object:Gem::Dependency
111
- name: rake
111
+ name: pry
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
@@ -122,7 +122,7 @@ dependencies:
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  - !ruby/object:Gem::Dependency
125
- name: chefstyle
125
+ name: pry-byebug
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
@@ -136,7 +136,7 @@ dependencies:
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  - !ruby/object:Gem::Dependency
139
- name: pry
139
+ name: pry-stack_explorer
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - ">="
@@ -150,7 +150,7 @@ dependencies:
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  - !ruby/object:Gem::Dependency
153
- name: pry-byebug
153
+ name: rake
154
154
  requirement: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
@@ -164,7 +164,7 @@ dependencies:
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  - !ruby/object:Gem::Dependency
167
- name: pry-stack_explorer
167
+ name: rb-readline
168
168
  requirement: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - ">="
@@ -178,7 +178,7 @@ dependencies:
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  - !ruby/object:Gem::Dependency
181
- name: rb-readline
181
+ name: rspec
182
182
  requirement: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="
@@ -234,12 +234,17 @@ files:
234
234
  - ".travis.yml"
235
235
  - CHANGELOG.md
236
236
  - Gemfile
237
+ - Jenkinsfile
237
238
  - LICENSE
238
239
  - LICENSE-Rally
239
240
  - README.md
240
241
  - Rakefile
241
242
  - chef-provisioning-vsphere.gemspec
242
243
  - contribution-notice
244
+ - examples/ubuntu-kitchen.yml
245
+ - examples/ubuntu-provision.rb
246
+ - examples/win-provision.rb
247
+ - examples/win-ubuntu-kitchen.yml
243
248
  - lib/chef/provisioning/driver_init/vsphere.rb
244
249
  - lib/chef/provisioning/vsphere_driver.rb
245
250
  - lib/chef/provisioning/vsphere_driver/clone_spec_builder.rb