4. v
Continuous process of managing the life of an application.
Change
Automated
In Stages
Repeatable
ALM | What is it?
5. v
Versions
Interfaces
Repository
Authorization
Rollforward-Rollback
ALM | What is it?
Continuous process of managing the life of an application.
6. v
Entire time during which an organization
spends money on it.
Developer’s laptop to production
ALM | What is it?
Continuous process of managing the life of an application.
7. v
How long does it take for a single line of code change to move
to production?
ALM | Why?
9. v
ALM | Why?
Innovation requires two
things: the ability to try a lot of
experiments, and not having
to live with the collateral
damage of failed experiments
Andy Jassy
SVP, Amazon Web Services
Business
Idea
Implementation
Testing
Release
Customer
Feedback
Innovation
Revolution
13. v
Version
Control
CI Server
Package
Builder
Deploy
ServerCommit to
Git/master
Dev
Get /
Pull
Code
AMIs
Send Build Report to Dev
Stop everything if build failed
Distributed Builds
Run Tests in parallel
Staging Env
Test Env
Code
Config
Tests
Prod Env
Push
Config
Install
Create
Repo
CloudFormation
Templates for Env
Generate
ALM | Continuous Integration
14. v• 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
ALM | Why CI?
15. v
Version
Control
CI Server
Package
Builder
Deploy
ServerCommit to
Git/master
Dev
Get /
Pull
Code
AMIs
Send Build Report to Dev
Stop everything if build failed
Distributed Builds
Run Tests in parallel
Staging Env
Test Env
Code
Config
Tests
Prod Env
Push
Config
Install
Create
Repo
CloudFormation
Templates for Env
Generate
ALM | Continuous Delivery/Deployment
16. v
• Automated, repeatable process to push changes to production
• Hardens, de-risks the deployment process
• Immediate feedback from users
• Supports A/B testing or “We test customer reactions to features in
production”
• Gives us a breadth of data points across our applications
ALM | Why CD?
19. v
ALM | CodeCommit
• Fully managed service source control service for hosting private Git
repositories
• Automatically scales to meet the needs of your project and stores
any type of file (source, images, videos, libraries etc.) with no limit
on repository size.
• Fully integrated with AWS CodePipeline and AWS CodeDeploy to
streamline development.
Dev Source Control
Continuous
Integration
Continuous
Delivery
20. v
ALM | CodeCommit
Dev Source Control
Continuous
Integration
Continuous
Delivery
• Efficient - transfers incremental changes
• AWS CodeCommit supports all Git commands and works with your
existing Git-based tools (e.g., continuous integration/continuous
delivery systems, and graphical clients)
• Fully integrated with AWS Identity and Access Management (IAM)
21. v
ALM | CodePipeline
• A continuous delivery and release automation service that aids
smooth deployments.
• You can design your development workflow for checking in code,
building the code, deploying your application into staging, testing it,
and releasing it to production
Dev Source Control
Continuous
Integration
Continuous
Delivery
22. v
ALM | CodePipeline
• CodePipeline standardizes and automates the software release
process, allowing you to rapidly release new features to users
• Provides the capability to set up configurable gates between each
stage such as time-based rules or manual approvals
• Workflows can be created to run unit and integration tests before
deploying to production
Dev Source Control
Continuous
Integration
Continuous
Delivery
23. v
ALM | CodeDeploy
• Automates code deployments to Amazon EC2 instances.
• Makes it easier to rapidly release new features, helps avoid
downtime during deployment, and handles the complexity of
updating applications
Dev Source Control
Continuous
Integration
Continuous
Delivery
24. v
ALM | CodeDeploy
• Deploys your released code to a fleet of EC2 instances,
Autoscaling group, or On-Prem hosts.
• Accommodate fleets that range in size from one instance all
the way up to tens of thousands of instances
• Automatically schedules updates across multiple Availability
Zones in order to maintain high availability during the
deployment
Dev Source Control
Continuous
Integration
Continuous
Delivery
28. v
What are we deploying?
How much control do we want?
29. v
• Unified command line-based
tool to manage your AWS services
• Control multiple AWS services from
the command line and automate
them through scripts
ALM | Automate with AWS CLI
31. v
Infrastructure as Code
Integrates with version control
JSON format
Templates
Stacks
Supports all AWS resource typesAWS CloudFormation
ALM | Cloudformation
32. v
{
"Description" : "Create an EC2 instance running the Amazon Linux 32 bit AMI.”,
"Parameters" : {
"KeyPair" : {
"Description" : "The EC2 Key Pair to allow SSH access to the instance",
"Type" : "String"
}
},
"Resources" : {
"Ec2Instance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"KeyName" : { "Ref" : "KeyPair" },
"ImageId" : "ami-75g0061f”,
“InstanceType” : “m1.medium”
}
}
},
"Outputs" : {
"InstanceId" : {
"Description" : "The InstanceId of the newly created EC2 instance",
"Value" : { "Ref" : "Ec2Instance” }
}
}
}
Architecting on AWS – Overview of Services for Web Applications
ALM | Cloudformation
33. v
Architecting on AWS – Overview of Services for Web Applications
Template File
Defining Stack
Git
Subversion
Mercurial
Dev
Test
Prod
The entire application can be
represented in an AWS
CloudFormation template.
Use the version
control system of
your choice to store
and track changes to
this template
Build out multiple
environments, such
as for Development,
Test, and Production
using the template
ALM | Cloudformation
34. v
• AWS OpsWorks makes it easy to deploy
& operate apps of all shapes and sizes
• Define configurations for your
entire environment in a format that
you can maintain and version
just like your application source code
• Uses the Chef framework so you can
bring your own recipes or leverage
100’s of community-built configurations
ALM | Opsworks
35. v
• Quickly deploy and manage applications
in the AWS cloud without worrying about
the application infrastructure
• True PaaS – automatically handles all
the details of resource provisioning,
load balancing & auto-scaling
• Launch your Java, PHP, .NET, Node.js,
Python, and Ruby applications
in a matter of minutes
ALM | Beanstalk
36. v
• Cluster Management Made Easy
• Flexible scheduling
• High Performance
• Resource Efficiency
• Programmatic Control
• Docker Compatibility
ALM | Elastic Container Service
38. v• Deploy in place
• Deploy all at once (Service outage)
• Rolling updates
• Blue-Green Deployment
• Discrete environment
• Multiple environments from branches
• Support A/B testing
• “Rolling DNS”
• Alternate Blue-Green (Red-Black?) deployment
• Alternate auto scaling group
• Avoid messing with DNS
ALM | Deployment Approaches
57. v
EDP | What is Event driven architecture?
A software architecture where loosly coupled components
communicate with each other by triggering events
58. v
Type of interaction Time driven Request driven Event driven
Initiator Time Client Even
Participants The specified systems Client and Server Open ended
Example
EDP | Three styles of interaction
Fruit
system
Run inventory every hour
Fruit
system
Me want 5
bananas
Fruit
system
Monkey took 5
bananas
59. v
• Real time (or near real time)
• Push notifications
• One-way ‘fire-and-forget’
• Immediate action at event consumer
• Informational (“monkey took bananas”) and not commands
(“perform banana inventory”)
EDP| 5 characteristics
60. v
• “Stored procedures for the cloud”
• A zero-administration compute platform
• Just the code without needing to define
the underlying compute resources or OS
• Asynchronous functions
• Event driven from other services
• …Or triggered externally and even
chained
AWS Lambda: connective tissue for AWS
services
All you need is code™
EDP | Event Driven Compute – AWS Lambda
61. No Infrastructure to
Manage
• Focus on business logic, not
infrastructure
• Customer uploads code; AWS
Lambda handles
• Capacity
• Scaling
• Deployment
• Fault tolerance
• Monitoring
• Logging
• Web service front end
• Security patching
EDP | AWS Lambda
62. Automatic scaling
• Customers can’t over or under
provision
• Customers pay only for what
they use
• E.g. Each object uploaded to
Amazon S3 is an event
• Each event becomes a Lambda
request (hands free delivery)
• Lambda scales to match the
event rate
EDP | AWS Lambda
63. Bring your own code
(BYOC)
• Create threads and
processes, run batch
scripts or other
executables, and
read/write files in /tmp.
• Include any library with a
Lambda function code,
even native libraries.
EDP | AWS Lambda
64. Fine-grained pricing
• Price compute time by
100ms, so even short jobs
make sense
• Low request charge
• No hourly, daily, or
monthly minimums
• Free tier
EDP | AWS Lambda
65. v
• AWS Service Integration
• Event triggers from Amazon S3,
DynamoDB, and Kinesis events
• Compute at any scale
• One request a month or 10,000
parallel invocations
• Simple, stateless approach, expressed
in conventional languages
• Fast response
• No long delays for provisioning,
deployment or scale-up
• Change and run code as fast as you can type
• Never pay for idle
• Fine-grained pricing in 100ms, 64MB steps
• Economical at any scale
AWS Lambda
AWS Event Integration
S3
Handler
Dynamo
Handler
Kinesis
Handler
Custom
Invoke
API
App
Event
Handler
EDP | AWS Lambda – Key Features
AWS offers building blocks such as EC2, S3, ECS, RDS that you can use to build your application. Choosing the right method to deploy and manage application on AWS depends on what you are trying to deploy to AWS (e.g. code or a container image) and how much control you want over the AWS resources that run your workload (manual, tool, or platform).
The approach you use for deployment depends on what you are deploying and how much control you want
Notes:
The entire application can be represented in an AWS CloudFormation template.
You can use the version control system of your choice to store and track changes to this template.
You can use the template to quickly build out multiple environments, such as for Development, Test, and Production.
For customers who want to create their own highly automated application deployment “recipes", the AWS OpsWorks platform helps you automate operational tasks like code deployment, software configurations, package installations, database setups, and server scaling using Chef. OpsWorks gives you the flexibility in defining your application architecture and resource configuration and handles the provisioning and management of your AWS resources for you.
For customers who want to deploy code for web applications and services with three tier architectures, the AWS Elastic Beanstalk platform is the fastest and easiest way to deploy and manage these applications. Developers can simply upload their application code and the service automatically handles all the details such as resource provisioning, load balancing, auto-scaling, and monitoring.
For customers who are deploying applications using containers like Docker, Amazon EC2 Container Service is the best choice. Amazon EC2 Container Service is a highly scalable, high-performance container management service that makes it easy to run and manage distributed applications using Docker containers on AWS. With this service, customers can easily launch, manage, and scale from one to tens of thousands of containers across a managed cluster of Amazon EC2 instances using powerful APIs.