infopark-aws_utils 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/lib/infopark/aws_utils/env.rb +17 -3
- data/lib/infopark/aws_utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3127256fb77c8ea8965a58acd4a1913e257046a3
|
4
|
+
data.tar.gz: 07b73f8cb44c245506b312b00586c0f045f54a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51589ba5d0f959e2c021b97deb6134332625ebccf115e26b2eeabf0653480c4e6858eb8be64928b1b562ede711125c1df7de1e4ac91bf34d6718d12519593734
|
7
|
+
data.tar.gz: b7730823788aac144a667ef7005304072c3c8fe7239495648be8a9f44e15eeab3a1d4f8ec34b7b9d1210d17f258703f269710865fc88a8577ee03d499cb3a164
|
@@ -86,14 +86,28 @@ class Env
|
|
86
86
|
account?(PROD_ACCOUNT_ID)
|
87
87
|
end
|
88
88
|
|
89
|
-
def latest_base_image
|
89
|
+
def latest_base_image(root_device_type: :instance)
|
90
|
+
root_device_filter_value =
|
91
|
+
case root_device_type
|
92
|
+
when :instance
|
93
|
+
["instance-store"]
|
94
|
+
when :ebs
|
95
|
+
["ebs"]
|
96
|
+
else
|
97
|
+
raise "invalid root_device_type: #{root_device_type}"
|
98
|
+
end
|
90
99
|
available_images = AwsUtils.gather_all(ec2, :describe_images,
|
91
100
|
owners: [AWS_AMI_OWNER],
|
92
101
|
filters: [
|
93
|
-
{name: "root-device-type", values:
|
102
|
+
{name: "root-device-type", values: root_device_filter_value},
|
103
|
+
{name: "ena-support", values: ["true"]},
|
94
104
|
{name: "image-type", values: ["machine"]},
|
95
105
|
{name: "virtualization-type", values: ["hvm"]},
|
96
|
-
])
|
106
|
+
])
|
107
|
+
.reject {|image| image.name.include?(".rc-") }
|
108
|
+
.reject {|image| image.name.include?("-minimal-") }
|
109
|
+
.reject {|image| image.name.include?("-test") }
|
110
|
+
.reject {|image| image.name.include?("amzn-ami-vpc-nat-") }
|
97
111
|
available_images.sort_by(&:creation_date).last
|
98
112
|
end
|
99
113
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark-aws_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilo Prütz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-applicationautoscaling
|