We’ve been looking into setting up continuous integration and deployment at work. While the integration part of things is more or less a known quantity, the deployment side of things is a bit more challenging. I’ve had great success with Elastic Beanstalk thus far, and I wanted to find a way to use CI and then deploy good builds to Beanstalk. For reference, we’ve been using Codeship and have had really great experiences with them. I’ve cobbled these instructions together on my own from a number of different sources, including this post from Snap.
aws elasticbeanstalk describe-application-versions --application-name "YOUR APP NAME"
and you should get something like this:
{ "ApplicationVersions": [ { "ApplicationName": "YOUR APP NAME", "VersionLabel": "a1b2c3d", "SourceBundle": { "S3Bucket": "elasticbeanstalk-us-east-1-11111111", "S3Key": "YOUR APP/a1b2c3d.zip" }, "DateUpdated": "2013-12-22T22:23:08.886Z", "DateCreated": "2013-12-22T22:23:08.886Z" } }
pip install awscli zip -r deploy.zip . -x "*.git*" "*vendor*" aws s3 cp deploy.zip s3://elasticbeanstalk-us-east-1-11111/YOUR APP/git-`git rev-parse --short HEAD`.zip --region "us-east-1" aws elasticbeanstalk create-application-version --application-name "YOUR APP" --version-label `git rev-parse --short HEAD` --source-bundle S3Bucket="elasticbeanstalk-us-east-1-11111",S3Key="YOUR APP/git-`git rev-parse --short HEAD`.zip" --region "us-east-1" aws elasticbeanstalk update-environment --environment-name "yourapp-env" --version-label `git rev-parse --short HEAD` --region "us-east-1"
git rev-parse --short HEAD
just gets you the short version of the commit hash.Hopefully this helps. This may not work as is for everyone, and you’ll probably have to tweak it a bit – but it’s a start.
[…] on a previous post about doing continuous deployment to Elastic Beanstalk, I just did a setup to get Play Framework to […]
When selecting fire place resources as well as fire place
addons, the number of selections are simply simply limitless.