elastic_beans 0.11.0.alpha4 → 0.11.0.alpha5
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/elastic_beans/environment.rb +15 -15
- data/lib/elastic_beans/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: ced35135b31c46cdc993f0e19d7e73c6219ed72d
|
4
|
+
data.tar.gz: 3b028b2d8b6c0b9bfe7da052cca5fd4a66e90cb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d8f569a7ed92b940fd9e713278dd9afe6e42cc1873c2456f5fbd84a63e14f73c030683e03e0dc1f9c06c581e45e4c30c089bb60b1c3d9246a5d0cd7ba7a898
|
7
|
+
data.tar.gz: 1a8be85e3b7624ee55c9105f84d9e83530d874ee8bbe13648c0869f9ad0eb05dfa1c032da7d1e57f5d7e143f232c6047e472094755076237f3fb52de7e521d46
|
@@ -98,11 +98,11 @@ module ElasticBeans
|
|
98
98
|
end
|
99
99
|
|
100
100
|
# Creates the environment in Elastic Beanstalk.
|
101
|
-
# Blocks until the environment is Ready.
|
101
|
+
# Blocks until the environment is Ready, unless +blocking+ is falsy.
|
102
102
|
#
|
103
103
|
# Raises an error if the configuration template for this environment does not exist.
|
104
104
|
# Raises an error if the environment is not healthy.
|
105
|
-
def create(version:, tags: {})
|
105
|
+
def create(version:, tags: {}, blocking: true)
|
106
106
|
begin
|
107
107
|
elastic_beanstalk.describe_configuration_settings(
|
108
108
|
application_name: application.name,
|
@@ -122,7 +122,7 @@ module ElasticBeans
|
|
122
122
|
tags: tags_list,
|
123
123
|
)
|
124
124
|
|
125
|
-
wait_environment(wait_status: "Launching", wait_health_status: ["Unknown", "Pending"])
|
125
|
+
wait_environment(wait_status: "Launching", wait_health_status: ["Unknown", "Pending"]) if blocking
|
126
126
|
rescue ::Aws::ElasticBeanstalk::Errors::Throttling
|
127
127
|
sleep 5
|
128
128
|
retry
|
@@ -134,16 +134,16 @@ module ElasticBeans
|
|
134
134
|
end
|
135
135
|
|
136
136
|
# Deploys the specified version label to the environment.
|
137
|
-
# Blocks until the environment is Ready.
|
137
|
+
# Blocks until the environment is Ready, unless +blocking+ is falsy.
|
138
138
|
#
|
139
139
|
# Raises an error if the environment is not healthy.
|
140
|
-
def deploy_version(version_label)
|
140
|
+
def deploy_version(version_label, blocking: true)
|
141
141
|
elastic_beanstalk.update_environment(
|
142
142
|
environment_name: name,
|
143
143
|
version_label: version_label,
|
144
144
|
)
|
145
145
|
|
146
|
-
wait_environment(wait_status: "Updating", wait_health_status: "Info")
|
146
|
+
wait_environment(wait_status: "Updating", wait_health_status: "Info") if blocking
|
147
147
|
rescue ::Aws::ElasticBeanstalk::Errors::Throttling
|
148
148
|
sleep 5
|
149
149
|
retry
|
@@ -152,12 +152,12 @@ module ElasticBeans
|
|
152
152
|
end
|
153
153
|
|
154
154
|
# Restarts the environment application servers.
|
155
|
-
# Blocks until the environment is Ready.
|
155
|
+
# Blocks until the environment is Ready, unless +blocking+ is falsy.
|
156
156
|
#
|
157
157
|
# Raises an error if the environment is not healthy.
|
158
|
-
def restart
|
158
|
+
def restart(blocking: true)
|
159
159
|
elastic_beanstalk.restart_app_server(environment_name: name)
|
160
|
-
wait_environment(wait_status: "Updating", wait_health_status: "Info")
|
160
|
+
wait_environment(wait_status: "Updating", wait_health_status: "Info") if blocking
|
161
161
|
rescue ::Aws::ElasticBeanstalk::Errors::Throttling
|
162
162
|
sleep 5
|
163
163
|
retry
|
@@ -166,10 +166,10 @@ module ElasticBeans
|
|
166
166
|
end
|
167
167
|
|
168
168
|
# Updates the environment configuration to change the minimum and maximum size of the autoscaling group.
|
169
|
-
# Blocks until the environment is Ready.
|
169
|
+
# Blocks until the environment is Ready, unless +blocking+ is falsy.
|
170
170
|
#
|
171
171
|
# Raises an error if the environment is not healthy.
|
172
|
-
def scale(min_size:, max_size:)
|
172
|
+
def scale(min_size:, max_size:, blocking: true)
|
173
173
|
option_settings = [
|
174
174
|
{namespace: "aws:autoscaling:asg", option_name: "MinSize", value: min_size},
|
175
175
|
{namespace: "aws:autoscaling:asg", option_name: "MaxSize", value: max_size},
|
@@ -178,7 +178,7 @@ module ElasticBeans
|
|
178
178
|
environment_name: name,
|
179
179
|
option_settings: option_settings,
|
180
180
|
)
|
181
|
-
wait_environment(wait_status: "Updating", wait_health_status: "Info")
|
181
|
+
wait_environment(wait_status: "Updating", wait_health_status: "Info") if blocking
|
182
182
|
rescue ::Aws::ElasticBeanstalk::Errors::InvalidParameterValue
|
183
183
|
raise MissingEnvironmentError.new(environment: self, application: application)
|
184
184
|
rescue ::Aws::ElasticBeanstalk::Errors::Throttling
|
@@ -188,16 +188,16 @@ module ElasticBeans
|
|
188
188
|
|
189
189
|
# Updates the environment configuration with the option settings from the given configuration template.
|
190
190
|
# Handy when the configuration template has been updated and you want those changes to take effect immediately.
|
191
|
-
# Blocks until the environment is Ready.
|
191
|
+
# Blocks until the environment is Ready, unless +blocking+ is falsy.
|
192
192
|
#
|
193
193
|
# Raises an error if the environment is not healthy.
|
194
|
-
def update_configuration(configuration_template)
|
194
|
+
def update_configuration(configuration_template, blocking: true)
|
195
195
|
elastic_beanstalk.update_environment(
|
196
196
|
environment_name: name,
|
197
197
|
option_settings: configuration_template.option_settings,
|
198
198
|
options_to_remove: configuration_template.options_to_remove,
|
199
199
|
)
|
200
|
-
wait_environment(wait_status: "Updating", wait_health_status: "Info")
|
200
|
+
wait_environment(wait_status: "Updating", wait_health_status: "Info") if blocking
|
201
201
|
rescue ::Aws::ElasticBeanstalk::Errors::InvalidParameterValue
|
202
202
|
raise MissingEnvironmentError.new(environment: self, application: application)
|
203
203
|
rescue ::Aws::ElasticBeanstalk::Errors::Throttling
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_beans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.0.
|
4
|
+
version: 0.11.0.alpha5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Stegman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|