Module: Tapjoy::AutoscalingBootstrap
- Defined in:
- lib/tapjoy/autoscaling_bootstrap.rb,
lib/tapjoy/autoscaling_bootstrap/aws.rb,
lib/tapjoy/autoscaling_bootstrap/ec2.rb,
lib/tapjoy/autoscaling_bootstrap/elb.rb,
lib/tapjoy/autoscaling_bootstrap/audit.rb,
lib/tapjoy/autoscaling_bootstrap/alerts.rb,
lib/tapjoy/autoscaling_bootstrap/errors.rb,
lib/tapjoy/autoscaling_bootstrap/AWS/ec2.rb,
lib/tapjoy/autoscaling_bootstrap/AWS/elb.rb,
lib/tapjoy/autoscaling_bootstrap/version.rb,
lib/tapjoy/autoscaling_bootstrap/cloudwatch.rb,
lib/tapjoy/autoscaling_bootstrap/errors/elb.rb,
lib/tapjoy/autoscaling_bootstrap/autoscaling.rb,
lib/tapjoy/autoscaling_bootstrap/AWS/cloudwatch.rb,
lib/tapjoy/autoscaling_bootstrap/alerts/scaling.rb,
lib/tapjoy/autoscaling_bootstrap/AWS/autoscaling.rb,
lib/tapjoy/autoscaling_bootstrap/alerts/monitoring.rb,
lib/tapjoy/autoscaling_bootstrap/autoscaling/group.rb,
lib/tapjoy/autoscaling_bootstrap/autoscaling_group.rb,
lib/tapjoy/autoscaling_bootstrap/autoscaling/config.rb,
lib/tapjoy/autoscaling_bootstrap/autoscaling/policy.rb,
lib/tapjoy/autoscaling_bootstrap/configure_autoscaler.rb,
lib/tapjoy/autoscaling_bootstrap/launch_configuration.rb,
lib/tapjoy/autoscaling_bootstrap/AWS/Autoscaling/group.rb,
lib/tapjoy/autoscaling_bootstrap/AWS/Autoscaling/launch_config.rb
Overview
Module for Autoscaling Bootstrap
Defined Under Namespace
Modules: AWS, Alerts, Autoscaling, Cloudwatch, EC2, Errors, Version
Classes: Audit, AutoscalingGroup, Base, ConfigureAutoscalers, ELB, LaunchConfiguration
Constant Summary
collapse
- VERSION =
[Version::MAJOR, Version::MINOR, Version::PATCH].join('.')
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.config_name ⇒ Object
Returns the value of attribute config_name.
41
42
43
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 41
def config_name
@config_name
end
|
.create_elb ⇒ Object
Returns the value of attribute create_elb.
41
42
43
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 41
def create_elb
@create_elb
end
|
.elb_name ⇒ Object
Returns the value of attribute elb_name.
42
43
44
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 42
def elb_name
@elb_name
end
|
.scaler_name ⇒ Object
Returns the value of attribute scaler_name.
41
42
43
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 41
def scaler_name
@scaler_name
end
|
Class Method Details
.cloudwatch ⇒ Object
61
62
63
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 61
def cloudwatch
@cloudwatch = Tapjoy::AutoscalingBootstrap::CloudWatch.new
end
|
.config_dir ⇒ Object
65
66
67
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 65
def config_dir
@config_dir ||= ENV['TASS_CONFIG_DIR'] || "#{ENV['HOME']}/.tass"
end
|
.supported_envs(listing) ⇒ Object
76
77
78
79
80
81
82
83
84
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 76
def supported_envs(listing)
envs = []
Dir.entries(listing).each do |file|
next unless file.end_with?('yaml')
next if file.start_with?('defaults')
envs << file.chomp!('.yaml')
end
envs
end
|
.valid_env?(config_dir, env) ⇒ Boolean
69
70
71
72
73
74
|
# File 'lib/tapjoy/autoscaling_bootstrap.rb', line 69
def valid_env?(config_dir, env)
env_list = supported_envs(config_dir)
unless env_list.include?(env)
Trollop.die :env, "Currently supported enviroments are #{env_list.join(',')}"
end
end
|