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

INFRASYS-5894 - Rolling deploy automation #4

Merged
merged 1 commit into from
Sep 24, 2015
Merged

INFRASYS-5894 - Rolling deploy automation #4

merged 1 commit into from
Sep 24, 2015

Conversation

adamjkeller
Copy link
Contributor

Unit tests and completion of script still pending.

@adamjkeller
Copy link
Contributor Author

  • Rolling Deployment script is ready to be looked at
  • Unit tests have some work, but are not complete as of yet.

@adamjkeller adamjkeller changed the title (WIP) INFRASYS-5894 - Rolling deploy automation INFRASYS-5894 - Rolling deploy automation Sep 15, 2015
@mjgorman
Copy link

We should have a check for the ami currently configured in the launch configuration to make sure its "ready", to avoid issues when the ami is copying from 1 env to the other. If its pending, wait a bit.

@adamjkeller
Copy link
Contributor Author

@mjgorman added ami check method to script

@mjgorman
Copy link

+1

elif env in ['stg', 'prd']:
return 'us-east-1'
else:
return env # This method is somewhat specific to our environment, so I am allowing the option for env to equal an actual region and will return the original value supplied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest moving this into a separate file/class and calling it statically.
My thinking is this will depend on who uses the application.
It should be blank and filled in by users as a configs file

@sbraverman
Copy link
Contributor

+1 added a minor suggestion to code aesthetics, but it all looks great. Awesome job!

elif env in ['stg', 'prd']:
return 'us-east-1'
else:
return env # This method is somewhat specific to our environment, so I am allowing the option for env to equal an actual region and will return the original value supplied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamjkeller could we use config file for this method, so it will be useful for other people.

Also, method should return False or valid(!) AWS region name, like us-east-1

@adamjkeller
Copy link
Contributor Author

Most recent build:

akeller@akeller-MBPR License2Deploy (INFRASYS-5894-AK):$ python License2Deploy/rolling_deploy.py stg dnbi-cirrus 6 'ami-e380fe86' 'dnbi-deploy'
2015-09-24 11:02:41,376: INFO: Begin Logging...
2015-09-24 11:02:44,995: INFO: AMI ami-e380fe86 is ready
2015-09-24 11:02:44,995: INFO: Build #: 6 ::: Autoscale Group: dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4
2015-09-24 11:02:45,413: INFO: Current desired count was changed from 2 to 4
2015-09-24 11:02:45,413: INFO: Set autoscale capacity for dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4 to 4
2015-09-24 11:02:45,623: INFO: Sleeping for 240 seconds to allow for instances to spin up
2015-09-24 11:06:46,934: INFO: List of all Instance ID's in dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4: [u'i-2c9710f9', u'i-1f981fca', u'i-ca440f1f', u'i-c9440f1c']
2015-09-24 11:06:50,758: INFO: New Instance List: [u'i-ca440f1f', u'i-c9440f1c']
2015-09-24 11:06:51,063: WARNING: i-ca440f1f is not in a fully working state yet
2015-09-24 11:07:21,375: WARNING: i-ca440f1f is not in a fully working state yet
2015-09-24 11:07:51,710: WARNING: i-ca440f1f is not in a fully working state yet
2015-09-24 11:08:22,055: WARNING: i-ca440f1f is not in a fully working state yet
2015-09-24 11:08:52,459: INFO: i-ca440f1f is in a healthy state. Moving on...
2015-09-24 11:08:52,772: INFO: i-c9440f1c is in a healthy state. Moving on...
2015-09-24 11:08:54,865: INFO: ELB healthcheck OK == i-1f981fca: InService
2015-09-24 11:08:55,151: INFO: ELB healthcheck OK == i-2c9710f9: InService
2015-09-24 11:08:56,324: INFO: Current desired count was changed from 4 to 2
2015-09-24 11:08:56,324: INFO: Set autoscale capacity for dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4 to 2
2015-09-24 11:09:28,571: INFO: Deployed instances [InstanceState:(i-c9440f1c,InService), InstanceState:(i-ca440f1f,InService)] to ELB: dnbicirrusELBstg
2015-09-24 11:09:28,571: INFO: Deployment Complete!

adamjkeller added a commit that referenced this pull request Sep 24, 2015
INFRASYS-5894 - Rolling deploy automation
@adamjkeller adamjkeller merged commit 6cb5da9 into dandb:master Sep 24, 2015
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

Successfully merging this pull request may close these issues.

None yet

4 participants