Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blue-green stopped working in us-east #75

Open
hoshy opened this issue May 4, 2016 · 7 comments
Open

blue-green stopped working in us-east #75

hoshy opened this issue May 4, 2016 · 7 comments

Comments

@hoshy
Copy link

hoshy commented May 4, 2016

I have a strange issue: blue-green deploy does not work after moving to us-east-1 region.

After playing around I found that ElasticBeanstalk adds region to the EB URLs like my-app.us-east-1.elasticbeanstalk.com. That was not the case in eu-west-1.

I worked around by hacking https://github.com/ThoughtWorksStudios/eb_deployer/blob/master/lib/eb_deployer/deployment_strategy/blue_green.rb#L62

  def active_ebenv?(ebenv)
    str = ebenv.cname_prefix.nil? ? nil : ebenv.cname_prefix.gsub(/\..*/,'')
    str == @component.cname_prefix
  end

This solves the issue for me - but it's not the way it should be implemented I guess ;-)

@ap-dji
Copy link

ap-dji commented May 5, 2016

Blue/green is working for me in us-east using 0.6.6 . The dns naming change was announced back in January and presumably has rolled out to all regions by now.

hoshy added a commit to hoshy/eb_deployer that referenced this issue May 9, 2016
@darkoz
Copy link

darkoz commented Jun 14, 2016

I have a similar issue. I recently renamed our EB application (in ap-southeast-2 region**) and re-ran the deployer where the only config change was a new application name. This created a new environment correctly, but subsequent deploys always seem to do an inplace update. The output shows eb_deployer trying to do a describe on a second env which doesn't exist but then proceeds to deploy to the original instead of creating the new environment.

I tried cloning the original environment and naming it after the search string from the output, but the behaviour remained the same.

** the reasons for the rename was to get a new clean build which would then also get the DNS changes because of an ancient env we had with the old no-region URI

@wpc
Copy link
Contributor

wpc commented Jul 15, 2016

This issue should already been fixed 0.6.4 (released back to Jan 2016)
@darkoz and @hoshy, do you still have this problem? Which version of eb_deployer are you guys using?

@hoshy
Copy link
Author

hoshy commented Jul 15, 2016

@wpc I use eb_deployer (0.6.6) - yes problem still exists.

@wpc
Copy link
Contributor

wpc commented Jul 15, 2016

@hoshy:

Can you take a look at your environment url, is that exactly match ${application-name}-${environment-name}.us-east-1.elasticbeanstalk.com?

@darkoz
Copy link

darkoz commented Jul 18, 2016

@wpc yes the problem persists - I'm using version 0.6.6.

If the app name is something like xyz-website and my environment name (in the yml) is production this generated an env in EB called production-a-1234567 with the URL xyz-website-production.ap-southeast-2.elasticbeanstalk.com

When the deployer runs it searches for env production-b-7654321 doesn't find it and decides to deploy to env a.

Relevant logs:

[2016-07-14T06:04:17.529481 #15192]  INFO -- : [Aws::ElasticBeanstalk::Client 200 1.085341 0 retries] describe_environments(application_name:"xyz-website",environment_names:["production-a-1234567"])
[2016-07-14T06:04:17.646081 #15192]  INFO -- : [Aws::ElasticBeanstalk::Client 200 0.116127 0 retries] describe_environments(application_name:"xyz-website",environment_names:["production-b-7654321"])
[2016-07-14T06:04:17.867926 #15192]  INFO -- : [Aws::ElasticBeanstalk::Client 200 0.221493 0 retries] describe_environments(application_name:"xyz-website",environment_names:["production-a-1234567"])
[2016-07-14T06:04:17.929711 #15192]  INFO -- : [Aws::ElasticBeanstalk::Client 200 0.061392 0 retries] describe_events(max_records:1,application_name:"xyz-website",environment_name:"production-a-1234567")
[2016-07-14T06:04:19.260271 #15192]  INFO -- : [Aws::ElasticBeanstalk::Client 200 1.330172 0 retries] describe_environments(application_name:"xyz-website",environment_names:["production-a-1234567"])
[2016-07-14T06:04:22.659676 #15192]  INFO -- : [Aws::ElasticBeanstalk::Client 200 3.397742 0 retries] update_environment(environment_id:"${production-a-1234567-id}",version_label:"1.0.0.123",option_settings:[{...}],tier:{name:"WebServer",type:"Standard"})

@hoshy
Copy link
Author

hoshy commented Jul 18, 2016

@wpc the URL is ${application}-${environments.name}-${components.name}.us-east-1.elasticbeanstalk.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants