tass 0.2.1 → 0.2.2

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: 5b188c163337f972c649a81c15bcba51a17357db
4
- data.tar.gz: 554fe1dda1e8ba161e7373fc03b3b4d70ce95eca
3
+ metadata.gz: f3f94224d11a7c396b61b38b44d026139f06b038
4
+ data.tar.gz: 70597218851be9ffe6d8cd1eccef2db50d144a22
5
5
  SHA512:
6
- metadata.gz: 9855457ee5c59c985f62df957c11a75cede3e42babbc183f77970960313763adb43e065f6b38559b033740c91d398b1248f24045c0a1980d54dc82b04f49544e
7
- data.tar.gz: 698da97f5892acda9e4c7b3c8b4324170058776445455a56bf0304b623e8243a16e19979411d5d4a04cbfac6e9d2388b62894090f0fe6fe9355df6c5a79b0ad4
6
+ metadata.gz: 34905de3f29c57247d272728b3ca0a510703a8129a8148f23d843ce57b6a445fb4dcc37c97026c7631ecaf2f8c067645be3ffa4ec8be2dd6616abc557e35f411
7
+ data.tar.gz: 8750964d46b84e5e55b32ae5cc3909b8d0af0e402db82b14d4dda9f410234820183cda03f0754138c392a9f6ef2813ac4e396bf1de75f2602c048c52d976fc0e
@@ -40,10 +40,29 @@ module Tapjoy
40
40
  attr_accessor :scaler_name, :config_name, :create_elb
41
41
  attr_reader :elb_name
42
42
 
43
+ # If you're using AutoscalingBootstrap to create a new ELB, that name goes here
43
44
  def elb_name=(str)
44
45
  @elb_name = str
45
46
  end
46
47
 
48
+ # If you're using AutoscalingBootstrap to join to a list of existing ELBs, that array
49
+ # goes here. This list can include or not include the provided elb_name, the
50
+ # array + a custom elb_name will be uniq-ed before being passed to Amazon
51
+ def elb_list=(list)
52
+ @elb_list = list
53
+ end
54
+
55
+ def elb_list
56
+ @elb_list ||= []
57
+ end
58
+
59
+ # This is the list of elbs passed to the autoscaling configuration. It will include
60
+ # the created elb, as well as the specific list of elbs to join. It will call uniq
61
+ # on the list in case you accidentally specify the same elb twice
62
+ def elbs_to_join
63
+ (elb_list + [Tapjoy::AutoscalingBootstrap.elb_name]).uniq
64
+ end
65
+
47
66
  def policy
48
67
  @policy = Tapjoy::AutoscalingBootstrap::Autoscaling::Policy.new
49
68
  end
@@ -181,6 +200,7 @@ module Tapjoy
181
200
  puts new_config[:elb_name]
182
201
  Tapjoy::AutoscalingBootstrap.elb_name = new_config[:elb_name] || 'NaE'
183
202
  Tapjoy::AutoscalingBootstrap.create_elb = new_config[:create_elb]
203
+ Tapjoy::AutoscalingBootstrap.elb_list = new_config[:elb_list] || []
184
204
  user_data = self.generate_user_data(new_config)
185
205
  return new_config, aws_env, user_data
186
206
  end
@@ -43,9 +43,11 @@ module Tapjoy
43
43
  tags: Tapjoy::AutoscalingBootstrap::Autoscaling::Group.new.generate_tags(tags)
44
44
  }
45
45
 
46
- if create_elb
46
+ # If we've chosen to explicitly create an ELB and assign to this ASG
47
+ # OR if we've given it a list of ELBs to join (or both)
48
+ if create_elb || !Tapjoy::AutoscalingBootstrap.elb_list.empty?
47
49
  group_hash.merge!({
48
- load_balancer_names: [Tapjoy::AutoscalingBootstrap.elb_name],
50
+ load_balancer_names: Tapjoy::AutoscalingBootstrap.elbs_to_join,
49
51
  health_check_type: health_check_type,
50
52
  health_check_grace_period: 300,
51
53
  })
@@ -3,7 +3,7 @@ module Tapjoy
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- PATCH = 1
6
+ PATCH = 2
7
7
  end
8
8
 
9
9
  VERSION = [Version::MAJOR, Version::MINOR, Version::PATCH].join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Tayarani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop