Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo

1

© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Warren Santner, Solutions Architect
January 26, 2016
Essentials
Introduction to Deploying Applications on AWS

2

Learning Objectives
• Understand the primary services for deploying your
application on AWS
• Learn the basics of AWS Elastic Beanstalk, AWS
CodeDeploy, and Amazon EC2 Container Service
• Gain an understanding of the strengths of each service
and when to use them

3

Deployments are Not Easy
• Traditional environments
favor in-place upgrades
• Resource constraints
• Downtime
• Dependencies
• Fragile, High-Touch
Processes
• Difficult rollback

4

Common Deployment Risks
Challenges
Application failure
Infrastructure failure
Capacity issues
Scaling issues
People failure
Process failure
Rollback issues
Business Impacts
Downtime
Data loss
Bad customer experience
Lost revenue
Grumpy managers
Burned out staff
Wasted time/resources

5

Benefits of Deploying with AWS Services
AWS:
• Agile deployments
• Flexible options
• Scalable capacity
• Automation capabilities

6

Elastic Beanstalk CodeDeploy EC2 Container
Service (ECS)
Deploy Web
Applications without
Managing Infrastructure
Automate Code
Deployments to EC2
and On-Premises
Easily Deploy on
Managed Docker
Clusters
Three Choices for Deployment

7

Common Patterns
You want to simply
deploy your web
application (code or
container) without
managing the
infrastructure.
You need a scalable
cluster to run simple
and complex
container
deployments.
You require a flexible
tool to deploy and
update software on
the instances you
manage both on-
premises and in the
cloud.
Elastic Beanstalk CodeDeploy EC2 Container
Service (ECS)

8

“I’ve been developing a Django application on my
laptop and am ready to go into production.”
“We need a way to deploy and scale
microservices across a cluster of instances.”
“We outsourced the development of a new
web application that our contractor delivered
as a WAR that we need to run and scale in
production.”
“Our operations team manages a fleet of
application servers, but we need more flexibility
to do rolling updates.”
“We have a deployment that requires executing
custom tasks before and after the installation
while orchestrating the deployment without
downtime.”
“Our dev teams are moving to Docker
containers and we need to build a platform to
support running them at scale in production.”
Use Cases
Elastic Beanstalk
CodeDeploy
EC2 Container Service

9

AWS Elastic Beanstalk
deploy and scale web applications and services developed with
Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker

10

Benefits
Fast & simple
to begin
Developer
productivity
Impossible
to outgrow
Complete
resource control

11

AWS Elastic Beanstalk Overview
Your code
HTTP server
Application server
Language interpreter
Operating system
Instance
Elastic Beanstalk configures
each EC2 instance in your
environment with the
components necessary to run
applications for the selected
platform. No more worrying
about logging into instances to
install and configure your
application stack.
Focus on building your
application
Provided by you
Provided and managed by Elastic Beanstalk
On-instance configuration

12

Platform Support
PHP
Python
Java
Ruby
Node.js
.NET
Go
Docker

13

Environments Configurations
Save these for easy duplication for
A/B testing or non-disruptive
deployments
Application Versions
All versions stored durably in
Amazon S3. Application can
also be pushed from a Git
repository!
App Versions & Environments

14

Deploy Your App for Test and Production
App
AZ
http://your-dev-app.elasticbeanstalk.com
App
AZ
ELB
http://your-prod-app.elasticbeanstalk.com

15

AWS CodeDeploy
automate code deployments to any instance, including Amazon
EC2 instances and instances running on-premises

16

Benefits
Automates
Deployments
Minimize Downtime Centralized Control East to Adopt

17

Scale from one instance to thousands
Deploy to any server: AWS or on-premises
Centrally control and monitor
Test
CodeDeployv1, v2, v3
Production
Dev
application
revisions
deployment groups
Agent
Agent Agent
Agent
Agent
Agent
Agent
Coordinate Automated Deployments

18

How It Works: Package App
version: 0.0
os: linux
files:
- source: chef/
destination: /etc/chef/codedeploy
- source: target/hello.war
destination: /var/lib/tomcat6/webapps
hooks:
ApplicationStop:
- location: deploy_hooks/stop-tomcat.sh
BeforeInstall:
- location: deploy_hooks/install-chef.sh
- location: deploy_hooks/chef-solo.sh
ApplicationStart:
- location: deploy_hooks/start-tomcat.sh
ValidateService:
- location: deploy_hooks/verify_service.sh

19

Agent Agent Agent
Test
Agent Agent
Agent Agent
Agent
Agent
Production
Deployment groupDeployment group
Group instances by:
• Auto Scaling Group
• Amazon EC2 Tag
• On-Premises Tag
How It Works: Specify Targets

20

aws deploy create-deployment 
--application-name MyApp 
--deployment-group-name TargetGroup 
--s3-location bucket=MyBucket,key=MyApp.zip
• AWS CLI & SDKs
• AWS Console
• AWS CodePipeline & CI/CD Partners
• S3, GitHub & BitBucket
How It Works: Deploy

21

v2 v1 v1 v1 v1 v1 v1 v1
v2 v2 v1 v1 v1 v1 v1 v1
v2 v2 v2 v2 v1 v1 v1 v1
v2 v2 v2 v2 v2 v2 v2 v2
One-at-a-time
Min. healthy hosts = 99%
[Custom]
Min. healthy hosts = 75%
Half-at-a-time
Min. healthy hosts = 50%
All-at-once
Min. healthy hosts = 0
Deployment Configurations

22

Amazon EC2 Container Service
highly scalable, high performance container management
service that supports Docker containers and allows you to
easily run applications on a managed cluster of Amazon EC2
instances

23

Amazon EC2 Container Service
• Highly scalable, high performance container
management service that supports Docker.
• Takes care of reliable state management and flexible
scheduling for you.
Application fidelity from the developer desk to production.
Package your application and dependencies
into a Docker container.

24

EC2 Container Service Benefits
Cluster Management
Made Easy
Performance at
Scale
Integrated

25

ECS Components
Task Definition
ECS Cluster
Container Instance

26

ECS Service Scheduler – Updating Your App
Deployment process:
• Start with blue task definition
referenced by an ECS service
• Create a green revision of the
existing task definition
• Update existing ECS service to use
the updated task definition
• ECS will deploy the new task
definition to container instances in
a rolling fashion

27

Pattern: ECS service update
Deployment process:
• Start with blue task definition
referenced by an ECS service
• Create a green revision of the
existing task definition
• Update existing ECS service to use
the updated task definition
• ECS will deploy the new task
definition to container instances in
a rolling fashion

28

Pattern: ECS service update
Deployment process:
• Start with blue task definition
referenced by an ECS service
• Create a green revision of the
existing task definition
• Update existing ECS service to use
the updated task definition
• ECS will deploy the new task
definition to container instances in
a rolling fashion

29

Pattern: ECS service update
Deployment process:
• Start with blue task definition
referenced by an ECS service
• Create a green revision of the
existing task definition
• Update existing ECS service to use
the updated task definition
• ECS will deploy the new task
definition to container instances in
a rolling fashion

30

Service Comparison

31

Decision Tree
Are you using Docker or VMs?
Docker VMs
Do you have a
3-Tier web app
or website?
NoYes
Use
CodeDeploy
Use ECSUse Elastic
Beanstalk
Use Elastic
Beanstalk
Do you have a
3-Tier web app
or website?
Yes No

32

Elastic Beanstalk CodeDeploy
EC2 Container
Service
Overview
Simply deploy your application
on a set number of platforms
Deploy any application on
your infrastructure and
integrate with existing CI/CD
processes
Use a managed cluster and
focus on development and
deployment of Linux Docker
Containers
Deployment
Targets
Tomcat, PHP, Python, Node.js,
Ruby, .NET, Java SE, Docker,
Go
Generic – Windows and Linux Linux Docker Containers
3rd Party
Integrations
(as of
01/2016)
Integrate with your CI/CD
workflow with open APIs
and/or the AWS CLI
Bitbucket & GitHub
Bamboo, CircleCI,
CloudBees/Jenkins, Codeship,
Solano Labs, Travis CI
Ansible, Chef, Puppet,
SaltStack
Any third party or accessible
private Docker registry, or
Docker Hub
Pricing
No additional charge. Pay for
the resources you create to
store and run your application.
No additional charge for
deployments to EC2
instances. Customers pay
$0.02 per on-premises
instance update.
No additional charge. Pay for
the resources you create to
store and run your application.

33

Learn More
AWS re:Invent 2015
(DVO306) AWS CodeDeploy: Automating Your Software Deployments
https://www.youtube.com/watch?v=A4NSyUbAEkw
AWS re:Invent 2015
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
https://www.youtube.com/watch?v=nkj0GXgaRv8
AWS re:Invent 2015
(CMP302) Amazon ECS: Distributed Applications at Scale
https://www.youtube.com/watch?v=eun8CqGqdk8

34

Thank you!

More Related Content

AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Warren Santner, Solutions Architect January 26, 2016 Essentials Introduction to Deploying Applications on AWS
  • 2. Learning Objectives • Understand the primary services for deploying your application on AWS • Learn the basics of AWS Elastic Beanstalk, AWS CodeDeploy, and Amazon EC2 Container Service • Gain an understanding of the strengths of each service and when to use them
  • 3. Deployments are Not Easy • Traditional environments favor in-place upgrades • Resource constraints • Downtime • Dependencies • Fragile, High-Touch Processes • Difficult rollback
  • 4. Common Deployment Risks Challenges Application failure Infrastructure failure Capacity issues Scaling issues People failure Process failure Rollback issues Business Impacts Downtime Data loss Bad customer experience Lost revenue Grumpy managers Burned out staff Wasted time/resources
  • 5. Benefits of Deploying with AWS Services AWS: • Agile deployments • Flexible options • Scalable capacity • Automation capabilities
  • 6. Elastic Beanstalk CodeDeploy EC2 Container Service (ECS) Deploy Web Applications without Managing Infrastructure Automate Code Deployments to EC2 and On-Premises Easily Deploy on Managed Docker Clusters Three Choices for Deployment
  • 7. Common Patterns You want to simply deploy your web application (code or container) without managing the infrastructure. You need a scalable cluster to run simple and complex container deployments. You require a flexible tool to deploy and update software on the instances you manage both on- premises and in the cloud. Elastic Beanstalk CodeDeploy EC2 Container Service (ECS)
  • 8. “I’ve been developing a Django application on my laptop and am ready to go into production.” “We need a way to deploy and scale microservices across a cluster of instances.” “We outsourced the development of a new web application that our contractor delivered as a WAR that we need to run and scale in production.” “Our operations team manages a fleet of application servers, but we need more flexibility to do rolling updates.” “We have a deployment that requires executing custom tasks before and after the installation while orchestrating the deployment without downtime.” “Our dev teams are moving to Docker containers and we need to build a platform to support running them at scale in production.” Use Cases Elastic Beanstalk CodeDeploy EC2 Container Service
  • 9. AWS Elastic Beanstalk deploy and scale web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker
  • 10. Benefits Fast & simple to begin Developer productivity Impossible to outgrow Complete resource control
  • 11. AWS Elastic Beanstalk Overview Your code HTTP server Application server Language interpreter Operating system Instance Elastic Beanstalk configures each EC2 instance in your environment with the components necessary to run applications for the selected platform. No more worrying about logging into instances to install and configure your application stack. Focus on building your application Provided by you Provided and managed by Elastic Beanstalk On-instance configuration
  • 13. Environments Configurations Save these for easy duplication for A/B testing or non-disruptive deployments Application Versions All versions stored durably in Amazon S3. Application can also be pushed from a Git repository! App Versions & Environments
  • 14. Deploy Your App for Test and Production App AZ http://your-dev-app.elasticbeanstalk.com App AZ ELB http://your-prod-app.elasticbeanstalk.com
  • 15. AWS CodeDeploy automate code deployments to any instance, including Amazon EC2 instances and instances running on-premises
  • 17. Scale from one instance to thousands Deploy to any server: AWS or on-premises Centrally control and monitor Test CodeDeployv1, v2, v3 Production Dev application revisions deployment groups Agent Agent Agent Agent Agent Agent Agent Coordinate Automated Deployments
  • 18. How It Works: Package App version: 0.0 os: linux files: - source: chef/ destination: /etc/chef/codedeploy - source: target/hello.war destination: /var/lib/tomcat6/webapps hooks: ApplicationStop: - location: deploy_hooks/stop-tomcat.sh BeforeInstall: - location: deploy_hooks/install-chef.sh - location: deploy_hooks/chef-solo.sh ApplicationStart: - location: deploy_hooks/start-tomcat.sh ValidateService: - location: deploy_hooks/verify_service.sh
  • 19. Agent Agent Agent Test Agent Agent Agent Agent Agent Agent Production Deployment groupDeployment group Group instances by: • Auto Scaling Group • Amazon EC2 Tag • On-Premises Tag How It Works: Specify Targets
  • 20. aws deploy create-deployment --application-name MyApp --deployment-group-name TargetGroup --s3-location bucket=MyBucket,key=MyApp.zip • AWS CLI & SDKs • AWS Console • AWS CodePipeline & CI/CD Partners • S3, GitHub & BitBucket How It Works: Deploy
  • 21. v2 v1 v1 v1 v1 v1 v1 v1 v2 v2 v1 v1 v1 v1 v1 v1 v2 v2 v2 v2 v1 v1 v1 v1 v2 v2 v2 v2 v2 v2 v2 v2 One-at-a-time Min. healthy hosts = 99% [Custom] Min. healthy hosts = 75% Half-at-a-time Min. healthy hosts = 50% All-at-once Min. healthy hosts = 0 Deployment Configurations
  • 22. Amazon EC2 Container Service highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances
  • 23. Amazon EC2 Container Service • Highly scalable, high performance container management service that supports Docker. • Takes care of reliable state management and flexible scheduling for you. Application fidelity from the developer desk to production. Package your application and dependencies into a Docker container.
  • 24. EC2 Container Service Benefits Cluster Management Made Easy Performance at Scale Integrated
  • 25. ECS Components Task Definition ECS Cluster Container Instance
  • 26. ECS Service Scheduler – Updating Your App Deployment process: • Start with blue task definition referenced by an ECS service • Create a green revision of the existing task definition • Update existing ECS service to use the updated task definition • ECS will deploy the new task definition to container instances in a rolling fashion
  • 27. Pattern: ECS service update Deployment process: • Start with blue task definition referenced by an ECS service • Create a green revision of the existing task definition • Update existing ECS service to use the updated task definition • ECS will deploy the new task definition to container instances in a rolling fashion
  • 28. Pattern: ECS service update Deployment process: • Start with blue task definition referenced by an ECS service • Create a green revision of the existing task definition • Update existing ECS service to use the updated task definition • ECS will deploy the new task definition to container instances in a rolling fashion
  • 29. Pattern: ECS service update Deployment process: • Start with blue task definition referenced by an ECS service • Create a green revision of the existing task definition • Update existing ECS service to use the updated task definition • ECS will deploy the new task definition to container instances in a rolling fashion
  • 31. Decision Tree Are you using Docker or VMs? Docker VMs Do you have a 3-Tier web app or website? NoYes Use CodeDeploy Use ECSUse Elastic Beanstalk Use Elastic Beanstalk Do you have a 3-Tier web app or website? Yes No
  • 32. Elastic Beanstalk CodeDeploy EC2 Container Service Overview Simply deploy your application on a set number of platforms Deploy any application on your infrastructure and integrate with existing CI/CD processes Use a managed cluster and focus on development and deployment of Linux Docker Containers Deployment Targets Tomcat, PHP, Python, Node.js, Ruby, .NET, Java SE, Docker, Go Generic – Windows and Linux Linux Docker Containers 3rd Party Integrations (as of 01/2016) Integrate with your CI/CD workflow with open APIs and/or the AWS CLI Bitbucket & GitHub Bamboo, CircleCI, CloudBees/Jenkins, Codeship, Solano Labs, Travis CI Ansible, Chef, Puppet, SaltStack Any third party or accessible private Docker registry, or Docker Hub Pricing No additional charge. Pay for the resources you create to store and run your application. No additional charge for deployments to EC2 instances. Customers pay $0.02 per on-premises instance update. No additional charge. Pay for the resources you create to store and run your application.
  • 33. Learn More AWS re:Invent 2015 (DVO306) AWS CodeDeploy: Automating Your Software Deployments https://www.youtube.com/watch?v=A4NSyUbAEkw AWS re:Invent 2015 (DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk https://www.youtube.com/watch?v=nkj0GXgaRv8 AWS re:Invent 2015 (CMP302) Amazon ECS: Distributed Applications at Scale https://www.youtube.com/watch?v=eun8CqGqdk8