Top Banner
Managing your cloud assets Ryan Shuttleworth – Technical Evangelist @ryanAWS
84

Managing Your Cloud Assets with AWS

Jan 15, 2015

Download

Technology

Amazon Web Services enables 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. In this webinar we'll introduce two frameworks built into the AWS cloud that can help you manage your technical assets as you grow:

Amazon Elastic Beanstalk provides a 'drop and run' environment for deploying your php, java and .net applications. We'll show you how quick it is to get going and how Beanstalk manages your AWS environment for you so you don't have to.

Amazon Cloud Formation is a comprehensive scripting language that lets you take complete control over the automation of AWS. We'll show you the basics of Cloud Formation and point you in the direction of a growing library of templates for common application configurations.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Managing Your Cloud Assets with AWS

Managing your cloud assets

Ryan Shuttleworth – Technical Evangelist @ryanAWS

Page 2: Managing Your Cloud Assets with AWS

Agenda

Setting the scene – a spectrum of system definition and control

A shrink wrapped approach – Elastic Beanstalk

Fine grained control – CloudFormation

Complementary uses – CloudFormation & Beanstalk working together

Page 3: Managing Your Cloud Assets with AWS

Your feedback is important

Tell us:

What’s good, what’s not

What you want to see at these events

What you want AWS to deliver for

you

Page 4: Managing Your Cloud Assets with AWS

Cloud assets are growing quickly

Defined architectural patterns More applications

More data More services

aws.amazon.com/architecture

Greater agility = faster moving environments

Page 5: Managing Your Cloud Assets with AWS

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

Page 6: Managing Your Cloud Assets with AWS

Two ends of the spectrum…

Page 7: Managing Your Cloud Assets with AWS

Controlled chaos

Meticulous management

Page 8: Managing Your Cloud Assets with AWS

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 9: Managing Your Cloud Assets with AWS

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 10: Managing Your Cloud Assets with AWS

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 11: Managing Your Cloud Assets with AWS

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 12: Managing Your Cloud Assets with AWS

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 13: Managing Your Cloud Assets with AWS

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: Managing Your Cloud Assets with AWS

Quickly deploy and manage apps in AWS…

Elastic Beanstalk

CloudFormation

Tools

Page 15: Managing Your Cloud Assets with AWS

…into a range of containers

Elastic Beanstalk

CloudFormation

Tools

.Net PHP

Java Python

Page 16: Managing Your Cloud Assets with AWS

…into a range of containers

Elastic Beanstalk

CloudFormation

Tools

http://aws.typepad.com

Keep updated on new containers:

Page 17: Managing Your Cloud Assets with AWS

Application package is deployed into Beanstalk

Elastic Beanstalk

CloudFormation

Tools

Page 18: Managing Your Cloud Assets with AWS

User Application

Application Service

HTTP Service

Language Interpreter

Operating System

Host

Which creates the container in EC2

Elastic Beanstalk

CloudFormation

Tools

Page 19: Managing Your Cloud Assets with AWS

Beanstalk takes care of the environment…

Elastic Beanstalk

CloudFormation

Tools

Page 20: Managing Your Cloud Assets with AWS

…adding Elastic Load Balancer…

Elastic Beanstalk

CloudFormation

Tools

Page 21: Managing Your Cloud Assets with AWS

…Auto Scaling groups

Elastic Beanstalk

CloudFormation

Tools

Page 22: Managing Your Cloud Assets with AWS

…and launching instances

Elastic Beanstalk

CloudFormation

Tools

Page 23: Managing Your Cloud Assets with AWS

…all wired into the Beanstalk framework

Elastic Beanstalk

CloudFormation

Tools

Page 24: Managing Your Cloud Assets with AWS

…and published under a CNAME

Elastic Beanstalk

CloudFormation

Tools

Page 25: Managing Your Cloud Assets with AWS

…with logs and app versions held in S3

Elastic Beanstalk

CloudFormation

Tools

Page 26: Managing Your Cloud Assets with AWS

How do you create an app for AWS ElasticBeanstalk?

Page 27: Managing Your Cloud Assets with AWS

Like any other Java / .Net / PHP / Python

app

Page 28: Managing Your Cloud Assets with AWS

No dependencies on AWS inherent for Beanstalk deployment

Elastic Beanstalk

CloudFormation

Tools

Source uploaded and executed in AWS

Source downloaded

and executed locally

Page 29: Managing Your Cloud Assets with AWS

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 30: Managing Your Cloud Assets with AWS

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 31: Managing Your Cloud Assets with AWS

Console deployments and version updates

Elastic Beanstalk

CloudFormation

Tools

Page 32: Managing Your Cloud Assets with AWS

Command line tools and wizards

Elastic Beanstalk

CloudFormation

Tools

CheckDNSAvailability elastic-beanstalk-check-dns-availability

CreateApplication elastic-beanstalk-create-application

CreateApplictaionVersion

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 33: Managing Your Cloud Assets with AWS

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 34: Managing Your Cloud Assets with AWS

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 35: Managing Your Cloud Assets with AWS

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 36: Managing Your Cloud Assets with AWS

Eclipse integration

Elastic Beanstalk

CloudFormation

Tools

Page 37: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 38: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 39: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 40: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 41: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 42: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 43: Managing Your Cloud Assets with AWS

Visual Studio integration

Elastic Beanstalk

CloudFormation

Tools

Page 44: Managing Your Cloud Assets with AWS

Git integration

Elastic Beanstalk

CloudFormation

Tools

Page 45: Managing Your Cloud Assets with AWS

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 46: Managing Your Cloud Assets with AWS

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 47: Managing Your Cloud Assets with AWS

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 48: Managing Your Cloud Assets with AWS

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 49: Managing Your Cloud Assets with AWS

Container configuration

Elastic Beanstalk

CloudFormation

Tools

Page 50: Managing Your Cloud Assets with AWS

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

Page 51: Managing Your Cloud Assets with AWS

Application prototype

One-click deployment

Production ready AWS infrastructure

Page 52: Managing Your Cloud Assets with AWS

Idea App

Page 53: Managing Your Cloud Assets with AWS

Idea App Heavy lifting

70%

Page 54: Managing Your Cloud Assets with AWS

30%

Idea App Infrastructure

services

Page 55: Managing Your Cloud Assets with AWS

Idea App Elastic Beanstalk

Page 56: Managing Your Cloud Assets with AWS

Elastic Beanstalk

Idea App

Page 57: Managing Your Cloud Assets with AWS

Company launching product into new geography

Online application & marketing site deployed to support launch

Site crashed under exceptional demand - DoS existing datacenter

Needed fast deployment mechanism with no interest in underlying infrastructure

Page 58: Managing Your Cloud Assets with AWS

Company launching product into new geography

Online application & marketing site deployed to support launch

Site crashed under exceptional demand - DoS existing datacenter

Needed fast deployment mechanism with no interest in underlying infrastructure

Turned to Beanstalk - deployed & scaled seamlessly, restoring website

Page 59: Managing Your Cloud Assets with AWS

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 60: Managing Your Cloud Assets with AWS

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 61: Managing Your Cloud Assets with AWS

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 62: Managing Your Cloud Assets with AWS

CloudFormation – underlying automation framework

Elastic Beanstalk

CloudFormation

Tools

Security Scaling

Database

Networking Monitoring

Messaging

Workflow

DNS

Load Balancing

Backup CDN

Compute

Storage

Page 63: Managing Your Cloud Assets with AWS

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 64: Managing Your Cloud Assets with AWS

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 65: Managing Your Cloud Assets with AWS

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 66: Managing Your Cloud Assets with AWS

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 67: Managing Your Cloud Assets with AWS

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 68: Managing Your Cloud Assets with AWS

The benefit of templated environments

Elastic Beanstalk

CloudFormation

Tools

Template

Procedural definition Create it programmatically

Page 69: Managing Your Cloud Assets with AWS

The benefit of templated environments

Elastic Beanstalk

CloudFormation

Tools

Template

Procedural definition Create it programmatically

Parameter driven Dynamic and user-driven

templates

Page 70: Managing Your Cloud Assets with AWS

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 71: Managing Your Cloud Assets with AWS

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 72: Managing Your Cloud Assets with AWS

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

Elastic Loadbalancing Amazon Live Streaming

Cloud Front Cloud Formation

Page 73: Managing Your Cloud Assets with AWS

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 74: Managing Your Cloud Assets with AWS

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 75: Managing Your Cloud Assets with AWS

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 76: Managing Your Cloud Assets with AWS

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 77: Managing Your Cloud Assets with AWS

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 78: Managing Your Cloud Assets with AWS

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 79: Managing Your Cloud Assets with AWS

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 80: Managing Your Cloud Assets with AWS

High level, shrink

wrapped

Fine grained, declarative

control

Elastic Beanstalk

CloudFormation

+

+

Page 81: Managing Your Cloud Assets with AWS

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 82: Managing Your Cloud Assets with AWS

Get started fast with Beanstalk (control the chaos)

Take fine grained control with CloudFormation

(auditable environment specs)

Page 83: Managing Your Cloud Assets with AWS

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

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

Find out more…

Page 84: Managing Your Cloud Assets with AWS

aws.amazon.com

get started with the free tier