kitchen-ec2 3.5.0 → 3.6.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/lib/kitchen/driver/aws/client.rb +10 -0
- data/lib/kitchen/driver/aws/instance_generator.rb +3 -1
- data/lib/kitchen/driver/aws/standard_platform/amazon.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/amazon2.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/centos.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/debian.rb +4 -1
- data/lib/kitchen/driver/aws/standard_platform/fedora.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/freebsd.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/rhel.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/ubuntu.rb +2 -0
- data/lib/kitchen/driver/aws/standard_platform/windows.rb +2 -0
- data/lib/kitchen/driver/ec2_version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba67c03a470c6f9e73dc53b886a468a0003c24d9116cee97075ddc99da8a7529
|
|
4
|
+
data.tar.gz: 8c77eba9c51421b234c0f5b2a7b75295eca8b5385a13cb9ca4213d4e65d5ddb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdd64c2dd9a1b9e1a0811cc7a9bb34984f5a6bf9791b06d4ee2dcf05136d491a4024fd25b2c8cc996160970a155facad432c64270e2afebee9b6e4b3539ac30b
|
|
7
|
+
data.tar.gz: 7597be672135a237bbfd11b5e40a0f1397d0f374253ac6eb1123834263c6d53b14509f2c7d662dae225bbd399acd494793c9d07fae225cf1480bbb986fc0b871
|
|
@@ -49,14 +49,24 @@ module Kitchen
|
|
|
49
49
|
::Aws.config.update(retry_limit: retry_limit) unless retry_limit.nil?
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
# create a new AWS EC2 instance
|
|
53
|
+
# @param options [Hash] has of instance options
|
|
54
|
+
# @see https://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Resource.html#create_instances-instance_method
|
|
55
|
+
# @return [Aws::EC2::Instance]
|
|
52
56
|
def create_instance(options)
|
|
53
57
|
resource.create_instances(options).first
|
|
54
58
|
end
|
|
55
59
|
|
|
60
|
+
# get an instance object given an id
|
|
61
|
+
# @param id [String] aws instance id
|
|
62
|
+
# @return [Aws::EC2::Instance]
|
|
56
63
|
def get_instance(id)
|
|
57
64
|
resource.instance(id)
|
|
58
65
|
end
|
|
59
66
|
|
|
67
|
+
# get an instance object given a spot request ID
|
|
68
|
+
# @param request_id [String] aws spot instance id
|
|
69
|
+
# @return [Aws::EC2::Instance]
|
|
60
70
|
def get_instance_from_spot_request(request_id)
|
|
61
71
|
resource.instances(
|
|
62
72
|
filters: [{
|
|
@@ -39,8 +39,10 @@ module Kitchen
|
|
|
39
39
|
@logger = logger
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# Transform the provided config into the hash
|
|
42
|
+
# Transform the provided kitchen config into the hash we'll use to create the aws instance
|
|
43
43
|
# can be passed in null, others need to be ommitted if they are null
|
|
44
|
+
# Some fields can be passed in null, others need to be ommitted if they are null
|
|
45
|
+
# @return [Hash]
|
|
44
46
|
def ec2_instance_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
|
45
47
|
# Support for looking up security group id and subnet id using tags.
|
|
46
48
|
vpc_id = nil
|
|
@@ -23,6 +23,8 @@ module Kitchen
|
|
|
23
23
|
class Centos < StandardPlatform
|
|
24
24
|
StandardPlatform.platforms["centos"] = self
|
|
25
25
|
|
|
26
|
+
# default username for this platform's ami
|
|
27
|
+
# @return [String]
|
|
26
28
|
def username
|
|
27
29
|
# Centos 6.x images use root as the username (but the "centos 6"
|
|
28
30
|
# updateable image uses "centos")
|
|
@@ -26,14 +26,17 @@ module Kitchen
|
|
|
26
26
|
# 10/11 are listed last since we default to the first item in the hash
|
|
27
27
|
# and 10/11 are not released yet. When they're released move them up
|
|
28
28
|
DEBIAN_CODENAMES = {
|
|
29
|
+
10 => "buster",
|
|
29
30
|
9 => "stretch",
|
|
30
31
|
8 => "jessie",
|
|
31
32
|
7 => "wheezy",
|
|
32
33
|
6 => "squeeze",
|
|
33
34
|
11 => "bullseye",
|
|
34
|
-
|
|
35
|
+
12 => "bookworm",
|
|
35
36
|
}.freeze
|
|
36
37
|
|
|
38
|
+
# default username for this platform's ami
|
|
39
|
+
# @return [String]
|
|
37
40
|
def username
|
|
38
41
|
"admin"
|
|
39
42
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-ec2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fletcher Nichol
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-05-
|
|
11
|
+
date: 2020-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|
|
@@ -168,14 +168,14 @@ dependencies:
|
|
|
168
168
|
requirements:
|
|
169
169
|
- - '='
|
|
170
170
|
- !ruby/object:Gem::Version
|
|
171
|
-
version: 0.
|
|
171
|
+
version: 1.0.5
|
|
172
172
|
type: :development
|
|
173
173
|
prerelease: false
|
|
174
174
|
version_requirements: !ruby/object:Gem::Requirement
|
|
175
175
|
requirements:
|
|
176
176
|
- - '='
|
|
177
177
|
- !ruby/object:Gem::Version
|
|
178
|
-
version: 0.
|
|
178
|
+
version: 1.0.5
|
|
179
179
|
- !ruby/object:Gem::Dependency
|
|
180
180
|
name: climate_control
|
|
181
181
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -224,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
224
224
|
requirements:
|
|
225
225
|
- - ">="
|
|
226
226
|
- !ruby/object:Gem::Version
|
|
227
|
-
version: '2.
|
|
227
|
+
version: '2.4'
|
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
requirements:
|
|
230
230
|
- - ">="
|