{"action":"created","issue":{"url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/issues/44","labels_url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/issues/44/comments","events_url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/issues/44/events","html_url":"https://github.com/ThoughtWorksStudios/eb_deployer/pull/44","id":90695285,"number":44,"title":"Red/Black deployment strategy","user":{"login":"mefellows","id":53900,"avatar_url":"https://avatars.githubusercontent.com/u/53900?v=3","gravatar_id":"","url":"https://api.github.com/users/mefellows","html_url":"https://github.com/mefellows","followers_url":"https://api.github.com/users/mefellows/followers","following_url":"https://api.github.com/users/mefellows/following{/other_user}","gists_url":"https://api.github.com/users/mefellows/gists{/gist_id}","starred_url":"https://api.github.com/users/mefellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mefellows/subscriptions","organizations_url":"https://api.github.com/users/mefellows/orgs","repos_url":"https://api.github.com/users/mefellows/repos","events_url":"https://api.github.com/users/mefellows/events{/privacy}","received_events_url":"https://api.github.com/users/mefellows/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-24T14:37:58Z","updated_at":"2015-08-03T04:56:00Z","closed_at":"2015-06-26T00:00:46Z","pull_request":{"url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/pulls/44","html_url":"https://github.com/ThoughtWorksStudios/eb_deployer/pull/44","diff_url":"https://github.com/ThoughtWorksStudios/eb_deployer/pull/44.diff","patch_url":"https://github.com/ThoughtWorksStudios/eb_deployer/pull/44.patch"},"body":"This feature introduces a new Strategy, which is really a fresh take on the Blue Green approach.\r\nIn short, in many cases its ideal to remove the inactive stack post deployment - generally for keeping costs down.\r\n\r\nThis strategy follows the Blue Green approach, but will tear down a stack after a successful migration to the new 'Red' Environment, marking the old one as 'black' and terminating.\r\n\r\nIt should be noted that I considered modifying the existing Blue-Green strategy, but felt it was best to separate for the following reasons:\r\n\r\n1. Existing users should not be confused by the new strategy\r\n2. I didn't want to complicate the behaviour of the pattern further by introducing more knobs/levers \r\n3. We may want to modify the Red/Black pattern to do other things going forward, such as introducing a wait period/signal before terminating the inactive environment and so on.\r\n\r\nWhat are your thoughts?"},"comment":{"url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/issues/comments/127123398","html_url":"https://github.com/ThoughtWorksStudios/eb_deployer/pull/44#issuecomment-127123398","issue_url":"https://api.github.com/repos/ThoughtWorksStudios/eb_deployer/issues/44","id":127123398,"user":{"login":"mefellows","id":53900,"avatar_url":"https://avatars.githubusercontent.com/u/53900?v=3","gravatar_id":"","url":"https://api.github.com/users/mefellows","html_url":"https://github.com/mefellows","followers_url":"https://api.github.com/users/mefellows/followers","following_url":"https://api.github.com/users/mefellows/following{/other_user}","gists_url":"https://api.github.com/users/mefellows/gists{/gist_id}","starred_url":"https://api.github.com/users/mefellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mefellows/subscriptions","organizations_url":"https://api.github.com/users/mefellows/orgs","repos_url":"https://api.github.com/users/mefellows/repos","events_url":"https://api.github.com/users/mefellows/events{/privacy}","received_events_url":"https://api.github.com/users/mefellows/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T04:55:59Z","updated_at":"2015-08-03T04:55:59Z","body":"Here is the error message returned from the API when running `eb_deploy` with above suggestion (run with the `--debug` flag enabled). Confusingly, the error seems to be about batch size even though that option is completely ommitted from my configuration, so *should* be set to a default:\r\n\r\n```\r\nI, [2015-08-03T14:28:43.002834 #45291]  INFO -- : [Aws::ElasticBeanstalk::Client 400 1.881137 0 retries] update_environment(environment_id:\"e-rjubczzsim\",option_settings:[{\"namespace\"=>\"aws:autoscaling:asg\",\"option_name\"=>\"MinSize\",\"value\"=>\"0\"},{\"namespace\"=>\"aws:autoscaling:asg\",\"option_name\"=>\"Cooldown\",\"value\"=>\"60\"}]) Aws::ElasticBeanstalk::Errors::ConfigurationValidationException Configuration validation exception: Invalid option value: '0' (Namespace: 'aws:autoscaling:updatepolicy:rollingupdate', OptionName: 'MaxBatchSize'): Value is less than minimum allowed value: 1\r\n\r\n/opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.1.1/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': Configuration validation exception: Invalid option value: '0' (Namespace: 'aws:autoscaling:updatepolicy:rollingupdate', OptionName: 'MaxBatchSize'): Value is less than minimum allowed value: 1 (Aws::ElasticBeanstalk::Errors::ConfigurationValidationException)\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.1.1/lib/aws-sdk-core/plugins/param_converter.rb:21:in `call'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.1.1/lib/seahorse/client/plugins/response_target.rb:18:in `call'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.1.1/lib/seahorse/client/request.rb:70:in `send_request'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.1.1/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/aws_driver/beanstalk.rb:25:in `update_environment_settings'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/throttling_handling.rb:13:in `block in method_missing'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/utils.rb:13:in `backoff'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/throttling_handling.rb:12:in `method_missing'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/eb_environment.rb:37:in `block in apply_settings'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/eb_environment.rb:120:in `with_polling_events'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/eb_environment.rb:36:in `apply_settings'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/deployment_strategy/blue_green.rb:29:in `deploy'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/default_component.rb:16:in `deploy'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/environment.rb:32:in `block in deploy'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/environment.rb:31:in `each'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer/environment.rb:31:in `deploy'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer.rb:214:in `deploy'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/lib/eb_deployer.rb:257:in `cli'\r\n\tfrom /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/eb_deployer-0.6.0.beta5/bin/eb_deploy:11:in `<top (required)>'\r\n\tfrom /opt/boxen/rbenv/versions/2.1.2/bin/eb_deploy:23:in `load'\r\n\tfrom /opt/boxen/rbenv/versions/2.1.2/bin/eb_deploy:23:in `<main>'\r\n```"}}