AWS CodeDeploy Update – New Support for On-Premises Instances
My colleague Andy Troutman wrote up the guest post below to share news of a powerful new way to use AWS CodeDeploy.
Customers use AWS CodeDeploy to manage application updates to their Amazon EC2 instances. CodeDeploy allows developers and administrators to centrally control and track their application deployments across different development, testing, and production environments. CodeDeploy is built using many of the lessons learned from Amazon’s internal deployment systems, and focuses on coordinating the rollout of application updates in a way that’s clear, reproducible, and non-impactful to application users. To learn more about how to integrate CodeDeploy into your existing app management process, visit the CodeDeploy detail page.
Customers who are using CodeDeploy to manage their Amazon Elastic Compute Cloud (Amazon EC2) instances have asked to be able to use the same fleet coordination features to deploy code to their on-premises instances. Today we’re happy to make the functionality of CodeDeploy available for use on a customer’s own servers, in addition to Amazon EC2.
Advantages of CodeDeploy for On-Premises Instances
Customers can now manage their EC2 and on-premises application deployments using a single solution. Here are some of the advantages:
- Coordinate a rolling update across a collection of EC2 and/or on-premises instances. CodeDeploy will actively track the outcome of each instance update, and use this data to safely select the next set of updates, or to stop the deployment in a case where an application update isn’t going as expected.
- Tag on-premises instances the same as with EC2 instances to define deployment groups. You can create multiple unique groups to define separate application stages such as “Development”, “Test”, “QA”, “Production”, and so forth.
- Deployment groups can be composed of on-premises instances, static EC2 tags, or dynamically changing AWS Auto Scaling groups. New Auto Scaling capacity is automatically deployed to with CodeDeploy.
- In cases where a deployment fails on an EC2 instance or on-premises instance, CodeDeploy will immediately make the last 4k of deployment log data available to customers in the console, making it easy to quickly troubleshoot a failed application deployment.
- Monitor and update the state of your on-premises instances directly from the CodeDeploy Console or AWS Command Line Interface (CLI).
- Since CodeDeploy uses a pull-based model for our agent, on-premises instances only need outbound HTTPS access to the appropriate CodeDeploy endpoint (read about Regions and Endpoints to learn more). Your instance and firewall do not need to allow SSH access or any other inbound connection to trigger a deployment.
- Use CodeDeploy to update both Linux and Windows EC2 instances or on-premises instances. From 1 to 10,000+, CodeDeploy is architected to do deployments at any scale.
The easiest way to start managing on-premises instances with AWS CodeDeploy is via the AWS Command Line Interface (CLI). You can install the AWS CLI on your desktop or directly on the on-premises instance. Once you have the CLI installed, you’ll be able to get your first on-premises instance running with 3 steps:
- Issue the
aws deploy registercommand, which will create a new IAM user and associate it with the on-premises instance, register the instance with AWS CodeDeploy, and tag the instance with any tags specified.
- Issue the
aws deploy installcommand from your on-premises instance. This will install the CodeDeploy agent onto the instance and configure it to communicate with a supported AWS Region. Today, CodeDeploy is available in the US East (N. Virginia) and US West (Oregon) regions.
- Update or create a new CodeDeploy Deployment Group to add your on-premises instance to a new or existing application. You can do this step from the CLI or via the CodeDeploy console.
Once complete, you can deploy to your on-premises instance in the exact same way as any EC2 instance. For more details on the setup steps, please take a look at the CodeDeploy documentation.
Pricing and Availability
You pay $0.02 per on-premises instance update using AWS CodeDeploy; there are no minimum fees and no upfront commitments. You will only be charged if CodeDeploy begins an update on an instance. There is no additional charge for code deployments to Amazon EC2 instances through AWS CodeDeploy.
Customers may register their on-premises instances against any of our available regions. For the best availability, we recommend that customers segment their on-premises instances to talk to the closest available region, in much the same way they would segment EC2 instances by region. For more information, please see the CodeDeploy Pricing and regions FAQ.
— Andy Troutman, Software Development Manager