knife-openstack 1.3.2 → 2.0.0
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 +21 -0
- data/.gitignore +5 -0
- data/.travis.yml +9 -7
- data/CHANGELOG.md +174 -92
- data/Gemfile +15 -3
- data/README.md +96 -68
- data/Rakefile +19 -6
- data/knife-openstack.gemspec +17 -15
- data/lib/chef/knife/cloud/openstack_server_create_options.rb +36 -35
- data/lib/chef/knife/cloud/openstack_service.rb +7 -6
- data/lib/chef/knife/cloud/openstack_service_options.rb +18 -17
- data/lib/chef/knife/openstack_flavor_list.rb +11 -10
- data/lib/chef/knife/openstack_floating_ip_allocate.rb +13 -12
- data/lib/chef/knife/openstack_floating_ip_associate.rb +9 -8
- data/lib/chef/knife/openstack_floating_ip_disassociate.rb +9 -8
- data/lib/chef/knife/openstack_floating_ip_list.rb +10 -9
- data/lib/chef/knife/openstack_floating_ip_release.rb +7 -6
- data/lib/chef/knife/openstack_group_list.rb +13 -12
- data/lib/chef/knife/openstack_helpers.rb +8 -7
- data/lib/chef/knife/openstack_image_list.rb +14 -13
- data/lib/chef/knife/openstack_network_list.rb +10 -9
- data/lib/chef/knife/openstack_server_create.rb +57 -56
- data/lib/chef/knife/openstack_server_delete.rb +7 -6
- data/lib/chef/knife/openstack_server_list.rb +16 -15
- data/lib/chef/knife/openstack_server_show.rb +17 -16
- data/lib/chef/knife/openstack_volume_list.rb +10 -9
- data/lib/knife-openstack/version.rb +3 -2
- data/spec/functional/flavor_list_func_spec.rb +13 -12
- data/spec/functional/floating_ip_list_func_spec.rb +14 -13
- data/spec/functional/group_list_func_spec.rb +29 -28
- data/spec/functional/image_list_func_spec.rb +15 -14
- data/spec/functional/network_list_func_spec.rb +13 -12
- data/spec/functional/server_create_func_spec.rb +29 -28
- data/spec/functional/server_delete_func_spec.rb +18 -17
- data/spec/functional/server_list_func_spec.rb +43 -42
- data/spec/functional/server_show_func_spec.rb +7 -6
- data/spec/functional/volume_list_func_spec.rb +12 -11
- data/spec/integration/cleanup.rb +6 -5
- data/spec/integration/openstack_spec.rb +287 -286
- data/spec/spec_context.rb +10 -9
- data/spec/spec_helper.rb +38 -37
- data/spec/unit/openstack_flavor_list_spec.rb +6 -5
- data/spec/unit/openstack_floating_ip_allocate_spec.rb +14 -13
- data/spec/unit/openstack_floating_ip_associate_spec.rb +11 -10
- data/spec/unit/openstack_floating_ip_disassociate_spec.rb +12 -11
- data/spec/unit/openstack_floating_ip_list_spec.rb +6 -5
- data/spec/unit/openstack_floating_ip_release_spec.rb +13 -12
- data/spec/unit/openstack_group_list_spec.rb +11 -10
- data/spec/unit/openstack_image_list_spec.rb +6 -5
- data/spec/unit/openstack_network_list_spec.rb +8 -7
- data/spec/unit/openstack_server_create_spec.rb +131 -130
- data/spec/unit/openstack_server_delete_spec.rb +8 -7
- data/spec/unit/openstack_server_list_spec.rb +6 -5
- data/spec/unit/openstack_server_show_spec.rb +10 -9
- data/spec/unit/openstack_service_spec.rb +26 -25
- data/spec/unit/openstack_volume_list_spec.rb +6 -5
- metadata +9 -105
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e9ae8a2964b8b9d3148565d2501577204f8e233
|
4
|
+
data.tar.gz: 13c67a85bcc597dbd81983dcda328c8ff1e754f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d5255cd25789d65f332146341a59c22936409ba8de6b40a8b8389df136428851dc93f2dee98e5f47e0e7c517da64fe2349d1f384a55d4f26a472f82786fc85b
|
7
|
+
data.tar.gz: 0bb4cbf6a8eb74af7183bc9ac4433ba68237a7d89e0b30ab78d09258872f54702488cef25b1cc63e92c146c16da8d9409e6b1ff7799015dc9f5e1859bb3ea513
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Version:
|
2
|
+
|
3
|
+
[Version of the project installed]
|
4
|
+
|
5
|
+
# Environment: [Details about the environment such as the Operating System, cookbook details, etc...]
|
6
|
+
|
7
|
+
# Scenario:
|
8
|
+
|
9
|
+
[What you are trying to achieve and you can't?]
|
10
|
+
|
11
|
+
# Steps to Reproduce:
|
12
|
+
|
13
|
+
[If you are filing an issue what are the things we need to do in order to repro your problem?]
|
14
|
+
|
15
|
+
# Expected Result:
|
16
|
+
|
17
|
+
[What are you expecting to happen as the consequence of above reproduction steps?]
|
18
|
+
|
19
|
+
# Actual Result:
|
20
|
+
|
21
|
+
[What actually happens after the reproduction steps?]
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
sudo: false
|
1
4
|
rvm:
|
2
|
-
- 2.
|
3
|
-
- 2.1
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
- "chat.freenode.net#openstack-chef"
|
5
|
+
- 2.2.5
|
6
|
+
- 2.3.1
|
7
|
+
branches:
|
8
|
+
only:
|
9
|
+
- master
|
10
|
+
script: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,92 +1,174 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
## v1.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
##
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [2.0.0](https://github.com/chef/knife-openstack/tree/2.0.0) (2016-12-12)
|
4
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.2...2.0.0)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Require Chef 12 and resolve all Chefstyle warnings [\#191](https://github.com/chef/knife-openstack/pull/191) ([tas50](https://github.com/tas50))
|
9
|
+
- Add contributing section to the readme [\#190](https://github.com/chef/knife-openstack/pull/190) ([tas50](https://github.com/tas50))
|
10
|
+
- Add license to the gemspec & update Travis config [\#184](https://github.com/chef/knife-openstack/pull/184) ([tas50](https://github.com/tas50))
|
11
|
+
- Improve the readme [\#182](https://github.com/chef/knife-openstack/pull/182) ([jjasghar](https://github.com/jjasghar))
|
12
|
+
|
13
|
+
## [v1.3.2](https://github.com/chef/knife-openstack/tree/v1.3.2) (2015-10-07)
|
14
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.2.rc1...v1.3.2)
|
15
|
+
|
16
|
+
## [v1.3.2.rc1](https://github.com/chef/knife-openstack/tree/v1.3.2.rc1) (2015-10-01)
|
17
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.2.pre.1...v1.3.2.rc1)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Support all Fog OpenStack options [\#179](https://github.com/chef/knife-openstack/pull/179) ([BobbyRyterski](https://github.com/BobbyRyterski))
|
22
|
+
|
23
|
+
**Fixed bugs:**
|
24
|
+
|
25
|
+
- knife-openstack server list [\#175](https://github.com/chef/knife-openstack/issues/175)
|
26
|
+
|
27
|
+
## [v1.3.2.pre.1](https://github.com/chef/knife-openstack/tree/v1.3.2.pre.1) (2015-09-15)
|
28
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.2.pre...v1.3.2.pre.1)
|
29
|
+
|
30
|
+
**Fixed bugs:**
|
31
|
+
|
32
|
+
- Fixed ip addresses not visible issue [\#178](https://github.com/chef/knife-openstack/pull/178) ([Vasu1105](https://github.com/Vasu1105))
|
33
|
+
|
34
|
+
## [v1.3.2.pre](https://github.com/chef/knife-openstack/tree/v1.3.2.pre) (2015-09-04)
|
35
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.1...v1.3.2.pre)
|
36
|
+
|
37
|
+
**Fixed bugs:**
|
38
|
+
|
39
|
+
- Fix cloud command class loading [\#174](https://github.com/chef/knife-openstack/pull/174) ([Cluster444](https://github.com/Cluster444))
|
40
|
+
|
41
|
+
## [v1.3.1](https://github.com/chef/knife-openstack/tree/v1.3.1) (2015-07-18)
|
42
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.0...v1.3.1)
|
43
|
+
|
44
|
+
## [v1.3.0](https://github.com/chef/knife-openstack/tree/v1.3.0) (2015-07-18)
|
45
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.3.0.rc.0...v1.3.0)
|
46
|
+
|
47
|
+
**Implemented enhancements:**
|
48
|
+
|
49
|
+
- Set the openstack ohai hint when creating a server [\#171](https://github.com/chef/knife-openstack/pull/171) ([mtougeron](https://github.com/mtougeron))
|
50
|
+
- Add floating ip commands [\#170](https://github.com/chef/knife-openstack/pull/170) ([Vasu1105](https://github.com/Vasu1105))
|
51
|
+
|
52
|
+
## [v1.3.0.rc.0](https://github.com/chef/knife-openstack/tree/v1.3.0.rc.0) (2015-06-25)
|
53
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.2.0...v1.3.0.rc.0)
|
54
|
+
|
55
|
+
**Implemented enhancements:**
|
56
|
+
|
57
|
+
- Support --format option [\#166](https://github.com/chef/knife-openstack/pull/166) ([NimishaS](https://github.com/NimishaS))
|
58
|
+
|
59
|
+
## [v1.2.0](https://github.com/chef/knife-openstack/tree/v1.2.0) (2015-06-18)
|
60
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.2.0.rc2...v1.2.0)
|
61
|
+
|
62
|
+
## [v1.2.0.rc2](https://github.com/chef/knife-openstack/tree/v1.2.0.rc2) (2015-06-10)
|
63
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.2.0.rc1...v1.2.0.rc2)
|
64
|
+
|
65
|
+
## [v1.2.0.rc1](https://github.com/chef/knife-openstack/tree/v1.2.0.rc1) (2015-06-04)
|
66
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v1.1.0...v1.2.0.rc1)
|
67
|
+
|
68
|
+
**Implemented enhancements:**
|
69
|
+
|
70
|
+
- Allow users to specify alternate private networks. [\#163](https://github.com/chef/knife-openstack/pull/163) ([elbandito](https://github.com/elbandito))
|
71
|
+
- Add volume capabilities to allow listing and attaching volumes [\#142](https://github.com/chef/knife-openstack/pull/142) ([karcaw](https://github.com/karcaw))
|
72
|
+
|
73
|
+
## [v1.1.0](https://github.com/chef/knife-openstack/tree/v1.1.0) (2015-03-06)
|
74
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/1.0.0...v1.1.0)
|
75
|
+
|
76
|
+
**Implemented enhancements:**
|
77
|
+
|
78
|
+
- Add ability to specify host when using the -Z flag to specify availability-zone [\#158](https://github.com/chef/knife-openstack/issues/158)
|
79
|
+
- Support multiple regions [\#148](https://github.com/chef/knife-openstack/pull/148) ([jedipunkz](https://github.com/jedipunkz))
|
80
|
+
|
81
|
+
**Fixed bugs:**
|
82
|
+
|
83
|
+
- Fix failing rspec tests [\#155](https://github.com/chef/knife-openstack/pull/155) ([PierreRambaud](https://github.com/PierreRambaud))
|
84
|
+
- Fix travis badge in the readme [\#154](https://github.com/chef/knife-openstack/pull/154) ([PierreRambaud](https://github.com/PierreRambaud))
|
85
|
+
|
86
|
+
## [1.0.0](https://github.com/chef/knife-openstack/tree/1.0.0) (2014-10-07)
|
87
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/1.0.0.rc2...1.0.0)
|
88
|
+
|
89
|
+
## [1.0.0.rc2](https://github.com/chef/knife-openstack/tree/1.0.0.rc2) (2014-09-29)
|
90
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/1.0.0.rc1...1.0.0.rc2)
|
91
|
+
|
92
|
+
**Implemented enhancements:**
|
93
|
+
|
94
|
+
- Improve port id detection [\#144](https://github.com/chef/knife-openstack/pull/144) ([karcaw](https://github.com/karcaw))
|
95
|
+
|
96
|
+
## [1.0.0.rc1](https://github.com/chef/knife-openstack/tree/1.0.0.rc1) (2014-09-24)
|
97
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/0.10.0...1.0.0.rc1)
|
98
|
+
|
99
|
+
**Implemented enhancements:**
|
100
|
+
|
101
|
+
- Add Fog dependency to the Gemspec [\#136](https://github.com/chef/knife-openstack/pull/136) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
102
|
+
- Implement changes for post connection validation [\#127](https://github.com/chef/knife-openstack/pull/127) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
103
|
+
- Specify name or id for image and flavor in server create [\#120](https://github.com/chef/knife-openstack/pull/120) ([kaustubh-d](https://github.com/kaustubh-d))
|
104
|
+
- KNIFE-478: Add ability to bootstrap with SSH passwords [\#118](https://github.com/chef/knife-openstack/pull/118) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
105
|
+
- Added network id option to server create command [\#114](https://github.com/chef/knife-openstack/pull/114) ([prabhu-das](https://github.com/prabhu-das))
|
106
|
+
- KNIFE-494 add options for secret and secret\_file to support encrypted data bags [\#113](https://github.com/chef/knife-openstack/pull/113) ([jvervlied](https://github.com/jvervlied))
|
107
|
+
- Sorting list output by name field [\#112](https://github.com/chef/knife-openstack/pull/112) ([prabhu-das](https://github.com/prabhu-das))
|
108
|
+
- KNIFE-477: Delete server by name if instance\_id isn't found [\#111](https://github.com/chef/knife-openstack/pull/111) ([ameyavarade](https://github.com/ameyavarade))
|
109
|
+
- Add 'knife openstack network list' [\#110](https://github.com/chef/knife-openstack/pull/110) ([prabhu-das](https://github.com/prabhu-das))
|
110
|
+
- KNIFE-368 Ability to specify metadata during OpenStack server create [\#109](https://github.com/chef/knife-openstack/pull/109) ([ameyavarade](https://github.com/ameyavarade))
|
111
|
+
- KNIFE-428 Basic availability zones support [\#108](https://github.com/chef/knife-openstack/pull/108) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
112
|
+
|
113
|
+
**Fixed bugs:**
|
114
|
+
|
115
|
+
- Fixes Associate IPs for neutron [\#141](https://github.com/chef/knife-openstack/pull/141) ([jjasghar](https://github.com/jjasghar))
|
116
|
+
- Fix bug with --no-network [\#125](https://github.com/chef/knife-openstack/pull/125) ([prabhu-das](https://github.com/prabhu-das))
|
117
|
+
- KNIFE-474 knife openstack group list throws a fog deprecation warning [\#107](https://github.com/chef/knife-openstack/pull/107) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
118
|
+
- KNIFE-467 --no-network fails to find first network IP address [\#106](https://github.com/chef/knife-openstack/pull/106) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
119
|
+
- README: Clarify misleading knife.rb snippet [\#104](https://github.com/chef/knife-openstack/pull/104) ([srenatus](https://github.com/srenatus))
|
120
|
+
|
121
|
+
## [0.10.0](https://github.com/chef/knife-openstack/tree/0.10.0) (2014-05-09)
|
122
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/0.9.1...0.10.0)
|
123
|
+
|
124
|
+
**Implemented enhancements:**
|
125
|
+
|
126
|
+
- KNIFE-478: Add ability to bootstrap with SSH passwords [\#101](https://github.com/chef/knife-openstack/pull/101) ([jmccann](https://github.com/jmccann))
|
127
|
+
- Remove activesupport gem dependency and fix broken tests [\#100](https://github.com/chef/knife-openstack/pull/100) ([prabhu-das](https://github.com/prabhu-das))
|
128
|
+
- Add --no-network flag [\#97](https://github.com/chef/knife-openstack/pull/97) ([prabhu-das](https://github.com/prabhu-das))
|
129
|
+
- OC-11565 Add support for parameter --user-data during server create for knife-cloud [\#94](https://github.com/chef/knife-openstack/pull/94) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
130
|
+
- OC-11564 Update Openstack: Add bootstrap\_network option support [\#93](https://github.com/chef/knife-openstack/pull/93) ([ameyavarade](https://github.com/ameyavarade))
|
131
|
+
- OC-11563 Add support for setting OpenStack endpoint type for Knife-Cloud [\#92](https://github.com/chef/knife-openstack/pull/92) ([siddheshwar-more](https://github.com/siddheshwar-more))
|
132
|
+
|
133
|
+
## [0.9.1](https://github.com/chef/knife-openstack/tree/0.9.1) (2014-03-12)
|
134
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/0.9.0...0.9.1)
|
135
|
+
|
136
|
+
## [0.9.0](https://github.com/chef/knife-openstack/tree/0.9.0) (2014-03-07)
|
137
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.8.1...0.9.0)
|
138
|
+
|
139
|
+
## [v0.8.1](https://github.com/chef/knife-openstack/tree/v0.8.1) (2013-06-14)
|
140
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.8.0...v0.8.1)
|
141
|
+
|
142
|
+
## [v0.8.0](https://github.com/chef/knife-openstack/tree/v0.8.0) (2013-05-13)
|
143
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.7.1...v0.8.0)
|
144
|
+
|
145
|
+
## [v0.7.1](https://github.com/chef/knife-openstack/tree/v0.7.1) (2013-04-11)
|
146
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/0.7.0...v0.7.1)
|
147
|
+
|
148
|
+
## [0.7.0](https://github.com/chef/knife-openstack/tree/0.7.0) (2013-03-09)
|
149
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.6.2...0.7.0)
|
150
|
+
|
151
|
+
## [v0.6.2](https://github.com/chef/knife-openstack/tree/v0.6.2) (2012-10-14)
|
152
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.6.0...v0.6.2)
|
153
|
+
|
154
|
+
## [v0.6.0](https://github.com/chef/knife-openstack/tree/v0.6.0) (2012-06-27)
|
155
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.5.4...v0.6.0)
|
156
|
+
|
157
|
+
## [v0.5.4](https://github.com/chef/knife-openstack/tree/v0.5.4) (2011-05-03)
|
158
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.5.3...v0.5.4)
|
159
|
+
|
160
|
+
## [v0.5.3](https://github.com/chef/knife-openstack/tree/v0.5.3) (2011-04-06)
|
161
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.5.2...v0.5.3)
|
162
|
+
|
163
|
+
## [v0.5.2](https://github.com/chef/knife-openstack/tree/v0.5.2) (2011-04-06)
|
164
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.5.1...v0.5.2)
|
165
|
+
|
166
|
+
## [v0.5.1](https://github.com/chef/knife-openstack/tree/v0.5.1) (2011-04-05)
|
167
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/v0.5.0...v0.5.1)
|
168
|
+
|
169
|
+
## [v0.5.0](https://github.com/chef/knife-openstack/tree/v0.5.0) (2011-03-30)
|
170
|
+
[Full Changelog](https://github.com/chef/knife-openstack/compare/0449e574d540d0d7fbc96ffebad68ec1ae215423...v0.5.0)
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/Gemfile
CHANGED
@@ -1,9 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
source "https://rubygems.org"
|
2
3
|
|
3
4
|
# Specify your gem's dependencies in knife-openstack.gemspec
|
4
5
|
gemspec
|
5
6
|
|
6
7
|
group :development do
|
7
|
-
gem
|
8
|
-
gem
|
8
|
+
gem "guard-rspec"
|
9
|
+
gem "mixlib-shellout"
|
10
|
+
gem "rake", "~> 11.0"
|
11
|
+
gem "rspec", "~> 3.0"
|
12
|
+
gem "chefstyle"
|
13
|
+
gem "rspec-expectations"
|
14
|
+
gem "rspec-mocks"
|
15
|
+
gem "rspec_junit_formatter"
|
16
|
+
end
|
17
|
+
|
18
|
+
# our use of the fork can go away if they merge https://github.com/skywinder/github-changelog-generator/pull/453
|
19
|
+
group(:changelog) do
|
20
|
+
gem "github_changelog_generator", git: "https://github.com/tduffield/github-changelog-generator", branch: "adjust-tag-section-mapping"
|
9
21
|
end
|
data/README.md
CHANGED
@@ -1,143 +1,170 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/chef/knife-openstack.png)](https://travis-ci.org/chef/knife-openstack)
|
2
|
-
|
3
1
|
# Knife OpenStack
|
4
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/knife-openstack.svg)](https://rubygems.org/gems/knife-openstack) [![Build Status](https://travis-ci.org/chef/knife-openstack.svg?branch=master)](https://travis-ci.org/chef/knife-openstack) [![Dependency Status](https://gemnasium.com/chef/knife-openstack.svg)](https://gemnasium.com/chef/knife-openstack)
|
4
|
+
|
5
5
|
This is the official Chef Knife plugin for OpenStack Compute (Nova). This plugin gives knife the ability to create, bootstrap and manage instances in OpenStack Compute clouds. It has been tested against the `Diablo` through `Kilo` releases in configurations using Keystone against the OpenStack API (as opposed to the EC2 API).
|
6
6
|
|
7
7
|
Please refer to the [CHANGELOG](CHANGELOG.md) for version history and known issues.
|
8
8
|
|
9
|
-
|
9
|
+
- Documentation: <https://github.com/chef/knife-openstack/blob/master/README.md>
|
10
|
+
- Source: <http://github.com/chef/knife-openstack/tree/master>
|
11
|
+
- Issues: <https://github.com/chef/knife-openstack/issues>
|
12
|
+
- Slack: <http://community-slack.chef.io/>
|
13
|
+
- Mailing list: <https://discourse.chef.io/>
|
10
14
|
|
11
|
-
|
15
|
+
Note: Documentation needs to be updated in chef docs
|
12
16
|
|
13
|
-
|
17
|
+
## Requirements
|
14
18
|
|
15
|
-
|
19
|
+
- Chef 12.0 higher
|
20
|
+
- Ruby 2.2.2 or higher
|
21
|
+
|
22
|
+
## Installation
|
16
23
|
|
17
|
-
|
18
|
-
OR
|
19
|
-
$ gem install knife-openstack
|
24
|
+
Using [ChefDK](https://downloads.chef.io/chef-dk/), simply install the Gem:
|
20
25
|
|
21
|
-
|
26
|
+
```bash
|
27
|
+
chef gem install knife-openstack
|
28
|
+
```
|
22
29
|
|
23
30
|
## Configuration
|
24
31
|
|
25
32
|
In order to communicate with an OpenStack API you will need to tell Knife your OpenStack Auth API endpoint, your Dashboard username and password (tenant is optional). The easiest way to accomplish this is to create these entries in your `knife.rb` file:
|
26
33
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
34
|
+
```ruby
|
35
|
+
### Note: If you are not proxying HTTPS to the OpenStack auth port, the scheme should be HTTP
|
36
|
+
knife[:openstack_auth_url] = "http://cloud.mycompany.com:5000/v2.0/tokens"
|
37
|
+
knife[:openstack_username] = "Your OpenStack Dashboard username"
|
38
|
+
knife[:openstack_password] = "Your OpenStack Dashboard password"
|
39
|
+
knife[:openstack_tenant] = "Your OpenStack tenant name"
|
40
|
+
knife[:openstack_region] = "Your OpenStack Region"
|
41
|
+
```
|
42
|
+
|
43
|
+
All of Fog's `openstack` options (`openstack_domain_name`, `openstack_project_name`, ...) are supported. This includes support for the OpenStack Identity v3
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
knife[:openstack_auth_url] = "http://cloud.mycompany.com:5000/v3/auth/tokens"
|
47
|
+
knife[:openstack_username] = "Your OpenStack Dashboard username"
|
48
|
+
knife[:openstack_password] = "Your OpenStack Dashboard password"
|
49
|
+
knife[:openstack_project_name] = "Your OpenStack project"
|
50
|
+
knife[:openstack_domain_name] = "Your OpenStack domain"
|
51
|
+
```
|
52
|
+
|
53
|
+
If your knife.rb file will be checked into a SCM system (ie readable by others) you may want to read the values from environment variables. For example, using the conventions of [OpenStack's RC file](http://docs.openstack.org/user-guide/content/cli_openrc.html) (note the `openstack_auth_url`):
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
knife[:openstack_auth_url] = "#{ENV['OS_AUTH_URL']}/tokens"
|
57
|
+
knife[:openstack_username] = "#{ENV['OS_USERNAME']}"
|
58
|
+
knife[:openstack_password] = "#{ENV['OS_PASSWORD']}"
|
59
|
+
knife[:openstack_tenant] = "#{ENV['OS_TENANT_NAME']}"
|
60
|
+
knife[:openstack_region] = "#{ENV['OS_REGION_NAME']}"
|
61
|
+
```
|
49
62
|
|
50
63
|
If your OpenStack deployment is over SSL, but does not have a valid certificate, you can add the following option to bypass SSL check:
|
51
64
|
|
52
|
-
|
65
|
+
```ruby
|
66
|
+
knife[:openstack_insecure] = true
|
67
|
+
```
|
53
68
|
|
54
69
|
If you need to use alternate service endpoints for communicating with OpenStack, you can set the following option:
|
55
70
|
|
56
|
-
|
71
|
+
```ruby
|
72
|
+
knife[:openstack_endpoint_type] = "internalURL"
|
73
|
+
```
|
57
74
|
|
58
75
|
You also have the option of passing your OpenStack API Username/Password into the individual knife subcommands using the `-A` (or `--openstack-username`) `-K` (or `--openstack-password`) command options
|
59
76
|
|
60
|
-
|
61
|
-
|
77
|
+
```bash
|
78
|
+
# provision a new image named kb01
|
79
|
+
knife openstack server create -A 'MyUsername' -K 'MyPassword' --openstack-api-endpoint 'http://cloud.mycompany.com:5000/v2.0/tokens' -f 1 -I 13 -S trystack -i ~/.ssh/trystack.pem -r 'role[webserver]'
|
80
|
+
```
|
62
81
|
|
63
82
|
Additionally the following options may be set in your `knife.rb`:
|
64
83
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
84
|
+
- flavor
|
85
|
+
- image
|
86
|
+
- openstack_ssh_key_id
|
87
|
+
- template_file
|
88
|
+
|
89
|
+
## Subcommands
|
69
90
|
|
70
|
-
|
91
|
+
This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a `--help` option.
|
71
92
|
|
72
|
-
|
93
|
+
### `knife openstack server create`
|
73
94
|
|
74
|
-
|
95
|
+
Provisions a new server in an OpenStack Compute cloud and then perform a Chef bootstrap (using the SSH protocol). The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily intended for Chef Client systems that talk to a Chef server. By default the server is bootstrapped using the [chef-full](https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/chef-full.erb) template (default since the 10.10 release). This may be overridden using the `-d` or `--template-file` command options. If you do not have public IP addresses, use the `--openstack-private-network` option to use the private IP address for bootstrapping. In addition, you can use the `--bootstrap-network NAME` option to specify an alternate network for either a private or public network. If a network name isn't specified, the default name will be `'public'` for a public network and `'private'` for a private network e.g. when the `--openstack-private-network` option is specified. Please see `knife openstack server create --help` for all of the supported options.
|
96
|
+
|
97
|
+
#### Working with Windows Images
|
75
98
|
|
76
99
|
Provisioning and bootstrapping for Windows 2003 and later images is now supported. The Windows images need to have WinRM enabled with Basic Authentication configured. Current support does not support Kerberos Authentication.
|
77
100
|
|
78
101
|
Example:
|
79
102
|
|
80
|
-
|
103
|
+
```bash
|
104
|
+
$ knife openstack server create -I <Image> -f <Flavor> -S <keypair_name> --bootstrap-protocol winrm -P <Administrator_Password> -x Administrator -N <chef_node_name> --bootstrap-template windows-chef-client-msi.erb
|
105
|
+
```
|
81
106
|
|
82
107
|
NOTE:
|
83
|
-
* Bootstrap Protocol (`--bootstrap-protocol`) is required to be set to `winrm`.
|
84
|
-
* Administrator Username (`--winrm-user` or `-x`) and Password (`-P`) are required parameters.
|
85
|
-
* If the Template File (`--template`) is not specified it defaults to a Linux distro (most likely Ubuntu).
|
86
|
-
|
87
|
-
## Subcommands
|
88
108
|
|
89
|
-
|
109
|
+
- Bootstrap Protocol (`--bootstrap-protocol`) is required to be set to `winrm`.
|
110
|
+
- Administrator Username (`--winrm-user` or `-x`) and Password (`-P`) are required parameters.
|
111
|
+
- If the Template File (`--template`) is not specified it defaults to a Linux distro (most likely Ubuntu).
|
90
112
|
|
91
|
-
|
113
|
+
#### Working with Floating IPs
|
92
114
|
|
93
|
-
|
115
|
+
To use a floating IP address while bootstrapping nodes, use the `-a` or `--openstack-floating-ip` option.
|
94
116
|
|
95
|
-
### knife openstack server delete
|
117
|
+
### `knife openstack server delete`
|
96
118
|
|
97
|
-
Deletes an existing server in the currently configured OpenStack account. If a floating IP address has been assigned to the node, it is disassociated automatically by the OpenStack server.
|
119
|
+
Deletes an existing server in the currently configured OpenStack account. If a floating IP address has been assigned to the node, it is disassociated automatically by the OpenStack server. **PLEASE NOTE** - this does not delete the associated node and client objects from the Chef server without using the `-P` option to purge the client.
|
98
120
|
|
99
|
-
### knife openstack server list
|
121
|
+
### `knife openstack server list`
|
100
122
|
|
101
|
-
Outputs a list of all servers in the currently configured OpenStack account.
|
123
|
+
Outputs a list of all servers in the currently configured OpenStack account. **PLEASE NOTE** - this shows all instances associated with the account, some of which may not be currently managed by the Chef server.
|
102
124
|
|
103
|
-
### knife openstack flavor list
|
125
|
+
### `knife openstack flavor list`
|
104
126
|
|
105
127
|
Provides a list of all available flavors (available "hardware" configurations for a server) available to the currently configured OpenStack account. Each flavor has a unique combination of virtual cpus, disk space and memory capacity. This data may be useful when choosing a flavor to pass to the `knife openstack server create` subcommand.
|
106
128
|
|
107
|
-
### knife openstack volume list
|
129
|
+
### `knife openstack volume list`
|
108
130
|
|
109
131
|
Provides a list of all volumes in the currently configured OpenStack account. Each volume shows its size and its availibility to be attached to server. This data may be useful when choosing a volume to pass to the `knife openstack server create` subcommand.
|
110
132
|
|
111
|
-
### knife openstack image list
|
133
|
+
### `knife openstack image list`
|
112
134
|
|
113
135
|
Lists all available images and snapshots available to the currently configured OpenStack account. An image is a collection of files used to create or rebuild a server. The retuned list filters out image names ending in 'initrd', 'kernel', 'loader', 'virtual' or 'vmlinuz' (this may be disabled with `--disable-filter`). This data may be useful when choosing an image to pass to the `knife openstack server create` subcommand.
|
114
136
|
|
115
|
-
### knife openstack group list
|
137
|
+
### `knife openstack group list`
|
116
138
|
|
117
139
|
Provides a list of the security groups available to the currently configured OpenStack account. Each group may have multiple rules. This data may be useful when choosing your security group(s) to pass to the `knife openstack server create` subcommand.
|
118
140
|
|
119
|
-
### knife openstack network list
|
141
|
+
### `knife openstack network list`
|
120
142
|
|
121
143
|
Lists the networks available to the currently configured OpenStack account. This data may be useful when choosing your networks to pass to the `knife openstack server create` subcommand. This command is only available with OpenStack deployments using the Neutron network service (not nova-network). Please see `knife openstack server create --help` for all of the supported options.
|
122
144
|
|
123
|
-
### knife openstack floating_ip list
|
145
|
+
### `knife openstack floating_ip list`
|
124
146
|
|
125
147
|
Lists all of the available `floating-ips` you have associated with your account. You can ask for more via: `knife openstack floating_ip allocate --pool POOL` if you have run out. You can also `knife openstack floating_ip associate FLOATING_IP --instance-id INSTANCE_ID` and too. If you need to remove the `floating-ip` you can `disassociate` with the same command. If you would like to give back the `floating-ip` you can `knife openstack floating_ip release FLOATING_IP_ID`
|
126
148
|
|
127
|
-
|
149
|
+
## Contributing
|
150
|
+
|
151
|
+
For information on contributing to this project see <https://github.com/chef/chef/blob/master/CONTRIBUTING.md>
|
152
|
+
|
153
|
+
## License
|
128
154
|
|
129
|
-
Author:: Seth Chisamore (
|
155
|
+
Author:: Seth Chisamore ([schisamo@chef.io](mailto:schisamo@chef.io))
|
130
156
|
|
131
|
-
Author:: Matt Ray (
|
157
|
+
Author:: Matt Ray ([matt@chef.io](mailto:matt@chef.io))
|
132
158
|
|
133
|
-
Author:: Chirag Jog (
|
159
|
+
Author:: Chirag Jog ([chirag@clogeny.com](mailto:chirag@clogeny.com))
|
134
160
|
|
135
|
-
Author:: JJ Asghar (
|
161
|
+
Author:: JJ Asghar ([jj@chef.io](mailto:jj@chef.io))
|
136
162
|
|
137
|
-
Copyright:: Copyright (c) 2011-
|
163
|
+
Copyright:: Copyright (c) 2011-2016 Chef Software, Inc.
|
138
164
|
|
139
165
|
License:: Apache License, Version 2.0
|
140
166
|
|
167
|
+
```text
|
141
168
|
Licensed under the Apache License, Version 2.0 (the "License");
|
142
169
|
you may not use this file except in compliance with the License.
|
143
170
|
You may obtain a copy of the License at
|
@@ -149,3 +176,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
149
176
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
150
177
|
See the License for the specific language governing permissions and
|
151
178
|
limitations under the License.
|
179
|
+
```
|