kitchen-ec2 3.15.0 → 3.16.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 765177643e317a19c906f4d74bbeab0df60e3b24f40b56cf96cc1784511a2204
|
4
|
+
data.tar.gz: bdd75366f92fdfda91a3e6e07076cee7fc15eec5a4099bffb1e119d2abbe10c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae46afd545a7228e429ccfc23dc8e55ec1e1526853ba2977020934a2d394bf1beffe3006f9205f5a39f35704329a3d965c2fc65a828cc1d49e5e2fd89214eadb
|
7
|
+
data.tar.gz: 2ba5bbfb8c4bbc9ac2dfd827f427dfb4ecc42d548aa5e7c6926fbb2bdc1dfa52904b06f0a76cac1f03fb174513e2b604970540020ee7c3b1b684dedf329684b7
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: 2016-2018, Chef Software, Inc.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
require_relative "../standard_platform"
|
17
|
+
|
18
|
+
module Kitchen
|
19
|
+
module Driver
|
20
|
+
class Aws
|
21
|
+
class StandardPlatform
|
22
|
+
# https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes.html
|
23
|
+
class Amazon2023 < StandardPlatform
|
24
|
+
StandardPlatform.platforms["amazon2023"] = self
|
25
|
+
|
26
|
+
# default username for this platform's ami
|
27
|
+
# @return [String]
|
28
|
+
def username
|
29
|
+
"ec2-user"
|
30
|
+
end
|
31
|
+
|
32
|
+
def image_search
|
33
|
+
search = {
|
34
|
+
"owner-id" => "137112412989",
|
35
|
+
"name" => version ? "al2023-ami-2023.0.#{version}*" : "al2023-ami-2023.0.*",
|
36
|
+
}
|
37
|
+
search["architecture"] = architecture if architecture
|
38
|
+
search
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.from_image(driver, image)
|
42
|
+
if /al2023-ami/i.match?(image.name)
|
43
|
+
image.name =~ /\b(\d+(\.\d+[\.\d])?)/i
|
44
|
+
new(driver, "amazon2023", (Regexp.last_match || [])[1], image.architecture)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -24,20 +24,10 @@ module Kitchen
|
|
24
24
|
StandardPlatform.platforms["centos"] = self
|
25
25
|
|
26
26
|
CENTOS_OWNER_ID = "125523088429".freeze
|
27
|
-
PRODUCT_CODES = {
|
28
|
-
"6" => "6x5jmcajty9edm3f211pqjfn2",
|
29
|
-
"7" => "aw0evgkw8e5c1q413zgy5pjce",
|
30
|
-
# It appears that v8 is not published to the
|
31
|
-
# AWS marketplace and hence does not have a product code
|
32
|
-
}.freeze
|
33
27
|
|
34
28
|
# default username for this platform's ami
|
35
29
|
# @return [String]
|
36
30
|
def username
|
37
|
-
# Centos 6.x images use root as the username (but the "centos 6"
|
38
|
-
# updateable image uses "centos")
|
39
|
-
return "root" if version && version.start_with?("6.")
|
40
|
-
|
41
31
|
"centos"
|
42
32
|
end
|
43
33
|
|
@@ -45,22 +35,9 @@ module Kitchen
|
|
45
35
|
# Version 8+ are published directly, not to the AWS marketplace. Use OWNER ID.
|
46
36
|
search = {
|
47
37
|
"owner-id" => CENTOS_OWNER_ID,
|
48
|
-
"name" => ["CentOS #{version}*", "CentOS-#{version}*-GA-*"],
|
38
|
+
"name" => ["CentOS #{version}*", "CentOS-#{version}*-GA-*", "CentOS Linux #{version}*", "CentOS Stream #{version}*"],
|
49
39
|
}
|
50
40
|
|
51
|
-
if version && version.split(".").first.to_i < 8
|
52
|
-
# Versions <8 are published to the AWS marketplace and use a different naming convention
|
53
|
-
search = {
|
54
|
-
"owner-alias" => "aws-marketplace",
|
55
|
-
"name" => ["CentOS Linux #{version}*", "CentOS-#{version}*-GA-*"],
|
56
|
-
}
|
57
|
-
# For versions published to aws-marketplace, additionally filter on product code to
|
58
|
-
# avoid non-official AMIs. Can't use CentOS owner ID here, as the owner ID is that of aws marketplace.
|
59
|
-
# https://github.com/test-kitchen/kitchen-ec2/issues/456
|
60
|
-
PRODUCT_CODES.keys.each do |major_version|
|
61
|
-
search["product-code"] = PRODUCT_CODES[major_version] if version.start_with?(major_version)
|
62
|
-
end
|
63
|
-
end
|
64
41
|
search["architecture"] = architecture if architecture
|
65
42
|
search
|
66
43
|
end
|
data/lib/kitchen/driver/ec2.rb
CHANGED
@@ -26,6 +26,7 @@ require_relative "aws/instance_generator"
|
|
26
26
|
require_relative "aws/standard_platform"
|
27
27
|
require_relative "aws/standard_platform/amazon"
|
28
28
|
require_relative "aws/standard_platform/amazon2"
|
29
|
+
require_relative "aws/standard_platform/amazon2023"
|
29
30
|
require_relative "aws/standard_platform/centos"
|
30
31
|
require_relative "aws/standard_platform/debian"
|
31
32
|
require_relative "aws/standard_platform/rhel"
|
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.16.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:
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/kitchen/driver/aws/standard_platform.rb
|
79
79
|
- lib/kitchen/driver/aws/standard_platform/amazon.rb
|
80
80
|
- lib/kitchen/driver/aws/standard_platform/amazon2.rb
|
81
|
+
- lib/kitchen/driver/aws/standard_platform/amazon2023.rb
|
81
82
|
- lib/kitchen/driver/aws/standard_platform/centos.rb
|
82
83
|
- lib/kitchen/driver/aws/standard_platform/debian.rb
|
83
84
|
- lib/kitchen/driver/aws/standard_platform/fedora.rb
|
@@ -100,14 +101,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
101
|
requirements:
|
101
102
|
- - ">="
|
102
103
|
- !ruby/object:Gem::Version
|
103
|
-
version: '2.
|
104
|
+
version: '2.7'
|
104
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
106
|
requirements:
|
106
107
|
- - ">="
|
107
108
|
- !ruby/object:Gem::Version
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
|
-
rubygems_version: 3.3
|
111
|
+
rubygems_version: 3.4.3
|
111
112
|
signing_key:
|
112
113
|
specification_version: 4
|
113
114
|
summary: A Test Kitchen Driver for Amazon EC2
|