ThoughtWorksStudios / eb_deployer

AWS Elastic Beanstalk blue-green deployment automation from ThoughtWorks Mingle Team
MIT License
400 stars 94 forks source link

Difficulty in deploying with Worker #35

Closed davidporter-id-au closed 9 years ago

davidporter-id-au commented 9 years ago

I was attempting to deploy a worker tier with the inplace_update strategy and I seem to be getting an error about Environment does not support a cname:

Stacktrace:

/Users/dporter/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.63.0/lib/aws/core/client.rb:375:in `return_or_raise': Environment does not support a cname (AWS::ElasticBeanstalk::Errors::InvalidParameterValue)
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.63.0/lib/aws/core/client.rb:476:in `client_request'
    from (eval):3:in `create_environment'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/aws_driver/beanstalk.rb:55:in `create_environment'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/throttling_handling.rb:13:in `block in method_missing'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/utils.rb:13:in `backoff'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/throttling_handling.rb:12:in `method_missing'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/eb_environment.rb:76:in `block in create_eb_env'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/eb_environment.rb:98:in `with_polling_events'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/eb_environment.rb:75:in `create_eb_env'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/eb_environment.rb:27:in `deploy'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/deployment_strategy/inplace_update.rb:9:in `deploy'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/default_component.rb:16:in `deploy'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/environment.rb:32:in `block in deploy'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/environment.rb:31:in `each'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer/environment.rb:31:in `deploy'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer.rb:212:in `deploy'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/lib/eb_deployer.rb:255:in `cli'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/gems/eb_deployer-0.4.12/bin/eb_deploy:11:in `<top (required)>'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/bin/eb_deploy:23:in `load'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/bin/eb_deploy:23:in `<main>'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/dporter/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Found configuration at config/eb_deployer.yml.
wpc commented 9 years ago

Thanks for reporting the problem. Will work on that and update you soon

wpc commented 9 years ago

Thanks Andrew for pull request.

I have pushed a 0.5.0 release of eb_deployer for the worker tier support. I also made a sample app for demoing/testing setup worker tier environment with multiple components deployment. (https://github.com/ThoughtWorksStudios/eb_deployer/tree/master/samples/multi_components). It includes setup separate web and background environments, create and assign instance profile that background node needs to access SQS. Please take a look. If you guys encounter any new problem with Worker tier, please let me know.

-- wpc