Download presentation
Presentation is loading. Please wait.
1
Application Deployment with CodeDeploy
Torey Alford May 14th 2014
2
Distributed deployments
Agenda What is CodeDeploy? Start with a 10 minute introduction to OpenWhere. Help to understand the context of our experience with Cloud, Continuous Delivery. We talked our capabilities, experiences, and philosophy. Next we do a quick introduction to Docker Outline our Continuous Delivery Pipeline with AWS & Docker Wrap up with lessons learned We can do a demo if time permits and have a discussion Distributed deployments with CodeDeploy Demo & Discussion
3
What is CodeDeploy?
4
What is CodeDeploy? “AWS CodeDeploy is an AWS service that coordinates application deployments to instances” Yet another deployment tool
5
Why CodeDeploy Not meant to replace other Continuous Integration tools
Many CI tools have CodeDeploy plugins / hooks Jenkins Elastic Beanstalk Chef Puppet
6
CodeDeploy benefits Automated Deployments Minimize Downtime
Consistently deploy across multiple environments Scales with infrastructure Minimize Downtime Rolling updates across instances Application health tracking Deployment rollback Centralized Control Web and CLI console for status tracking Detailed reporting Easy to Adopt Reuse existing software setup and deployment processes Platform agnostic
7
Typical Deployment Flow
8
Getting Started with CodeDeploy
IAM Role Setup Deployment Application Name Revision Deployment Group Service Role Deployment Configuration
9
Application Deployment Planning
10
Deploying a Revision Planning a revision deploy Copy source files
Running scripts Copy source files and run scripts Adding an AppSpec YML file Pushing the revision
11
What is the AppSpec YML ? Descriptor file that directs CodeDeploy
Unique to CodeDeploy File must be named appspec.yml Each revision must contain one and only one file Must be added to the root directory of the deployment content
12
AppSpec Sections Version – AWS / CodeDeploy specific.
OS – Target operating system Files – Source / Destination mappings Permissions – File ownership and permissions Hooks – Entry points for executing scripts
13
AppSpec: Deployment Hooks
14
AppSpec example os: linux files: - source: Config/config.txt
destination: webapps/Config - source: source destination: /webapps/myApp hooks: BeforeInstall: - location: Scripts/UnzipResourceBundle.sh - location: Scripts/UnzipDataBundle.sh AfterInstall: - location: Scripts/RunResourceTests.sh timeout: 180 ApplicationStart: - location: Scripts/RunFunctionalTests.sh timeout: 3600 ValidateService: - location: Scripts/MonitorService.sh runas: codedeployuser
15
Deployment Layout /tmp/ or c:\temp (root folder)
|--content (subfolder) | |--myTextFile.txt | |--mySourceFile.rb | |--myExecutableFile.exe | |--myInstallerFile.msi | |--myPackage.rpm | |--myImageFile.png |--scripts (subfolder) | |--myShellScript.sh | |--myBatchScript.bat | |--myPowerShellScript.ps1 |--appspec.yml
16
Validating AppSpec files
Any online YML parser
17
Pushing Revisions Revisions locations: S3 / GitHub CodeDeploy console
Command line pushing aws deploy create-deployment \ --application-name CodeDeployGitHubDemo-App \ --deployment-config-name CodeDeployDefault.OneAtATime \ --deployment-group-name CodeDeployGitHubDemo-DepGrp \ --description "My GitHub deployment demo" \ --github-location repository=repository,commitId=commitId
18
Demonstration
19
What happens when things go wrong??
CodeDeploy Console Deployment Details View Instance Details View EC2 Instance Settings IAM settings CodeDeploy agent Deployment Application GitHub / S3 permissions Revision validations Deployment Group
20
Supported Operating Systems
EC2 Tested Operating Systems Amazon Linux , Ubuntu Server LTS Windows Server 2008 R2 and 2012 R2 On-premises instance operating systems NOTE: the AWS CodeDeploy Agent is available as open source for adaptation to other Amazon EC2 AMI operating systems.
21
Supported AWS Regions Currently available in the following regions
US East (N. Virginia) US West (Oregon) EU (Ireland) Asia Pacific (Sydney) NOTE: CodeDeploy performs deployments to resources in the same region For multiple region deploys, the application bundle must be available in an accessible S3 bucket or GitHub repository
22
What about Auto Scaling?
Create new Deployment Group for the application and select an Auto Scaling Group
23
Costs No additional cost for EC2 instances $0.02 per on-premise instance
24
More Information FAQs http://aws.amazon.com/codedeploy/faqs/
Troubleshooting
25
Questions
26
Contact Information Torey Alford Senior Engineer OpenWhere @toreyalford Andrew Heifetz Chief Cloud Officer OpenWhere @andyheifetz Cell:
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.