94
Journey through the cloud: Managing your cloud assets Ryan Shuttleworth – Technical Evangelist @ryanAWS

AWS - Managing Your Cloud Assets 2013

Embed Size (px)

DESCRIPTION

Amazon Web Services puts on-demand infrastructure at your fingertips, making it easy and cost effective to spin up new environments for developing and running your applications. But when things scale out, the number of pieces of infrastructure to manage and configure increases. This webinar introduces two frameworks, Amazon Elastic Beanstalk and Amazon Cloud Formation, both built into the AWS cloud that can help you manage your technical assets as you grow.

Citation preview

Page 1: AWS - Managing Your Cloud Assets 2013

Journey through the cloud: Managing your cloud assets

Ryan Shuttleworth – Technical Evangelist @ryanAWS

Page 2: AWS - Managing Your Cloud Assets 2013

Common use cases & stepping stones into the AWS cloud Learning from customer journeys

Best practices to bootstrap your projects

Journey through the cloud

Page 3: AWS - Managing Your Cloud Assets 2013

Getting to grips with system sprawl in an unconstrained environment Leverage management frameworks to take control

Choose systems that suite your technology delivery style

Managing cloud assets

Page 4: AWS - Managing Your Cloud Assets 2013

Setting the scene A shrink wrapped approach – Elastic Beanstalk Fine grained control – CloudFormation A middle way - OpsWorks

Agenda

Page 5: AWS - Managing Your Cloud Assets 2013

Cloud assets are growing quickly

Defined architectural patterns More applications

More data More services

aws.amazon.com/architecture

Greater agility = faster moving environments

Page 6: AWS - Managing Your Cloud Assets 2013

How do we maintain control over what is deployed in the cloud?

Page 7: AWS - Managing Your Cloud Assets 2013

Two ends of the spectrum…

Page 8: AWS - Managing Your Cloud Assets 2013

Controlled chaos

Meticulous management

Page 9: AWS - Managing Your Cloud Assets 2013

Controlled chaos

Meticulous management

Prototype an app Deploy to an instance

Test and develop cycles Go to production

Deploy more instances Deploy RDS

Add load balancers Add autoscaling

Audit what you have?

Quickly becomes DevOps nightmare

Page 10: AWS - Managing Your Cloud Assets 2013

Controlled chaos

Meticulous management

Prototype an app Deploy to an instance

Test and develop cycles Go to production

Deploy more instances Deploy RDS

Add load balancers Add autoscaling

Audit what you have?

Quickly becomes DevOps nightmare

Prototype an app Plan infrastructure

Build standards Deploy environment

Manage through change control Formal processes

Formal tools Embed configuration in

chef/puppet

Tightly controlled, but lots of effort to achieve

Page 11: AWS - Managing Your Cloud Assets 2013

Controlled chaos

Meticulous management

People Processes Controls

Tools

Prototype an app Deploy to an instance

Test and develop cycles Go to production

Deploy more instances Deploy RDS

Add load balancers Add autoscaling

Audit what you have?

Quickly becomes DevOps nightmare

Prototype an app Plan infrastructure

Build standards Deploy environment

Manage through change control Formal processes

Formal tools Embed configuration in

chef/puppet

Tightly controlled, but lots of effort to achieve

Page 12: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Tools

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 13: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Tools

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 14: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Middle ground

AWS OpsWorks

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 15: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Middle ground

AWS OpsWorks

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 16: AWS - Managing Your Cloud Assets 2013

Quickly deploy and manage apps in AWS…

Elastic Beanstalk

CloudFormation

Tools

Page 17: AWS - Managing Your Cloud Assets 2013

…into a range of containers

Elastic Beanstalk

CloudFormation

Tools

.Net PHP

Java Python

Ruby Node.js

Page 18: AWS - Managing Your Cloud Assets 2013

…into a range of containers

Elastic Beanstalk

CloudFormation

Tools

http://aws.typepad.com

Keep updated on new containers:

Page 19: AWS - Managing Your Cloud Assets 2013

Application package is deployed into Beanstalk

Elastic Beanstalk

CloudFormation

Tools

Page 20: AWS - Managing Your Cloud Assets 2013

User Application

Application Service

HTTP Service

Language Interpreter

Operating System

Host

Which creates the container in EC2

Elastic Beanstalk

CloudFormation

Tools

Page 21: AWS - Managing Your Cloud Assets 2013

Beanstalk takes care of the environment…

Elastic Beanstalk

CloudFormation

Tools

Page 22: AWS - Managing Your Cloud Assets 2013

…adding Elastic Load Balancer…

Elastic Beanstalk

CloudFormation

Tools

Page 23: AWS - Managing Your Cloud Assets 2013

…Auto Scaling groups

Elastic Beanstalk

CloudFormation

Tools

Page 24: AWS - Managing Your Cloud Assets 2013

…and launching instances

Elastic Beanstalk

CloudFormation

Tools

Page 25: AWS - Managing Your Cloud Assets 2013

…all wired into the Beanstalk framework

Elastic Beanstalk

CloudFormation

Tools

Page 26: AWS - Managing Your Cloud Assets 2013

…and published under a CNAME

Elastic Beanstalk

CloudFormation

Tools

Page 27: AWS - Managing Your Cloud Assets 2013

…with logs and app versions held in S3

Elastic Beanstalk

CloudFormation

Tools

Page 28: AWS - Managing Your Cloud Assets 2013

User Application

Application Service

Apache

Python

Operating System

Host

mod_wsgi

…Python mod-wsgi & apache

Elastic Beanstalk

Page 29: AWS - Managing Your Cloud Assets 2013

User Application

Application Service

Nginx

Ruby

Operating System

Host

Passenger & Nginx…

Elastic Beanstalk

passenger

Page 30: AWS - Managing Your Cloud Assets 2013

What about the data?

Page 31: AWS - Managing Your Cloud Assets 2013

Rails

Django

Git Beanstalk

rake

syncdb

RDS

Page 32: AWS - Managing Your Cloud Assets 2013

How do you create an app for AWS ElasticBeanstalk?

Page 33: AWS - Managing Your Cloud Assets 2013

Like any other app

Page 34: AWS - Managing Your Cloud Assets 2013

No dependencies on AWS inherent for Beanstalk deployment

Elastic Beanstalk

CloudFormation

Tools

Source uploaded and executed in AWS

Source downloaded

and executed locally

Page 35: AWS - Managing Your Cloud Assets 2013

Package up as normal…

Elastic Beanstalk

CloudFormation

Tools

Java .war file

Microsoft Web

Deploy package

PHP .zip file

Python .zip file

Git integration IDE plugins

Page 36: AWS - Managing Your Cloud Assets 2013

Package up as normal…

Elastic Beanstalk

CloudFormation

Tools

Java .war file

Microsoft Web

Deploy package

PHP .zip file

Python .zip file

Git integration IDE plugins

Page 37: AWS - Managing Your Cloud Assets 2013

Console deployments and version updates

Elastic Beanstalk

CloudFormation

Tools

Page 38: AWS - Managing Your Cloud Assets 2013

Command line tools and wizards

Elastic Beanstalk

CloudFormation

Tools

CheckDNSAvailability elastic-beanstalk-check-dns-availability

CreateApplication elastic-beanstalk-create-application

CreateApplicationVersion

elastic-beanstalk-create-application-version

CreateEnvironment

elastic-beanstalk-create-environment

eb init wizard to initialize an application

eb start/stop start/stop an application

eb update

update application version

eb status

get status of a running application

Page 39: AWS - Managing Your Cloud Assets 2013

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 40: AWS - Managing Your Cloud Assets 2013

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 41: AWS - Managing Your Cloud Assets 2013

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 42: AWS - Managing Your Cloud Assets 2013

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 43: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 44: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 45: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 46: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 47: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 48: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 49: AWS - Managing Your Cloud Assets 2013

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 50: AWS - Managing Your Cloud Assets 2013

Git integration

Elastic Beanstalk

CloudFormation

Tools

Page 51: AWS - Managing Your Cloud Assets 2013

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 52: AWS - Managing Your Cloud Assets 2013

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 53: AWS - Managing Your Cloud Assets 2013

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 54: AWS - Managing Your Cloud Assets 2013

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 55: AWS - Managing Your Cloud Assets 2013

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 56: AWS - Managing Your Cloud Assets 2013

Full admin access on underlying resources EC2 instances, AMIs, AutoScaling groups…

Page 57: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Middle ground

AWS OpsWorks

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 58: AWS - Managing Your Cloud Assets 2013

What happens under the covers of Beanstalk?

Elastic Beanstalk

CloudFormation

Tools

Elastic Beanstalk

AWS

Create security group

Create auto-scaling policy

Create elastic load balancer

Add instance

Install software

Consolidate logs

Page 59: AWS - Managing Your Cloud Assets 2013

What happens under the covers of Beanstalk?

Elastic Beanstalk

CloudFormation

Tools

AWS

Create security group

Create auto-scaling policy

Create elastic load balancer

Add instance

Install software

Consolidate logs

A series of calls into AWS to marshal resource

creation/configuration

Page 60: AWS - Managing Your Cloud Assets 2013

CloudFormation – underlying automation framework

Elastic Beanstalk

CloudFormation

Tools

Security Scaling

Database

Networking Monitoring

Messaging

Workflow

DNS

Load Balancing

Backup CDN

Compute

Storage

Page 61: AWS - Managing Your Cloud Assets 2013

Elastic Beanstalk

CloudFormation

Tools

CloudFormation

A consistent scripting interface for creating/configuring AWS

resources

A framework for lifecycle management of resources

created using scripts

Security Scaling

Database

Networking Monitoring

Messaging

Workflow

DNS

Load Balancing

Backup CDN

Compute

Storage

CloudFormation – underlying automation framework

Page 62: AWS - Managing Your Cloud Assets 2013

CloudFormation components & terminology

Elastic Beanstalk

CloudFormation

Tools

Template CloudFormation

Stack

JSON formatted file

Parameter definition

Resource creation

Configuration actions

Configured AWS services

Comprehensive service support

Service event aware

Customisable

Framework

Stack creation

Stack updates

Error detection and rollback

Page 63: AWS - Managing Your Cloud Assets 2013

Template examples

Elastic Beanstalk

CloudFormation

Tools

Template

JSON formatted file

Parameter definition

Resource creation

Configuration actions

{

"Parameters" : {

"KeyName" : {

"Description" : "Name of an existing EC2 KeyPair to enable SSH

access to the instance",

"Type" : "String"

}

},

}

Snippet: Taking user defined parameters

Page 64: AWS - Managing Your Cloud Assets 2013

Template examples

Elastic Beanstalk

CloudFormation

Tools

Template

JSON formatted file

Parameter definition

Resource creation

Configuration actions

{

"AWSTemplateFormatVersion" : "2010-09-09",

"Description" : "Create RDS with fixed username and password",

"Resources" : {

"MyDB" : {

"Type" : "AWS::RDS::DBInstance",

"Properties" : {

"AllocatedStorage" : "5",

"DBInstanceClass" : "db.m1.small",

"Engine" : "MySQL",

"EngineVersion" : "5.5",

"MasterUsername" : "MyName",

"MasterUserPassword" : "MyPassword"

}

}

}

}

Snippet: Creating RDS instance

Page 65: AWS - Managing Your Cloud Assets 2013

Template examples

Elastic Beanstalk

CloudFormation

Tools

Template

JSON formatted file

Parameter definition

Resource creation

Configuration actions

"AWS::CloudFormation::Init" : {

"config" : {

"packages" : {

"yum" : {

"mysql" : [],

"mysql-server" : [],

"httpd" : [],

"php" : [],

"php-mysql" : []

}

},

"sources" : {

"/var/www/html" : "https://s3.amazonaws.com/

cloudformation-examples/

CloudFormationPHPSample.zip"

},

Snippet: Installing software

Page 66: AWS - Managing Your Cloud Assets 2013

The benefit of templated environments

Elastic Beanstalk

CloudFormation

Tools

Template

Procedural definition Create it programmatically

Page 67: AWS - Managing Your Cloud Assets 2013

The benefit of templated environments

Elastic Beanstalk

CloudFormation

Tools

Template

Procedural definition Create it programmatically

Parameter driven Dynamic and user-driven

templates

Page 68: AWS - Managing Your Cloud Assets 2013

The benefit of templated environments

Elastic Beanstalk

CloudFormation

Tools

Template

Procedural definition Create it programmatically

Parameter driven Dynamic and user-driven

templates

Collaboration Share templates with ease as just files

Page 69: AWS - Managing Your Cloud Assets 2013

The benefit of templated environments

Elastic Beanstalk

CloudFormation

Tools

Template

Procedural definition Create it programmatically

Known configuration Store stack configuration in source control

Parameter driven Dynamic and user-driven

templates

Collaboration Share templates with ease as just files

Page 70: AWS - Managing Your Cloud Assets 2013

NASA TV & Curiosity Route 53 DNS Multi-region & AZ

Elastic Loadbalancing Amazon Live Streaming

Cloud Front Cloud Formation

Page 71: AWS - Managing Your Cloud Assets 2013

NASA TV & Curiosity Route 53 DNS Multi-region & AZ

Elastic Loadbalancing Amazon Live Streaming

Cloud Front Cloud Formation

Template ELBs to front secondary cache

~100 Nginx secondary cache servers

2-3 Nginx mid-tier cache servers

Stack

CloudFormation template defined video caching

infrastructure

Page 72: AWS - Managing Your Cloud Assets 2013

NASA TV & Curiosity Route 53 DNS Multi-region & AZ

Elastic Loadbalancing Amazon Live Streaming

Cloud Front Cloud Formation

Availability Zone

As demand increased new stacks added to an availability

zone using template

One-click complex

rollout

Page 73: AWS - Managing Your Cloud Assets 2013

Where to get more information?

Elastic Beanstalk

CloudFormation

Tools

http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

Server templates High availability configurations

RDS configurations Open source stacks

Snippets

+ Cloud Former (prototype)

Page 74: AWS - Managing Your Cloud Assets 2013

Where to get more information?

Elastic Beanstalk

CloudFormation

Tools

http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

Server templates High availability configurations

RDS configurations Open source stacks

Snippets

+ Cloud Former (prototype)

Page 75: AWS - Managing Your Cloud Assets 2013

Comprehensive service support

Elastic Beanstalk

CloudFormation

Tools

Amazon EC2 Instances (On-Demand Instances, Spot Instances, and Reserved Instances) Amazon Elastic Block Store (EBS) Volumes Elastic Load Balancers Elastic IP Addresses Amazon EC2 Security Groups Auto Scaling Groups Amazon Relational Database Service (RDS) Instances Amazon RDS Security Groups Amazon ElastiCache Clusters Amazon ElastiCache Security Groups Amazon ElastiCache Parameter Groups

Amazon CloudWatch Alarms Amazon Simple Storage Service (S3) Buckets

Amazon Simple DB Domains Amazon Simple Queue Service (SQS) Queues

Amazon Simple Notification Service (SNS) Topics Amazon SNS Subscriptions

Amazon Route 53 DNS Records Amazon CloudFront Distributions and Multi-Origin support

AWS Identity and Access Management users and groups AWS Identify and Access Management policies

Amazon Virtual Private Cloud VPCs, Subnets, Gateways Amazon DynamoDB Tables

Page 76: AWS - Managing Your Cloud Assets 2013

Comprehensive service support

Elastic Beanstalk

CloudFormation

Tools

Amazon EC2 Instances (On-Demand Instances, Spot Instances, and Reserved Instances) Amazon Elastic Block Store (EBS) Volumes Elastic Load Balancers Elastic IP Addresses Amazon EC2 Security Groups Auto Scaling Groups Amazon Relational Database Service (RDS) Instances Amazon RDS Security Groups Amazon ElastiCache Clusters Amazon ElastiCache Security Groups Amazon ElastiCache Parameter Groups

Amazon CloudWatch Alarms Amazon Simple Storage Service (S3) Buckets

Amazon Simple DB Domains Amazon Simple Queue Service (SQS) Queues

Amazon Simple Notification Service (SNS) Topics Amazon SNS Subscriptions

Amazon Route 53 DNS Records Amazon CloudFront Distributions and Multi-Origin support

AWS Identity and Access Management users and groups AWS Identify and Access Management policies

Amazon Virtual Private Cloud VPCs, Subnets, Gateways Amazon DynamoDB Tables

+ AWS Elastic Beanstalk

Page 77: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Tools

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 78: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

+

+

Page 79: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Developer sandboxes with production ready

infrastructure

+

+

Comprehensive control of all aspects of infrastructure

Page 80: AWS - Managing Your Cloud Assets 2013

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

Middle ground

AWS OpsWorks

“I just want my app to run, and I only want

access to machines if I really need to”

“I want to source control my entire datacenter

deployment like I would my apache config”

Page 81: AWS - Managing Your Cloud Assets 2013

Powerful management framework with Chef support

Elastic Beanstalk

CloudFormation

Stack Layers Management

Managed

environment

Definition of environment such as production or test

Management

services

Scaling, cloning, user access, self healing

Collection of

resources

Blueprint for a collection of resources (instances, EBS, EIPs

etc)

OpsWorks

Apps

Your application

assets

Resources to deploy and run in layers

Page 82: AWS - Managing Your Cloud Assets 2013

Simple stack creation through layers

Elastic Beanstalk

CloudFormation

OpsWorks

Layers

Load balancing

HA Proxy installation in an availability zone

Application container

Static, Node.js, Rails, PHP

Database layer

MySQL

Page 83: AWS - Managing Your Cloud Assets 2013

Simple stack creation through layers

Elastic Beanstalk

CloudFormation

OpsWorks

Layers Ganglia

MemCached

Custom layers

+

Page 84: AWS - Managing Your Cloud Assets 2013

Scaling and auto-healing

Elastic Beanstalk

CloudFormation

OpsWorks

Auto healing

Replacement of an ec2 instance regardless of

scaling thresholds

i.e. always maintain 3 nodes across 3 AZs

Page 85: AWS - Managing Your Cloud Assets 2013

Scaling and auto-healing

Elastic Beanstalk

CloudFormation

OpsWorks

Auto healing

Replacement of an ec2 instance regardless of

scaling thresholds

i.e. always maintain 3 nodes across 3 AZs

Time based scaling

Run an ec2 instance on a given schedule

i.e. run these instances only during weekend peaks

Load based scaling

Add and remove instances from a layer based upon

load rules

i.e. run these instances only when CPU goes over 80%

Page 86: AWS - Managing Your Cloud Assets 2013

Scaling and auto-healing

Elastic Beanstalk

CloudFormation

OpsWorks

Page 87: AWS - Managing Your Cloud Assets 2013

Scaling and auto-healing

Elastic Beanstalk

CloudFormation

OpsWorks Lo

ad b

ased

Ti

me

bas

ed

Page 88: AWS - Managing Your Cloud Assets 2013

App deployments

Elastic Beanstalk

CloudFormation

OpsWorks

Page 89: AWS - Managing Your Cloud Assets 2013

App deployments

Elastic Beanstalk

CloudFormation

OpsWorks

Page 90: AWS - Managing Your Cloud Assets 2013

App deployments

Elastic Beanstalk

CloudFormation

OpsWorks

Page 91: AWS - Managing Your Cloud Assets 2013

Customization with chef recipes

Elastic Beanstalk

CloudFormation

OpsWorks

Page 92: AWS - Managing Your Cloud Assets 2013

Get started fast with Beanstalk (control the chaos)

Take fine grained control with CloudFormation

(auditable environment specs)

Manage with layers and recipes with OpsWorks

(control with chef customization)

Page 93: AWS - Managing Your Cloud Assets 2013

http://aws.amazon.com/elasticbeanstalk/

http://aws.amazon.com/cloudformation/

Find out more…

http://aws.amazon.com/opsworks/

Page 94: AWS - Managing Your Cloud Assets 2013

aws.amazon.com

get started with the free tier