knife-digital_ocean 0.4.0 → 0.5.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 +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +12 -2
- data/README.md +45 -38
- data/knife-digital_ocean.gemspec +1 -1
- data/lib/chef/knife/digital_ocean_droplet_create.rb +17 -5
- data/lib/knife-digital_ocean/version.rb +1 -1
- data/spec/lib/chef/knife/digital_ocean_droplet_create_spec.rb +14 -0
- metadata +21 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26fba2dd736b05d2a0196f7fdefd5128978eeb8e
|
|
4
|
+
data.tar.gz: 32ecdbf611121df542dd0cbb8e7c2e383e1eb389
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa2fb82e4c6348ccb5db5e021ca0d55d11d87916bd0484f5d5af61f8d2f6c7e654817d3eed1fb20c43a82f2eec0748cd98497b5361f1002774fff6d680947a0f
|
|
7
|
+
data.tar.gz: c65d383ea05cfeaf0c8e4d4be91246f168aee206b6ae8b2f6a2db60ca94132711d393be5ce252aff8e8f54051b66f229684b1bd789b2e306313ef8245f43f665
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
## unreleased
|
|
2
2
|
|
|
3
|
-
* [Full Changelog](https://github.com/rmoriz/knife-digital_ocean/compare/v0.
|
|
3
|
+
* [Full Changelog](https://github.com/rmoriz/knife-digital_ocean/compare/v0.5.0...master)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## 0.5.0 / 2014-04-26
|
|
7
|
+
|
|
8
|
+
* [Full Changelog](https://github.com/rmoriz/knife-digital_ocean/compare/v0.4.0...v0.5.0)
|
|
9
|
+
* support for private networking and secret-file (thanks @popsikle)
|
|
10
|
+
* bump digital_ocean gem dependency (for faraday)
|
|
11
|
+
|
|
4
12
|
|
|
5
13
|
## 0.4.0 / 2013-12-30
|
|
6
14
|
|
|
7
15
|
* [Full Changelog](https://github.com/rmoriz/knife-digital_ocean/compare/v0.3.0...v0.4.0)
|
|
8
16
|
* bump digital_ocean gem dependency
|
|
9
|
-
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
## 0.3.0 / 2013-11-25
|
|
11
20
|
|
|
12
21
|
* [Full Changelog](https://github.com/rmoriz/knife-digital_ocean/compare/v0.2.0...v0.3.0)
|
|
13
22
|
* support for first_boot_attributes/json-attributes (thanks @zuazo)
|
|
14
23
|
* updated doc examples
|
|
15
24
|
|
|
25
|
+
|
|
16
26
|
## 0.2.0 / 2013-09-07
|
|
17
27
|
|
|
18
28
|
* [Full Changelog](https://github.com/rmoriz/knife-digital_ocean/compare/v0.1.1...v0.2.0)
|
data/README.md
CHANGED
|
@@ -66,7 +66,7 @@ If you use ```knife-solo``` try **B** and if you are a ```chef-server```-fan
|
|
|
66
66
|
use method **A**:
|
|
67
67
|
#### A. With bootstrapping in an chef-server environment:
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
__Examples__
|
|
70
70
|
|
|
71
71
|
```shell
|
|
72
72
|
➜ knife digital_ocean droplet create --server-name awesome-vm1.chef.io \
|
|
@@ -74,8 +74,18 @@ __Example__
|
|
|
74
74
|
--location 2 \
|
|
75
75
|
--size 66 \
|
|
76
76
|
--ssh-keys 1234,1235 \
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```shell
|
|
80
|
+
➜ knife digital_ocean droplet create --server-name awesome-vm2.chef.io \
|
|
81
|
+
--image 25306 \
|
|
82
|
+
--location 4 \
|
|
83
|
+
--size 66 \
|
|
84
|
+
--ssh-keys 1234,1235 \
|
|
77
85
|
--bootstrap \
|
|
78
|
-
--run-list "role[base],role[webserver]"
|
|
86
|
+
--run-list "role[base],role[webserver]" \
|
|
87
|
+
--secret-file "~/.ssh/secret_file" \
|
|
88
|
+
--private_networking
|
|
79
89
|
```
|
|
80
90
|
|
|
81
91
|
__Syntax__
|
|
@@ -87,7 +97,9 @@ __Syntax__
|
|
|
87
97
|
--size <SIZE ID> \
|
|
88
98
|
--ssh-keys <SSH KEY-ID(s), comma-separated> \
|
|
89
99
|
--bootstrap \
|
|
90
|
-
--run-list "<RUNLIST>"
|
|
100
|
+
--run-list "<RUNLIST>" \
|
|
101
|
+
--secret-file "<FILENAME>" \
|
|
102
|
+
--private_networking
|
|
91
103
|
```
|
|
92
104
|
|
|
93
105
|
__Short Syntax__
|
|
@@ -160,6 +172,8 @@ ID Name
|
|
|
160
172
|
2 Amsterdam 1
|
|
161
173
|
3 San Francisco 1
|
|
162
174
|
4 New York 2
|
|
175
|
+
5 Amsterdam 2
|
|
176
|
+
6 Singapore 1
|
|
163
177
|
```
|
|
164
178
|
|
|
165
179
|
### List sizes (instance types)
|
|
@@ -175,7 +189,6 @@ ID Name
|
|
|
175
189
|
60 32GB
|
|
176
190
|
70 48GB
|
|
177
191
|
69 64GB
|
|
178
|
-
68 96GB
|
|
179
192
|
66 512MB
|
|
180
193
|
```
|
|
181
194
|
|
|
@@ -203,36 +216,36 @@ ID Distribution Name Global
|
|
|
203
216
|
1601 CentOS CentOS 5.8 x64 +
|
|
204
217
|
376568 CentOS CentOS 6.4 x32 +
|
|
205
218
|
562354 CentOS CentOS 6.4 x64 +
|
|
219
|
+
3240847 CentOS CentOS 6.5 x32 +
|
|
220
|
+
3240850 CentOS CentOS 6.5 x64 +
|
|
206
221
|
12575 Debian Debian 6.0 x32 +
|
|
207
222
|
12573 Debian Debian 6.0 x64 +
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
3102384 Debian Debian 7.0 x32 +
|
|
224
|
+
3102387 Debian Debian 7.0 x64 +
|
|
225
|
+
3102721 Fedora Fedora 19 x32 +
|
|
226
|
+
3102879 Fedora Fedora 19 x64 +
|
|
227
|
+
3243143 Fedora Fedora 20 x32 +
|
|
228
|
+
3243145 Fedora Fedora 20 x64 +
|
|
229
|
+
3104894 Ubuntu Docker 0.10 on Ubuntu 13.10 x64 +
|
|
230
|
+
3288841 Ubuntu Dokku v0.2.3 on Ubuntu 14.04 +
|
|
231
|
+
3121555 Ubuntu Ghost 0.4.2 on Ubuntu 12.04 +
|
|
232
|
+
3118238 Ubuntu GitLab 6.6.5 CE +
|
|
233
|
+
3120115 Ubuntu LAMP on Ubuntu 12.04 +
|
|
234
|
+
3118235 Ubuntu MEAN on Ubuntu 12.04.4 +
|
|
235
|
+
3137903 Ubuntu Redmine on Ubuntu 12.04 +
|
|
236
|
+
3137635 Ubuntu Ruby on Rails on Ubuntu 12.10 (Nginx + Unicorn) +
|
|
222
237
|
14098 Ubuntu Ubuntu 10.04 x32 +
|
|
223
238
|
14097 Ubuntu Ubuntu 10.04 x64 +
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
961965 Ubuntu Ubuntu 13.10 x64 +
|
|
235
|
-
1061995 Ubuntu Wordpress on Ubuntu 12.10 +
|
|
239
|
+
3100616 Ubuntu Ubuntu 12.04.4 x32 +
|
|
240
|
+
3101045 Ubuntu Ubuntu 12.04.4 x64 +
|
|
241
|
+
3101888 Ubuntu Ubuntu 12.10 x32 +
|
|
242
|
+
3101891 Ubuntu Ubuntu 12.10 x64 +
|
|
243
|
+
3104282 Ubuntu Ubuntu 12.10 x64 Desktop +
|
|
244
|
+
3101580 Ubuntu Ubuntu 13.10 x32 +
|
|
245
|
+
3101918 Ubuntu Ubuntu 13.10 x64 +
|
|
246
|
+
3240033 Ubuntu Ubuntu 14.04 x32 +
|
|
247
|
+
3240036 Ubuntu Ubuntu 14.04 x64 +
|
|
248
|
+
3135725 Ubuntu Wordpress on Ubuntu 13.10 +
|
|
236
249
|
```
|
|
237
250
|
|
|
238
251
|
|
|
@@ -264,6 +277,7 @@ Commercial support is available. Please contact [https://roland.io/](https://rol
|
|
|
264
277
|
### Contributors
|
|
265
278
|
|
|
266
279
|
* [Teemu Matilainen](https://github.com/tmatilai)
|
|
280
|
+
* [Salvatore Poliandro](https://github.com/popsikle)
|
|
267
281
|
|
|
268
282
|
For more information and a complete list see [the contributor page on GitHub](https://github.com/rmoriz/knife-digital_ocean/contributors).
|
|
269
283
|
|
|
@@ -283,15 +297,8 @@ Ever wanted to control your DigitalOcean Droplets with your iPhone, iPad or iPod
|
|
|
283
297
|
|
|
284
298
|
## Copyright
|
|
285
299
|
|
|
286
|
-
Copyright ©
|
|
300
|
+
Copyright © 2014 [Roland Moriz](https://roland.io), [Moriz GmbH](https://moriz.de/)
|
|
287
301
|
|
|
288
302
|
[](http://www.linkedin.com/in/rmoriz)
|
|
289
303
|
[](https://twitter.com/rmoriz)
|
|
290
304
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
[](https://bitdeli.com/free "Bitdeli Badge")
|
|
297
|
-
|
data/knife-digital_ocean.gemspec
CHANGED
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
|
14
14
|
gem.license = 'Apache 2.0'
|
|
15
15
|
|
|
16
16
|
gem.add_dependency 'chef', '>= 10.18'
|
|
17
|
-
gem.add_dependency 'digital_ocean', '~> 1.
|
|
17
|
+
gem.add_dependency 'digital_ocean', '~> 1.4.0'
|
|
18
18
|
gem.add_dependency 'highline'
|
|
19
19
|
|
|
20
20
|
gem.add_development_dependency 'rspec', '~> 2.13'
|
|
@@ -128,6 +128,16 @@ class Chef
|
|
|
128
128
|
:description => 'A JSON string to be added to the first run of chef-client',
|
|
129
129
|
:proc => lambda { |o| JSON.parse(o) }
|
|
130
130
|
|
|
131
|
+
option :private_networking,
|
|
132
|
+
:long => "--private_networking",
|
|
133
|
+
:description => "Enables private networking if the selected region supports it",
|
|
134
|
+
:default => false
|
|
135
|
+
|
|
136
|
+
option :secret_file,
|
|
137
|
+
:long => "--secret-file SECRET_FILE",
|
|
138
|
+
:description => "A file containing the secret key to use to encrypt data bag item values",
|
|
139
|
+
:proc => Proc.new { |sf| Chef::Config[:knife][:secret_file] = sf }
|
|
140
|
+
|
|
131
141
|
def run
|
|
132
142
|
$stdout.sync = true
|
|
133
143
|
|
|
@@ -167,11 +177,12 @@ class Chef
|
|
|
167
177
|
exit 1
|
|
168
178
|
end
|
|
169
179
|
|
|
170
|
-
response = client.droplets.create(:name
|
|
171
|
-
:size_id
|
|
172
|
-
:image_id
|
|
173
|
-
:region_id
|
|
174
|
-
:ssh_key_ids
|
|
180
|
+
response = client.droplets.create(:name => locate_config_value(:server_name),
|
|
181
|
+
:size_id => locate_config_value(:size),
|
|
182
|
+
:image_id => locate_config_value(:image),
|
|
183
|
+
:region_id => locate_config_value(:location),
|
|
184
|
+
:ssh_key_ids => locate_config_value(:ssh_key_ids).join(','),
|
|
185
|
+
:private_networking => locate_config_value(:private_networking))
|
|
175
186
|
|
|
176
187
|
if response.status != 'OK'
|
|
177
188
|
ui.error("Droplet could not be started #{response.inspect}")
|
|
@@ -252,6 +263,7 @@ class Chef
|
|
|
252
263
|
bootstrap.config[:template_file] = locate_config_value(:template_file)
|
|
253
264
|
bootstrap.config[:environment] = locate_config_value(:environment)
|
|
254
265
|
bootstrap.config[:first_boot_attributes] = locate_config_value(:json_attributes) || {}
|
|
266
|
+
bootstrap.config[:secret_file] = locate_config_value(:secret_file) || {}
|
|
255
267
|
bootstrap
|
|
256
268
|
end
|
|
257
269
|
|
|
@@ -169,5 +169,19 @@ describe Chef::Knife::DigitalOceanDropletCreate do
|
|
|
169
169
|
end
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
+
context 'passing secret_file (--secret-file)' do
|
|
173
|
+
let(:secret_file) { '/tmp/sekretfile' }
|
|
174
|
+
let(:custom_config) {
|
|
175
|
+
{
|
|
176
|
+
:secret_file => secret_file
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
it 'secret_file should be available to Bootstrap' do
|
|
181
|
+
bootstrap = subject.bootstrap_for_node('123.123.123.123')
|
|
182
|
+
bootstrap.config[:secret_file].should eql(secret_file)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
172
186
|
end
|
|
173
187
|
|
metadata
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-digital_ocean
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roland Moriz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-04-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chef
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '10.18'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '10.18'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: digital_ocean
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - ~>
|
|
31
|
+
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.
|
|
33
|
+
version: 1.4.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - ~>
|
|
38
|
+
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
40
|
+
version: 1.4.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: highline
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - ~>
|
|
59
|
+
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '2.13'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - ~>
|
|
66
|
+
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '2.13'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rake
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: knife-solo
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- -
|
|
87
|
+
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
89
|
version: '0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- -
|
|
94
|
+
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
description: A plugin for chef's knife to manage instances of DigitalOcean servers
|
|
@@ -101,8 +101,8 @@ executables: []
|
|
|
101
101
|
extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
|
103
103
|
files:
|
|
104
|
-
- .gitignore
|
|
105
|
-
- .travis.yml
|
|
104
|
+
- ".gitignore"
|
|
105
|
+
- ".travis.yml"
|
|
106
106
|
- CHANGELOG.md
|
|
107
107
|
- Gemfile
|
|
108
108
|
- Guardfile
|
|
@@ -139,17 +139,17 @@ require_paths:
|
|
|
139
139
|
- lib
|
|
140
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements:
|
|
142
|
-
- -
|
|
142
|
+
- - ">="
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
144
|
version: '0'
|
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
requirements:
|
|
147
|
-
- -
|
|
147
|
+
- - ">="
|
|
148
148
|
- !ruby/object:Gem::Version
|
|
149
149
|
version: '0'
|
|
150
150
|
requirements: []
|
|
151
151
|
rubyforge_project:
|
|
152
|
-
rubygems_version: 2.
|
|
152
|
+
rubygems_version: 2.2.2
|
|
153
153
|
signing_key:
|
|
154
154
|
specification_version: 4
|
|
155
155
|
summary: A plugin for chef's knife to manage instances of DigitalOcean servers
|