Recently Amazon announced their CodeDeploy tool.
CodeDeploy aims to be the “Amazon native” way to do continuous deployment to your fleet of EC2 servers, and more - and of course there is a Jenkins plugin for it!
With the Jenkins plugin, you can use CodeDeploy as a post-build action, perhaps at the end of a continuous delivery pipeline - and let Amazon take care of rolling out your binary (usually a zip file) to your fleet of servers.
CodeDeploy supports zero downtime updates via rolling out changes to the cluster in a controlled fashion, using configurable status checks to know when a given instance is ready, and it can move on to other instances during a roll out.
There is a lot more to CodeDeploy - but if you deploy to Amazon EC2, it is worth looking at at the endpoint of your Continuous Delivery pipeline with Jenkins.
This plugin is available in the Jenkins update center (both for DEV@cloud users and if you run your own Jenkins instance). Once the plugin is installed:
- Open up your project configuration:
- In the Post-build Actions section, select “Deploy and application to AWS CodeDeploy”
- Application Name, Deployment Group, Deployment Config, and region are all required options.
- For authentication, there are two options. Either option requires that the associated role has, at minimum, a policy that permits codedeploy:* and s3:Put*.
- Access/Secret key pair. For example, the keys associated with a specific IAM user. If left blank, the default chain of credentials will be checked.
- Temporary access keys. These will use the global keys from the Jenkins instance.
Read more details about CodeDeploy here.