We’re very happy to announce our integration with the new AWS CodeDeploy service that Amazon Web Services (AWS) launched today. Read more about their service in their release blog post and in our AWS CodeDeploy documentation article.
AWS has provided a great set of tools for simplifying deployment into their cloud. AWS Elastic Beanstalk and AWS OpsWorks are incredible services, but they do expect a certain layout of your application.
One piece that was missing was a generic deployment service that provides a simple and flexible way to update your Amazon Elastic Compute Cloud (Amazon EC2) instances without having to rely on tools like Capistrano to connect to all of your instances and update them.
AWS CodeDeploy is this service. It allows you to package new versions of your code, push them into AWS CodeDeploy and have a daemon running on all your instances that will pull the latest version and run the deployment commands you configured. Read more about the details of AWS CodeDeploy in their documentation.
If you currently use tools like Capistrano or Fabric to deploy to each of your servers individually you should definitely take a look at AWS CodeDeploy and see if it can simplify your infrastructure.
In AWS CodeDeploy you can configure Applications and Deployment Groups. For example consider an infrastructure that consists of a Rails application for communicating with the users and a Scala service for background processing that the Rails application uses.
You would create one Application in AWS CodeDeploy and different Deployment Groups for the Rails and Scala codebase so you can deploy them individually. These Deployment Groups will target different instances typically identified by special tags you set on those instances.
Now in the Codeship UI you add AWS CodeDeploy to an existing deployment pipeline for a branch.
You simply set the AWS Credentials, the AWS Region, Application Name, Deployment Group and Amazon S3 Bucket that we use to store your deployment artifacts and you’re all set.
Additionally you can also set the optional Deployment Config to use which will determine how quickly your new deployment will be rolled out into your new infrastructure. You can read more about Deployment Configuration in the AWS CodeDeploy Docs.
Once saved you can take a final look at your deployment configuration to see if all your values are correct:
Finally once you push to the branch you configured for AWS CodeDeploy a new build will be started and if all your tests pass the deployment will take place. Your current folder will be zipped, uploaded to Amazon S3 and AWS CodeDeploy will be instructed to use that file to deploy a new version to your servers.
Setting up AWS CodeDeploy for Continuous Delivery with Codeship can be done in a matter of seconds. It gives you the flexibility to set up your infrastructure on AWS as you want while having a very stable testing and deployment process in place through Codeship.