kitchen-ec2 3.14.0 → 3.15.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3b81a785bd64e6ae13091e71fe8faf3b295755fc9b30d4cee0c84246a107ea1
|
|
4
|
+
data.tar.gz: c0bfc45018438894ebb3775204d3e712ed5aef754a81b7588cb0cca79369e2ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d13f84f11907b1fb657dca1a400173be055420c30a7a5282af7273c7f1ecfd48485abdf24dc1d1fbe1fa67f4642564b080243f1fdae9d1e400052e3119e7f68
|
|
7
|
+
data.tar.gz: bb606e4db8b58e7ed57951cca247e4c8271fdbe5430ba59102f2524c0de9201ab46ea38fb431101f92ea02ac720ea508f5b59abb383ed4ffab5821f251366a71
|
|
@@ -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
|
+
class MacOS < StandardPlatform
|
|
23
|
+
StandardPlatform.platforms["macos"] = self
|
|
24
|
+
|
|
25
|
+
# default username for this platform's ami
|
|
26
|
+
# @return [String]
|
|
27
|
+
def username
|
|
28
|
+
"ec2-user"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def image_search
|
|
32
|
+
search = {
|
|
33
|
+
"owner-id" => "100343932686",
|
|
34
|
+
"name" => version ? "amzn-ec2-macos-#{version}*" : "amzn2-ec2-macos-*",
|
|
35
|
+
}
|
|
36
|
+
search["architecture"] = architecture if architecture
|
|
37
|
+
search["architecture"] = "arm64_mac" if architecture == "arm64"
|
|
38
|
+
search
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_image(driver, image)
|
|
42
|
+
if /amzn-ec2-macos/i.match?(image.name)
|
|
43
|
+
image.name =~ /\b(\d+(\.\d+[\.\d])?)/i
|
|
44
|
+
new(driver, "macos", (Regexp.last_match || [])[1], image.architecture)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
data/lib/kitchen/driver/ec2.rb
CHANGED
|
@@ -31,6 +31,7 @@ require_relative "aws/standard_platform/debian"
|
|
|
31
31
|
require_relative "aws/standard_platform/rhel"
|
|
32
32
|
require_relative "aws/standard_platform/fedora"
|
|
33
33
|
require_relative "aws/standard_platform/freebsd"
|
|
34
|
+
require_relative "aws/standard_platform/macos"
|
|
34
35
|
require_relative "aws/standard_platform/ubuntu"
|
|
35
36
|
require_relative "aws/standard_platform/windows"
|
|
36
37
|
require "aws-sdk-ec2"
|
|
@@ -79,6 +80,7 @@ module Kitchen
|
|
|
79
80
|
default_config :aws_secret_access_key, nil
|
|
80
81
|
default_config :aws_session_token, nil
|
|
81
82
|
default_config :aws_ssh_key_id, ENV["AWS_SSH_KEY_ID"]
|
|
83
|
+
default_config :aws_ssh_key_type, "rsa"
|
|
82
84
|
default_config :image_id, &:default_ami
|
|
83
85
|
default_config :image_search, nil
|
|
84
86
|
default_config :username, nil
|
|
@@ -853,7 +855,7 @@ module Kitchen
|
|
|
853
855
|
# to rapidly exhaust local entropy by creating a lot of keys. So this is
|
|
854
856
|
# probably fine. If you want very high security, probably don't use this
|
|
855
857
|
# feature anyway.
|
|
856
|
-
resp = ec2.client.create_key_pair(key_name: "kitchen-#{name_parts.join("-")}")
|
|
858
|
+
resp = ec2.client.create_key_pair(key_name: "kitchen-#{name_parts.join("-")}", key_type: config[:aws_ssh_key_type])
|
|
857
859
|
state[:auto_key_id] = resp.key_name
|
|
858
860
|
info("Created automatic key pair #{state[:auto_key_id]}")
|
|
859
861
|
# Write the key out with safe permissions
|
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.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fletcher Nichol
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|
|
@@ -82,6 +82,7 @@ files:
|
|
|
82
82
|
- lib/kitchen/driver/aws/standard_platform/debian.rb
|
|
83
83
|
- lib/kitchen/driver/aws/standard_platform/fedora.rb
|
|
84
84
|
- lib/kitchen/driver/aws/standard_platform/freebsd.rb
|
|
85
|
+
- lib/kitchen/driver/aws/standard_platform/macos.rb
|
|
85
86
|
- lib/kitchen/driver/aws/standard_platform/rhel.rb
|
|
86
87
|
- lib/kitchen/driver/aws/standard_platform/ubuntu.rb
|
|
87
88
|
- lib/kitchen/driver/aws/standard_platform/windows.rb
|
|
@@ -91,7 +92,7 @@ homepage: https://github.com/test-kitchen/kitchen-ec2
|
|
|
91
92
|
licenses:
|
|
92
93
|
- Apache-2.0
|
|
93
94
|
metadata: {}
|
|
94
|
-
post_install_message:
|
|
95
|
+
post_install_message:
|
|
95
96
|
rdoc_options: []
|
|
96
97
|
require_paths:
|
|
97
98
|
- lib
|
|
@@ -106,8 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
106
107
|
- !ruby/object:Gem::Version
|
|
107
108
|
version: '0'
|
|
108
109
|
requirements: []
|
|
109
|
-
rubygems_version: 3.
|
|
110
|
-
signing_key:
|
|
110
|
+
rubygems_version: 3.3.16
|
|
111
|
+
signing_key:
|
|
111
112
|
specification_version: 4
|
|
112
113
|
summary: A Test Kitchen Driver for Amazon EC2
|
|
113
114
|
test_files: []
|