kitchen-digitalocean 0.10.4 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/digitalocean.rb +33 -34
- data/lib/kitchen/driver/digitalocean_version.rb +3 -1
- metadata +18 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ee936b646475252b3c7690f1b75a05a41806f6a4c8acfea8b716b1f096607f7
|
4
|
+
data.tar.gz: 37ec7efe3db5588d1aeb609e3261ec00fe9b2bf62d7793967282bd208019c932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddc4afea267452af18a249a95ba44f4772fbfbdfc914e0e40ebe17ef914fc186c9be42318ccd90ab4911ffb60c5e3174c934230cee054288ccb7eded877efdb8
|
7
|
+
data.tar.gz: d8961e6347160b8a5a9e8de7528cde4551831a7f8407998800ad1a6cb847100cb04d09dc4e5613aa188b9b52a95bacc546cbb9d46d1d57040b5bef950ebe77ff
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# Author:: Greg Fitzgerald (<greg@gregf.org>)
|
3
5
|
#
|
@@ -15,12 +17,12 @@
|
|
15
17
|
# See the License for the specific language governing permissions and
|
16
18
|
# limitations under the License.
|
17
19
|
|
18
|
-
require 'benchmark'
|
19
|
-
require 'droplet_kit'
|
20
|
+
require 'benchmark' unless defined?(Benchmark)
|
21
|
+
require 'droplet_kit' unless defined?(DropletKit)
|
20
22
|
require 'kitchen'
|
21
|
-
require 'etc'
|
22
|
-
require 'socket'
|
23
|
-
require 'json'
|
23
|
+
require 'etc' unless defined?(Etc)
|
24
|
+
require 'socket' unless defined?(Socket)
|
25
|
+
require 'json' unless defined?(JSON)
|
24
26
|
|
25
27
|
module Kitchen
|
26
28
|
module Driver
|
@@ -30,7 +32,7 @@ module Kitchen
|
|
30
32
|
class Digitalocean < Kitchen::Driver::SSHBase
|
31
33
|
default_config :username, 'root'
|
32
34
|
default_config :port, '22'
|
33
|
-
default_config :size, '
|
35
|
+
default_config :size, '1gb'
|
34
36
|
default_config :monitoring, false
|
35
37
|
default_config(:image, &:default_image)
|
36
38
|
default_config(:server_name, &:default_name)
|
@@ -39,6 +41,8 @@ module Kitchen
|
|
39
41
|
default_config :user_data, nil
|
40
42
|
default_config :tags, nil
|
41
43
|
default_config :firewalls, nil
|
44
|
+
default_config :vpcs, nil
|
45
|
+
|
42
46
|
|
43
47
|
default_config :region do
|
44
48
|
ENV['DIGITALOCEAN_REGION'] || 'nyc1'
|
@@ -55,6 +59,26 @@ module Kitchen
|
|
55
59
|
required_config :digitalocean_access_token
|
56
60
|
required_config :ssh_key_ids
|
57
61
|
|
62
|
+
PLATFORM_SLUG_MAP = {
|
63
|
+
'centos-6' => 'centos-6-x64',
|
64
|
+
'centos-7' => 'centos-7-x64',
|
65
|
+
'centos-8' => 'centos-8-x64',
|
66
|
+
'coreos-stable' => 'coreos-stable',
|
67
|
+
'coreos-beta' => 'coreos-beta',
|
68
|
+
'coreos-alpha' => 'coreos-alpha',
|
69
|
+
'debian-9' => 'debian-9-x64',
|
70
|
+
'debian-10' => 'debian-10-x64',
|
71
|
+
'fedora-30' => 'fedora-30-x64',
|
72
|
+
'fedora-31' => 'fedora-31-x64',
|
73
|
+
'fedora-32' => 'fedora-32-x64',
|
74
|
+
'freebsd-11' => 'freebsd-11-x64-zfs',
|
75
|
+
'freebsd-12' => 'freebsd-12-x64-zfs',
|
76
|
+
'ubuntu-16' => 'ubuntu-16-04-x64',
|
77
|
+
'ubuntu-18' => 'ubuntu-18-04-x64',
|
78
|
+
'ubuntu-19' => 'ubuntu-19-10-x64',
|
79
|
+
'ubuntu-20' => 'ubuntu-20-04-x64'
|
80
|
+
}.freeze
|
81
|
+
|
58
82
|
def create(state)
|
59
83
|
server = create_server
|
60
84
|
|
@@ -130,8 +154,8 @@ module Kitchen
|
|
130
154
|
# platform => slug mappings, and falls back to using just the platform as
|
131
155
|
# provided if it can't find a mapping.
|
132
156
|
def default_image
|
133
|
-
|
134
|
-
|
157
|
+
PLATFORM_SLUG_MAP.fetch(instance.platform.name,
|
158
|
+
instance.platform.name)
|
135
159
|
end
|
136
160
|
|
137
161
|
# Generate what should be a unique server name up to 63 total chars
|
@@ -172,6 +196,7 @@ module Kitchen
|
|
172
196
|
private_networking: config[:private_networking],
|
173
197
|
ipv6: config[:ipv6],
|
174
198
|
user_data: config[:user_data],
|
199
|
+
vpc_uuid: config[:vpcs],
|
175
200
|
tags: if config[:tags].is_a?(String)
|
176
201
|
config[:tags].split(/\s+|,\s+|,+/)
|
177
202
|
else
|
@@ -207,32 +232,6 @@ module Kitchen
|
|
207
232
|
def debug_client_config
|
208
233
|
debug("digitalocean_api_key #{config[:digitalocean_access_token]}")
|
209
234
|
end
|
210
|
-
|
211
|
-
def platform_to_slug_mapping
|
212
|
-
{
|
213
|
-
'centos-6' => 'centos-6-x64',
|
214
|
-
'centos-7' => 'centos-7-x64',
|
215
|
-
'coreos-stable' => 'coreos-stable-x64',
|
216
|
-
'coreos-beta' => 'coreos-beta-x64',
|
217
|
-
'coreos-alpha' => 'coreos-alpha-x64',
|
218
|
-
'debian-7' => 'debian-7-x64',
|
219
|
-
'debian-8' => 'debian-8-x64',
|
220
|
-
'debian-9' => 'debian-9-x64',
|
221
|
-
'fedora-28' => 'fedora-28-x64',
|
222
|
-
'fedora-29' => 'fedora-29-x64',
|
223
|
-
'fedora-30' => 'fedora-30-x64',
|
224
|
-
'freebsd-11.2' => 'freebsd-11-2-x64-zfs',
|
225
|
-
'freebsd-11.1' => 'freebsd-11-1-x64-zfs',
|
226
|
-
'freebsd-11.0' => 'freebsd-11-0-x64-zfs',
|
227
|
-
'freebsd-10.3' => 'freebsd-10-3-x64-zfs',
|
228
|
-
'freebsd-10.4' => 'freebsd-10-4-x64-zfs',
|
229
|
-
'ubuntu-14' => 'ubuntu-14-04-x64',
|
230
|
-
'ubuntu-16' => 'ubuntu-16-04-x64',
|
231
|
-
'ubuntu-17' => 'ubuntu-17-10-x64',
|
232
|
-
'ubuntu-18' => 'ubuntu-18-04-x64',
|
233
|
-
'ubuntu-19' => 'ubuntu-19-04-x64'
|
234
|
-
}
|
235
|
-
end
|
236
235
|
end
|
237
236
|
end
|
238
237
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# Author:: Greg Fitzgerald (<greg@gregf.org>)
|
3
5
|
#
|
@@ -18,7 +20,7 @@
|
|
18
20
|
module Kitchen
|
19
21
|
module Driver
|
20
22
|
# Version string for Digital Ocean Kitchen driver
|
21
|
-
DIGITALOCEAN_VERSION = '0.
|
23
|
+
DIGITALOCEAN_VERSION = '0.11.1'
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-digitalocean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Fitzgerald
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: droplet_kit
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.7'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '4.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.7'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '4.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: test-kitchen
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,14 +140,14 @@ dependencies:
|
|
134
140
|
requirements:
|
135
141
|
- - "~>"
|
136
142
|
- !ruby/object:Gem::Version
|
137
|
-
version: '0.
|
143
|
+
version: '0.74'
|
138
144
|
type: :development
|
139
145
|
prerelease: false
|
140
146
|
version_requirements: !ruby/object:Gem::Requirement
|
141
147
|
requirements:
|
142
148
|
- - "~>"
|
143
149
|
- !ruby/object:Gem::Version
|
144
|
-
version: '0.
|
150
|
+
version: '0.74'
|
145
151
|
- !ruby/object:Gem::Dependency
|
146
152
|
name: simplecov
|
147
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,7 +204,7 @@ homepage: https://github.com/test-kitchen/kitchen-digitalocean
|
|
198
204
|
licenses:
|
199
205
|
- Apache-2.0
|
200
206
|
metadata: {}
|
201
|
-
post_install_message:
|
207
|
+
post_install_message:
|
202
208
|
rdoc_options: []
|
203
209
|
require_paths:
|
204
210
|
- lib
|
@@ -213,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
219
|
- !ruby/object:Gem::Version
|
214
220
|
version: '0'
|
215
221
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
217
|
-
signing_key:
|
222
|
+
rubygems_version: 3.1.2
|
223
|
+
signing_key:
|
218
224
|
specification_version: 4
|
219
225
|
summary: A Test Kitchen Driver for Digital Ocean
|
220
226
|
test_files: []
|