tass 0.1.0 → 0.1.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db95758f86f59920e5e6b0c1100ac45d6a6646b
|
4
|
+
data.tar.gz: a39e7fc9170e336ed1ea324482253cb69544306e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce9424ac378ebb6f41b2368e050740f9c170cf88b7066df4245d3626a7f24b733ce329209ec37b2bad324fde639ab30ff46d43e919b3cde614b67bf1b2644837
|
7
|
+
data.tar.gz: 0d1bb1488c479f6dc55882f97ee6028d7fd4cd3a3022be957dc65eb0c622afbd43998872fa44fc05b4d056c63d2943a381f50716cbe16e3b2e428aa44272dfb7
|
@@ -15,6 +15,8 @@ module Tapjoy
|
|
15
15
|
|
16
16
|
puts "Creating launch config: #{Tapjoy::AutoscalingBootstrap.config_name}"
|
17
17
|
begin
|
18
|
+
Tapjoy::AutoscalingBootstrap::Base.new.sec_group_exists(
|
19
|
+
aws_env[:security_groups]) unless config[:vpc_subnets]
|
18
20
|
Tapjoy::AutoscalingBootstrap::AWS::Autoscaling::LaunchConfig.create(
|
19
21
|
**config, **aws_env, user_data: user_data)
|
20
22
|
rescue Aws::AutoScaling::Errors::ValidationError => err
|
@@ -160,6 +160,20 @@ module Tapjoy
|
|
160
160
|
puts "Sleeping for #{2 ** tries}..."
|
161
161
|
sleep 2 ** tries
|
162
162
|
end
|
163
|
+
|
164
|
+
# Check if security group exists and create it if it does not
|
165
|
+
def sec_group_exists(groups)
|
166
|
+
groups.each do |group|
|
167
|
+
begin
|
168
|
+
puts "Verifying #{group} exists..."
|
169
|
+
group = Tapjoy::AutoscalingBootstrap::AWS::EC2.describe_security_groups(group)
|
170
|
+
rescue Aws::EC2::Errors::InvalidGroupNotFound => err
|
171
|
+
STDERR.puts "Warning: #{err}"
|
172
|
+
puts "Creating #{group} for #{Tapjoy::AutoscalingBootstrap.scaler_name}"
|
173
|
+
Tapjoy::AutoscalingBootstrap::AWS::EC2.create_security_group(group)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
163
177
|
end
|
164
178
|
end
|
165
179
|
end
|