Module: Capistrano::ASG::Rolling::Configuration
- Extended by:
- DSL
- Defined in:
- lib/capistrano/asg/rolling/configuration.rb
Overview
Singleton that holds the configuration and global state of the plugin. State is eagerly initialized so accessors are lock-free.
Class Method Summary collapse
- .ami_wait_delay ⇒ Object
- .ami_wait_max_attempts ⇒ Object
- .auto_scaling_group_name ⇒ Object
- .autoscale_groups ⇒ Object
- .aws_access_key_id ⇒ Object
- .aws_region ⇒ Object
- .aws_retry_limit ⇒ Object
- .aws_retry_mode ⇒ Object
- .aws_secret_access_key ⇒ Object
- .aws_session_token ⇒ Object
- .instance_overrides ⇒ Object
- .instance_refresh_polling_interval ⇒ Object
- .instances ⇒ Object
- .keep_versions ⇒ Object
- .launch_templates ⇒ Object
- .log_timestamp? ⇒ Boolean
- .log_verbose? ⇒ Boolean
-
.reset! ⇒ Object
Resets all mutable state.
- .rolling_update=(value) ⇒ Object
- .rolling_update? ⇒ Boolean
- .use_private_ip_address? ⇒ Boolean
- .wait_for_instance_refresh? ⇒ Boolean
Class Method Details
.ami_wait_delay ⇒ Object
105 106 107 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 105 def ami_wait_delay fetch(:asg_ami_wait_delay, 15) end |
.ami_wait_max_attempts ⇒ Object
109 110 111 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 109 def ami_wait_max_attempts fetch(:asg_ami_wait_max_attempts, 40) end |
.auto_scaling_group_name ⇒ Object
57 58 59 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 57 def auto_scaling_group_name fetch(:asg_rolling_group_name) end |
.autoscale_groups ⇒ Object
22 23 24 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 22 def autoscale_groups @autoscale_groups end |
.aws_access_key_id ⇒ Object
41 42 43 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 41 def aws_access_key_id fetch(:aws_access_key_id) end |
.aws_region ⇒ Object
53 54 55 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 53 def aws_region fetch(:aws_region) end |
.aws_retry_limit ⇒ Object
101 102 103 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 101 def aws_retry_limit fetch(:asg_aws_retry_limit, 10) end |
.aws_retry_mode ⇒ Object
97 98 99 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 97 def aws_retry_mode fetch(:asg_aws_retry_mode, 'adaptive') end |
.aws_secret_access_key ⇒ Object
45 46 47 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 45 def aws_secret_access_key fetch(:aws_secret_access_key) end |
.aws_session_token ⇒ Object
49 50 51 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 49 def aws_session_token fetch(:aws_session_token) end |
.instance_overrides ⇒ Object
61 62 63 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 61 def instance_overrides fetch(:asg_rolling_instance_overrides) end |
.instance_refresh_polling_interval ⇒ Object
93 94 95 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 93 def instance_refresh_polling_interval fetch(:asg_instance_refresh_polling_interval, 30) end |
.instances ⇒ Object
26 27 28 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 26 def instances @instances end |
.keep_versions ⇒ Object
69 70 71 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 69 def keep_versions fetch(:asg_rolling_keep_versions, fetch(:keep_releases)) end |
.launch_templates ⇒ Object
30 31 32 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 30 def launch_templates @launch_templates end |
.log_timestamp? ⇒ Boolean
77 78 79 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 77 def fetch(:asg_rolling_log_timestamp) end |
.log_verbose? ⇒ Boolean
73 74 75 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 73 def log_verbose? fetch(:asg_rolling_log_verbose) end |
.reset! ⇒ Object
Resets all mutable state.
35 36 37 38 39 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 35 def reset! @autoscale_groups = AutoscaleGroups.new @instances = Instances.new @launch_templates = LaunchTemplates.new end |
.rolling_update=(value) ⇒ Object
81 82 83 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 81 def rolling_update=(value) set(:asg_rolling_update, value) end |
.rolling_update? ⇒ Boolean
85 86 87 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 85 def rolling_update? fetch(:asg_rolling_update) end |
.use_private_ip_address? ⇒ Boolean
65 66 67 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 65 def use_private_ip_address? fetch(:asg_rolling_use_private_ip_address) end |
.wait_for_instance_refresh? ⇒ Boolean
89 90 91 |
# File 'lib/capistrano/asg/rolling/configuration.rb', line 89 def wait_for_instance_refresh? fetch(:asg_wait_for_instance_refresh, false) end |