Much has been said about DevOps culture, this webinar talks about exactly what it means to exercise a DevOps methodology inside your organization and takes a more detailed look at Continuous Integration and Continuous Deployment – two of the elements of a successful DevOps framework. With AWS’s API driven infrastructure, running a lean platform becomes possible and the ability to treat ‘Infrastructure as Code’.
Reasons to attend:
Learn how to set up and experience the benefits of 'Continuous Integration' and 'Continuous Deployment' for your Development Environment.
Learn about DevOps best practices and the agility that the AWS Cloud can bring your business.
Learn how business have successfully implemented DevOps methodologies.
5. v
An example CI/CD workflow
Stacks /
Environments(s)
CI/CD ToolIssue
Tracker
SCM
Infrastructure
automation /
deployment
Test tools /
harnesses
6. v
An example CI/CD workflow
Tasks for AWS
PHPUnit
jQuery
…
CloudFormation Stack(s)
7. v
A CI/CD pipeline
Teardown
Release
Deploy
Test
Code
8. v
Getting your source under control
Prod FeatureUAT
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
10. v
What does CI give us?
• Test driven promotion (of development change)
• Increasing velocity of feedback cycle through iterative change
• Contain change to reduce risk
• Bugs are detected quickly
• Automated testing reduces size of testing effort
Code
Test
Deploy
Release
Teardown
12. v
What does CD give us?
• Changes are pushed quickly to production
• Immediate feedback from users
• Supports A/B testing or “We test customer reactions to features in production”
• Hardens, de-risks the deployment process
• Gives us a breadth of data points across our applications
Code
Test
Deploy
Release
Teardown
13. v
AWS Application Management Services
Elastic Beanstalk OpsWorks CloudFormation
Application Container Application & Resource
Management
Automated Code
Deployment
Provision and manage AWS
Resources
You want to quickly get code
running scalably and reliably
without worrying about the
underlying resources.
“Application-centric approach”
You want to run an application
with the ability to customize
and control software or
resources.
“DevOps automation”
You want to rapidly release
new features and avoid
downtime during complex
deployments.
“Automated deployments”
You want a simple, yet finely
controllable way to model and
version collections of AWS
resources.
“Fine grained control”
ALMA Service Console Icons
AWS CodeDeploy
ALMA Service Console icons and names are subject to review.
CodeDeploy
CodeDeploy
AWS Pipelines
CodeDeploy
Code
Test
Deploy
Release
Teardown
14. v
Deployment approaches
• Deploy in-place
• Manage interruption
• Fast deployment
• Discrete environment
• Bake AMI
• Multiple environments from branches
• Support A/B testing
• “Rolling DNS”
Code
Test
Deploy
Release
Teardown
15. v
AWS CodeDeploy Automated Deployments
Minimize Downtime
Centralized Control
Easy Integration
15
ALMA Service Console Icons
AWS CodeDeploy
ALMA Service Console icons and names are subject to review.
CodeDeploy
CodeDeploy
AWS Pipelines
Code
Test
Deploy
Release
Teardown
18. Product Integrations
Any application Reuse setup scripts Integrate with toolchain
Shell scripts
PowerShell scripts
Custom programs
Configuration recipes
Code
Test
Deploy
Release
Teardown
19. v
Baking an AMI
• Start a builder instance
• Bootstrap with cfn-init, cfn-signal
• Bake your AMI
• EC2 CreateImage
• Tag it
• Cost remediation
• Reporting
• Destroy / clean up the builder instance
OS
Platform
Framework
Container
Web
Your Code
OS
Platform
Framework
Container
Web
Your Code
OS
Platform
Framework
Container
Web
Your Code
Code
Test
Deploy
Release
Teardown
32. v
Advanced Techniques
• Managing CD sprawl / Segregation of duties
• CloudFormation componentization and re-use
• Extending CloudFormation with custom resources
• Injecting dynamic data into your templates
• Manage custom resources e.g. relational database schemas
• Extending your CICD tools
• Making your CI and CD tools AWS-aware
36. v
CloudFormation Merging
Git
Git
CloudFormation
Operations Repo Application Repo
VPC
Subnets
Security Groups
CloudFormation Frameworks
Best Practice
Application Code
Application CloudFormation
Load Balancing Setup
37. v
CloudFormation Custom Resources
Region
SQS Queue
AWS
CloudFormation
Custom Resource
Topic
Auto scaling Group
Custom Resource
Implementation
• Add New Resources
• Including AWS resources not currently
supported by CFN
• Interact with the CloudFormation Workflow
• Inject dynamic data into a stack
• Extend the capabilities of existing resources
• Data management via CloudFormation
• It’s really simple if you use aws-cfn-
resource-bridge
• Install or fork from
https://github.com/aws/aws-cfn-
resource-bridge
Create
app:WebApp
version:1.2
os:linux
DynamoDB
1
2
3
4
6
Query table, get AMI ID
where:
app=WebApp
version=1.2
os is linux
5
Output
ami-id:ami-xxxxx
Returns AMI id
in ami-id key7
Deploy EC2
Instance with
AMI ami-xxxxx
42. v
Containerisation
• Build environments for artifacts, don’t update environments with artifacts
• All environments are transient
• Standardisation, abstraction and portability
43. v
Docker & AWS Elastic Beanstalk
• A framework for managing Linux containers
• LXC containers are more lightweight than VMs
• Amazon Linux (2014.03) bundles Docker 0.9 and LXC 0.9
• Docker containers on Beanstalk are Go!
44. v
EC2 Container Service (Preview)
• Highly scalable, high performance container management
• Supports Docker containers within your VPC
• Manages container lifecycle and definitions
• Cluster and container scheduler
45. v
Demo: Release & Teardown
2
1
Code
Test
Deploy
Release
Teardown
ProductionCode
Test
Deploy
Release
Teardown
46. v
Innovation, Quality, Governance
Discrete environments for each branch
Automated testing on every commit on every branch
Leverage CD tools to provide separation of duties
Audit Logs
Git approvals process
Use custom resources to extend CloudFormation
Leverage DNS
Interface with the API
Environments for artifacts