knife-vrealize 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- data/.rubocop.yml +5 -1
- data/.travis.yml +10 -2
- data/CHANGELOG.md +17 -2
- data/Jenkinsfile +28 -0
- data/README.md +25 -0
- data/Rakefile +12 -0
- data/knife-vrealize.gemspec +1 -0
- data/lib/chef/knife/cloud/vra_service.rb +2 -0
- data/lib/chef/knife/cloud/vra_service_options.rb +2 -1
- data/lib/knife-vrealize/version.rb +1 -1
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 320884d42ac8d281e66402bdd575c43cb7d0cfbe
|
4
|
+
data.tar.gz: 48e8fc2912dc71e1808f1247cdf8e2abd2726c24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df9c722d924ebcae178f4e488461c64fbe1b0f589d5ca53064956b345bff3982361c21981dec79f450f1653deebaff5fda105f4f586b4d376ca3c29c55bb9ad3
|
7
|
+
data.tar.gz: f12a827dfce7ca607139668602a1482c5c4ada26c8a0097b92d677caff5e2a68852c3038b5e8910e6347f8f698d3c39a388f7dc327e5a0549b0f0c48980b7a27
|
@@ -0,0 +1,23 @@
|
|
1
|
+
### Versions:
|
2
|
+
<!--- Version of the software where you are encountering the issue --->
|
3
|
+
<!-- You should probably update in this is not newest release.--->
|
4
|
+
* Version of knife-vrealize:
|
5
|
+
* Version of chef:
|
6
|
+
|
7
|
+
### Platform Details
|
8
|
+
<!--- What version of vRA or vRO are you running? What version of ESXi are you using too?--->
|
9
|
+
* Version of vRA:
|
10
|
+
* Version of vRO:
|
11
|
+
* Version of ESXi:
|
12
|
+
|
13
|
+
### Scenario:
|
14
|
+
<!--- What you are trying to achieve and you can't?--->
|
15
|
+
|
16
|
+
### Steps to Reproduce:
|
17
|
+
<!--- If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?--->
|
18
|
+
|
19
|
+
### Expected Result:
|
20
|
+
<!--- What are you expecting to happen as the consequence of above reproduction steps?--->
|
21
|
+
|
22
|
+
### Actual Result:
|
23
|
+
<!--- What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.--->
|
@@ -0,0 +1,14 @@
|
|
1
|
+
### Description
|
2
|
+
|
3
|
+
<!--- Describe what this change achieves--->
|
4
|
+
|
5
|
+
### Issues Resolved
|
6
|
+
|
7
|
+
<!--- List any existing issues this PR resolves--->
|
8
|
+
|
9
|
+
### Check List
|
10
|
+
|
11
|
+
- [ ] All tests pass.
|
12
|
+
- [ ] All style checks pass.
|
13
|
+
- [ ] Functionality includes testing.
|
14
|
+
- [ ] Functionality has been documented in the README if applicable
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,12 +1,20 @@
|
|
1
1
|
language: ruby
|
2
2
|
cache: bundler
|
3
3
|
sudo: false
|
4
|
+
|
4
5
|
rvm:
|
5
|
-
- 2.
|
6
|
-
- 2.
|
6
|
+
- 2.2
|
7
|
+
- 2.3.3
|
8
|
+
- 2.4.1
|
9
|
+
|
7
10
|
branches:
|
8
11
|
only:
|
9
12
|
- master
|
13
|
+
|
14
|
+
script:
|
15
|
+
- bundle exec rake style
|
16
|
+
- bundle exec rake spec
|
17
|
+
|
10
18
|
notifications:
|
11
19
|
slack:
|
12
20
|
on_success: change
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,26 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [2.1.1](https://github.com/chef-partners/knife-vrealize/tree/2.1.1) (2017-08-21)
|
4
|
+
[Full Changelog](https://github.com/chef-partners/knife-vrealize/compare/v2.1.0...2.1.1)
|
4
5
|
|
5
|
-
|
6
|
+
**Closed issues:**
|
7
|
+
|
8
|
+
- Driver doesn't appear to support windows yet [\#29](https://github.com/chef-partners/knife-vrealize/issues/29)
|
9
|
+
- knife\[:vra\_base\_url\] causes an error if URL has a trailing slash [\#24](https://github.com/chef-partners/knife-vrealize/issues/24)
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- added more useful/required parameters to readme [\#32](https://github.com/chef-partners/knife-vrealize/pull/32) ([mcascone](https://github.com/mcascone))
|
14
|
+
- Initial Jenkinsfile [\#28](https://github.com/chef-partners/knife-vrealize/pull/28) ([jjasghar](https://github.com/jjasghar))
|
15
|
+
- Fixes \#24 [\#27](https://github.com/chef-partners/knife-vrealize/pull/27) ([jjasghar](https://github.com/jjasghar))
|
16
|
+
- Updating travis and new versions of ruby [\#26](https://github.com/chef-partners/knife-vrealize/pull/26) ([jjasghar](https://github.com/jjasghar))
|
17
|
+
|
18
|
+
## [v2.1.0](https://github.com/chef-partners/knife-vrealize/tree/v2.1.0) (2017-02-09)
|
19
|
+
[Full Changelog](https://github.com/chef-partners/knife-vrealize/compare/v2.0.1...v2.1.0)
|
6
20
|
|
7
21
|
**Merged pull requests:**
|
8
22
|
|
23
|
+
- 2.1.0 release [\#23](https://github.com/chef-partners/knife-vrealize/pull/23) ([jjasghar](https://github.com/jjasghar))
|
9
24
|
- Added ssl-mode verify [\#22](https://github.com/chef-partners/knife-vrealize/pull/22) ([jjasghar](https://github.com/jjasghar))
|
10
25
|
|
11
26
|
## [v2.0.1](https://github.com/chef-partners/knife-vrealize/tree/v2.0.1) (2017-01-10)
|
data/Jenkinsfile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
pipeline {
|
2
|
+
agent {
|
3
|
+
docker {
|
4
|
+
image 'localhost:5000/jjkeysv3'
|
5
|
+
args '-u root'
|
6
|
+
}
|
7
|
+
|
8
|
+
}
|
9
|
+
stages {
|
10
|
+
stage('Pull down the ChefDK') {
|
11
|
+
steps {
|
12
|
+
sh '''apt-get update
|
13
|
+
apt-get install -y curl sudo git build-essential
|
14
|
+
curl -L https://chef.io/chef/install.sh | sudo bash -s -- -P chefdk -c current'''
|
15
|
+
}
|
16
|
+
}
|
17
|
+
stage('Bundle') {
|
18
|
+
steps {
|
19
|
+
sh 'chef exec bundle install'
|
20
|
+
}
|
21
|
+
}
|
22
|
+
stage('Rake') {
|
23
|
+
steps {
|
24
|
+
sh 'chef exec rake'
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
data/README.md
CHANGED
@@ -34,6 +34,7 @@ knife[:vra_username] = 'myuser'
|
|
34
34
|
knife[:vra_password] = 'mypassword'
|
35
35
|
knife[:vra_base_url] = 'https://vra.corp.local'
|
36
36
|
knife[:vra_tenant] = 'mytenant'
|
37
|
+
knife[:vra_disable_ssl_verify] = true # if you want to disable SSL checking.
|
37
38
|
```
|
38
39
|
|
39
40
|
... or you can supply them on the command-line:
|
@@ -97,6 +98,30 @@ Common parameters to specify are:
|
|
97
98
|
* `--subtenant-id`: all resources must be tied back to a Business Group, or "subtenant." If your catalog item is tied to a specific Business Group, you do not need to specify this. However, if your catalog item is a global catalog item, then the subtenant ID is not available to us; you will need to provide it. It usually looks like a UUID. See your vRA administrator for assistance in determining your subtenant ID.
|
98
99
|
* `--ssh-password`: if a linux host, the password to use during bootstrap
|
99
100
|
* `--winrm-password`: if a windows host, the password to use during bootstrap
|
101
|
+
* `--image-os-type`: windows/linux
|
102
|
+
* `--bootstrap-protocol`: winrm/ssh
|
103
|
+
* `--server-create-timeout`: increase this if your vRa environments takes more than 10 minutes to give you a server.
|
104
|
+
* `--bootstrap-version`: use to tie to a specific chefdk version if your group is not current
|
105
|
+
* `-N`: node-name of the chef node to create. The gem will automatically create a node name with prefix `vra-` if not specified
|
106
|
+
|
107
|
+
Most of these can be set in your `knife.rb` to simplify the command:
|
108
|
+
```ruby
|
109
|
+
knife[:vra_username] = 'your-username'
|
110
|
+
knife[:vra_password] = 'your-pass'
|
111
|
+
knife[:vra_base_url] = 'https://cloud.yourcompany.com'
|
112
|
+
knife[:vra_tenant] = 'your-tenant-name'
|
113
|
+
knife[:vra_disable_ssl_verify] = true # if you want to disable SSL checking.
|
114
|
+
knife[:subtenant_id] = 'your-subtenant-ID'
|
115
|
+
knife[:cpus] = '2'
|
116
|
+
knife[:memory] = '4096'
|
117
|
+
knife[:server_create_timeout] = '1800'
|
118
|
+
knife[:bootstrap_version] = '12.18.31' # pinning to an older version
|
119
|
+
knife[:server_url] = chef_server_url
|
120
|
+
knife[:requested_for] = 'your-username'
|
121
|
+
knife[:winrm_user] = 'machine-account-name'
|
122
|
+
knife[:winrm_password] = 'machine-account-pass'
|
123
|
+
```
|
124
|
+
|
100
125
|
|
101
126
|
```
|
102
127
|
$ knife vra server create 5dcd1900-3b89-433d-8563-9606ae1249b8 --cpus 1 --memory 512 --requested-for devmgr@corp.local --ssh-password 'mypassword' --lease-days 5
|
data/Rakefile
CHANGED
@@ -6,4 +6,16 @@ require 'rubocop/rake_task'
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
7
7
|
RuboCop::RakeTask.new(:style)
|
8
8
|
|
9
|
+
begin
|
10
|
+
require 'github_changelog_generator/task'
|
11
|
+
|
12
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
13
|
+
config.future_release = KnifeVrealize::VERSION
|
14
|
+
config.issues = true
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
puts 'github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
9
21
|
task default: [ :spec, :style ]
|
data/knife-vrealize.gemspec
CHANGED
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_dependency 'rb-readline', '~> 0.5'
|
28
28
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
30
|
+
spec.add_development_dependency 'github_changelog_generator'
|
30
31
|
spec.add_development_dependency 'rake', '~> 10.0'
|
31
32
|
spec.add_development_dependency 'rubocop', '~> 0.35'
|
32
33
|
end
|
@@ -129,9 +129,11 @@ class Chef
|
|
129
129
|
catalog_request.notes = options[:notes] unless options[:notes].nil?
|
130
130
|
catalog_request.subtenant_id = options[:subtenant_id] unless options[:subtenant_id].nil?
|
131
131
|
|
132
|
+
# rubocop:disable all
|
132
133
|
options[:extra_params]&.each do |param|
|
133
134
|
catalog_request.set_parameter(param[:key], param[:type], param[:value])
|
134
135
|
end
|
136
|
+
# rubocop:enable all
|
135
137
|
|
136
138
|
catalog_request
|
137
139
|
end
|
@@ -27,7 +27,8 @@ class Chef
|
|
27
27
|
includer.class_eval do
|
28
28
|
option :vra_base_url,
|
29
29
|
long: '--vra-base-url API_URL',
|
30
|
-
description: 'URL for the vRA server'
|
30
|
+
description: 'URL for the vRA server',
|
31
|
+
proc: proc { |url| url.sub(/(\/)+$/,'') }
|
31
32
|
|
32
33
|
option :vra_username,
|
33
34
|
long: '--vra-username USERNAME',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-vrealize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Partner Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.7'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: github_changelog_generator
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rake
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,11 +143,14 @@ executables: []
|
|
129
143
|
extensions: []
|
130
144
|
extra_rdoc_files: []
|
131
145
|
files:
|
146
|
+
- ".github/ISSUE_TEMPLATE.md"
|
147
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
132
148
|
- ".gitignore"
|
133
149
|
- ".rubocop.yml"
|
134
150
|
- ".travis.yml"
|
135
151
|
- CHANGELOG.md
|
136
152
|
- Gemfile
|
153
|
+
- Jenkinsfile
|
137
154
|
- LICENSE.txt
|
138
155
|
- README.md
|
139
156
|
- Rakefile
|