Dev & Test on AWS - Journey Through the Cloud

70
Journey Through the Cloud [email protected] @IanMmmm Ian Massingham — Technical Evangelist Dev & Test on AWS

Transcript of Dev & Test on AWS - Journey Through the Cloud

Page 1: Dev & Test on AWS - Journey Through the Cloud

Journey Through the Cloud

[email protected]@IanMmmm

Ian Massingham — Technical Evangelist

Dev & Test on AWS

Page 2: Dev & Test on AWS - Journey Through the Cloud

Journey Through the Cloud

Learn from the journeys taken by other AWS customers

Discover best practices that you can use to bootstrap your projects

Common use cases and adoption models for the AWS Cloud

Page 3: Dev & Test on AWS - Journey Through the Cloud

Development & Test on AWS

Explore the benefits of AWS with a ‘non-production’ use case Create agility in development & test whilst ‘learning cloud’

Exercise elasticity and automation to real advantage

Page 4: Dev & Test on AWS - Journey Through the Cloud

Agenda

Why AWS for development & test workloads? AWS Services to support Dev & Test workloads

Developing & Testing Business Applications on AWS Common Dev & Test Patterns

Resources you can use to learn more

Page 5: Dev & Test on AWS - Journey Through the Cloud

WHY AWS FOR DEVELOPMENTAND TEST WORKLOADS?

Page 6: Dev & Test on AWS - Journey Through the Cloud

COMMON TRAITS

Page 7: Dev & Test on AWS - Journey Through the Cloud

COMMON TRAITS

NUMEROUS

DISPOSABLE

Page 8: Dev & Test on AWS - Journey Through the Cloud

COMMON TRAITS

NUMEROUS

DISPOSABLEProjects start and stop frequently Required for short period of time Golden masters preferred

Page 9: Dev & Test on AWS - Journey Through the Cloud

COMMON TRAITS

NUMEROUS

DISPOSABLE

Many environments support an app Preservation of known configurations Overlapping development cycles

Page 10: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

NUMEROUS

DISPOSABLE

Many environments support an app Preservation of known configurations Overlapping development cycles

Projects start and stop frequently Required for short period of time Golden masters preferred

Page 11: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

Infrastructure as Code

Deploy to a known state, quickly

Page 12: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

Unlimited Elastic Capacity

Infrastructure as Code

Take lots of it when you need it

Deploy to a known state, quickly

Page 13: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

On-demand Charging ModelUnlimited Elastic Capacity

Infrastructure as Code

Take lots of it when you need it Throw it away when you don’t

Deploy to a known state, quickly

Page 14: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

On-demand Charging ModelUnlimited Elastic Capacity

Infrastructure as Code Durable Storage

Take lots of it when you need it Throw it away when you don’t

Preserve it for future reference & reuseDeploy to a known state, quickly

Page 15: Dev & Test on AWS - Journey Through the Cloud

AWS SERVICES TO SUPPORTDEV & TEST WORKLOADS

Page 16: Dev & Test on AWS - Journey Through the Cloud

EC2 + VPC CloudFormation

Tools to Create & Manage an Elastic Datacenter

AMIs, snapshots,bootstrapping

Elastic BeanstalkManaged Standard

Application ContainersDeclaratively defineAWS environments

Page 17: Dev & Test on AWS - Journey Through the Cloud

Tools to Create & Manage an Elastic Datacenter

AMIs, snapshots,bootstrapping

Declaratively defineAWS environments

Using core AWS features to set up an environment to meet

your needs

Created using the AWS console or through simple

scripting

Managed StandardApplication Containers

Give development & test environments to

developers, controlled directly from IDEs

Configure containers to meet your needs

through properties

Take full control of complex environments using Cloud Formation

template language

Generate environment specifications as you

build software

Page 18: Dev & Test on AWS - Journey Through the Cloud

Tools to Create & Manage an Elastic Datacenter

AMIs, snapshots,bootstrapping

Declaratively defineAWS environments

Using core AWS features to set up an environment to meet

your needs

Created using the AWS console or through simple

scripting

Managed StandardApplication Containers

Give development & test environments to

developers, controlled directly from IDEs

Configure containers to meet your needs

through properties

Take full control of complex environments using Cloud Formation

template language

Generate environment specifications as you

build software

Page 19: Dev & Test on AWS - Journey Through the Cloud

Amazon EC2

Generic imageCustomised

building block

Creating re-usable golden images

Page 20: Dev & Test on AWS - Journey Through the Cloud

Extending an on-premises environment

Amazon VPC

Page 21: Dev & Test on AWS - Journey Through the Cloud

Extending an on-premises environment

Amazon VPC

Page 22: Dev & Test on AWS - Journey Through the Cloud

Extending an on-premises environment

Amazon VPC

Page 23: Dev & Test on AWS - Journey Through the Cloud

Extending an on-premises environment

Amazon VPC

Page 24: Dev & Test on AWS - Journey Through the Cloud

Amazon VPC

Extending an on-premises environment

Page 25: Dev & Test on AWS - Journey Through the Cloud

Tools to Create & Manage an Elastic Datacenter

AMIs, snapshots,bootstrapping

Declaratively defineAWS environments

Using core AWS features to set up an environment to meet

your needs

Created using the AWS console or through simple

scripting

Managed StandardApplication Containers

Give development & test environments to

developers, controlled directly from IDEs

Configure containers to meet your needs

through properties

Take full control of complex environments using Cloud Formation

template language

Generate environment specifications as you

build software

Page 26: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 27: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 28: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 29: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 30: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 31: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 32: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 33: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 34: Dev & Test on AWS - Journey Through the Cloud

AWS Elastic Beanstalk

Page 35: Dev & Test on AWS - Journey Through the Cloud

Tools to Create & Manage an Elastic Datacenter

AMIs, snapshots,bootstrapping

Declaratively defineAWS environments

Using core AWS features to set up an environment to meet

your needs

Created using the AWS console or through simple

scripting

Managed StandardApplication Containers

Give development & test environments to

developers, controlled directly from IDEs

Configure containers to meet your needs

through properties

Take full control of complex environments using Cloud Formation

template language

Generate environment specifications as you

build software

Page 36: Dev & Test on AWS - Journey Through the Cloud

CLOUDFORMATION TEMPLATE

AWS CloudFormation

Page 37: Dev & Test on AWS - Journey Through the Cloud

PROCEDURALDEFINITION

Create it programmatically

KNOWN CONFIGURATION Store stack configuration in source control

PARAMETER DRIVEN Dynamic and user-driven

templates

COLLABORATION Share templates with ease as they are just text files

CLOUDFORMATION TEMPLATE

Find out more at : aws.amazon.com/cloudformation

Page 38: Dev & Test on AWS - Journey Through the Cloud

{      "AWSTemplateFormatVersion"  :  "2010-­‐09-­‐09",  

   "Description"  :  "AWS  CloudFormation  Sample  Template  WordPress_Multi_AZ:  WordPress  is  web  software  you  can  use  to  create  a  beautiful  website  or  blog.  This  template  installs  a  highly-­‐available,  scalable  WordPress  deployment  using  a  multi-­‐az  Amazon  RDS  database  instance  for  storage.  It  demonstrates  using  the  AWS  CloudFormation  bootstrap  scripts  to  deploy  WordPress.  **WARNING**  This  template  creates  an  Amazon  EC2  instance,  an  Elastic  Load  Balancer  and  an  Amazon  RDS  database  instance.  You  will  be  billed  for  the  AWS  resources  used  if  you  create  a  stack  from  this  template.",  

   "Parameters"  :  {  

       "KeyName":  {              "Description"  :  "Name  of  an  existing  EC2  KeyPair  to  enable  SSH  access  to  the  instances",              "Type":  "AWS::EC2::KeyPair::KeyName",              "ConstraintDescription"  :  "must  be  the  name  of  an  existing  EC2  KeyPair."          },  

       "InstanceType"  :  {              "Description"  :  "WebServer  EC2  instance  type",              "Type"  :  "String",              "Default"  :  "m1.small",              "AllowedValues"  :  [  "t1.micro",  "t2.micro",  "t2.small",  "t2.medium",  "m1.small",  "m1.medium",  "m1.large",  "m1.xlarge",  "m2.xlarge",  "m2.2xlarge",  "m2.4xlarge",  "m3.medium",  "m3.large",  "m3.xlarge",  "m3.2xlarge",  "c1.medium",  "c1.xlarge",  "c3.large",  "c3.xlarge",  "c3.2xlarge",  "c3.4xlarge",  "c3.8xlarge",  "c4.large",  "c4.xlarge",  "c4.2xlarge",  "c4.4xlarge",  "c4.8xlarge",  "g2.2xlarge",  "r3.large",  "r3.xlarge",  "r3.2xlarge",  "r3.4xlarge",  "r3.8xlarge",  "i2.xlarge",  "i2.2xlarge",  "i2.4xlarge",  "i2.8xlarge",  "hi1.4xlarge",  "hs1.8xlarge",  "cr1.8xlarge",  "cc2.8xlarge",  "cg1.4xlarge"]  ,              "ConstraintDescription"  :  "must  be  a  valid  EC2  instance  type."          },  

       "SSHLocation":  {              "Description":  "The  IP  address  range  that  can  be  used  to  SSH  to  the  EC2  instances",              "Type":  "String",              "MinLength":  "9",              "MaxLength":  "18",              "Default":  "0.0.0.0/0",              "AllowedPattern":  "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",              "ConstraintDescription":  "must  be  a  valid  IP  CIDR  range  of  the  form  x.x.x.x/x."          },  

       "DBClass"  :  {              "Description"  :  "Database  instance  class",              "Type"  :  "String",              "Default"  :  "db.m1.small",              "AllowedValues"  :  [  "db.t1.micro",  "db.m1.small",  "db.m1.medium",  "db.m1.large",  "db.m1.xlarge",  "db.m2.xlarge",  "db.m2.2xlarge",  "db.m2.4xlarge",  "db.m3.medium",  "db.m3.large",  "db.m3.xlarge",  "db.m3.2xlarge",  "db.r3.large",  "db.r3.xlarge",  "db.r3.2xlarge",  "db.r3.4xlarge",  "db.r3.8xlarge",  "db.m2.xlarge",  "db.m2.2xlarge",  "db.m2.4xlarge",  "db.cr1.8xlarge"]  ,              "ConstraintDescription"  :  "must  select  a  valid  database  instance  type."          },  

       "DBName"  :  {              "Default":  "wordpressdb",              "Description"  :  "The  WordPress  database  name",              "Type":  "String",              "MinLength":  "1",              "MaxLength":  "64",              "AllowedPattern"  :  "[a-­‐zA-­‐Z][a-­‐zA-­‐Z0-­‐9]*",              "ConstraintDescription"  :  "must  begin  with  a  letter  and  contain  only  alphanumeric  characters."          },  

       "DBUser"  :  {              "NoEcho":  "true",              "Description"  :  "The  WordPress  database  admin  account  username",              "Type":  "String",              "MinLength":  "1",              "MaxLength":  "16",              "AllowedPattern"  :  "[a-­‐zA-­‐Z][a-­‐zA-­‐Z0-­‐9]*",              "ConstraintDescription"  :  "must  begin  with  a  letter  and  contain  only  alphanumeric  characters."          },  

       "DBPassword"  :  {              "NoEcho":  "true",              "Description"  :  "The  WordPress  database  admin  account  password",              "Type":  "String",              "MinLength":  "8",              "MaxLength":  "41",              "AllowedPattern"  :  "[a-­‐zA-­‐Z0-­‐9]*",              "ConstraintDescription"  :  "must  contain  only  alphanumeric  characters."          },  

       "MultiAZDatabase":  {              "Default":  "false",              "Description"  :  "Create  a  Multi-­‐AZ  MySQL  Amazon  RDS  database  instance",              "Type":  "String",              "AllowedValues"  :  [  "true",  "false"  ],              "ConstraintDescription"  :  "must  be  either  true  or  false."          },  

       "WebServerCapacity":  {              "Default":  "1",              "Description"  :  "The  initial  number  of  WebServer  instances",              "Type":  "Number",              "MinValue":  "1",              "MaxValue":  "5",              "ConstraintDescription"  :  "must  be  between  1  and  5  EC2  instances."          },  

       "DBAllocatedStorage"  :  {              "Default":  "5",              "Description"  :  "The  size  of  the  database  (Gb)",              "Type":  "Number",              "MinValue":  "5",              "MaxValue":  "1024",              "ConstraintDescription"  :  "must  be  between  5  and  1024Gb."          }      },  

   "Mappings"  :  {          "AWSInstanceType2Arch"  :  {              "t1.micro"        :  {  "Arch"  :  "PV64"      },              "t2.micro"        :  {  "Arch"  :  "HVM64"    },              "t2.small"        :  {  "Arch"  :  "HVM64"    },              "t2.medium"      :  {  "Arch"  :  "HVM64"    },              "m1.small"        :  {  "Arch"  :  "PV64"      },              "m1.medium"      :  {  "Arch"  :  "PV64"      },              "m1.large"        :  {  "Arch"  :  "PV64"      },              "m1.xlarge"      :  {  "Arch"  :  "PV64"      },              "m2.xlarge"      :  {  "Arch"  :  "PV64"      },              "m2.2xlarge"    :  {  "Arch"  :  "PV64"      },              "m2.4xlarge"    :  {  "Arch"  :  "PV64"      },              "m3.medium"      :  {  "Arch"  :  "HVM64"    },              "m3.large"        :  {  "Arch"  :  "HVM64"    },              "m3.xlarge"      :  {  "Arch"  :  "HVM64"    },              "m3.2xlarge"    :  {  "Arch"  :  "HVM64"    },              "c1.medium"      :  {  "Arch"  :  "PV64"      },              "c1.xlarge"      :  {  "Arch"  :  "PV64"      },              "c3.large"        :  {  "Arch"  :  "HVM64"    },              "c3.xlarge"      :  {  "Arch"  :  "HVM64"    },              "c3.2xlarge"    :  {  "Arch"  :  "HVM64"    },              "c3.4xlarge"    :  {  "Arch"  :  "HVM64"    },              "c3.8xlarge"    :  {  "Arch"  :  "HVM64"    },              "c4.large"        :  {  "Arch"  :  "HVM64"    },              "c4.xlarge"      :  {  "Arch"  :  "HVM64"    },              "c4.2xlarge"    :  {  "Arch"  :  "HVM64"    },              "c4.4xlarge"    :  {  "Arch"  :  "HVM64"    },              "c4.8xlarge"    :  {  "Arch"  :  "HVM64"    },              "g2.2xlarge"    :  {  "Arch"  :  "HVMG2"    },              "r3.large"        :  {  "Arch"  :  "HVM64"    },  

           "r3.xlarge"      :  {  "Arch"  :  "HVM64"    },              "r3.2xlarge"    :  {  "Arch"  :  "HVM64"    },              "r3.4xlarge"    :  {  "Arch"  :  "HVM64"    },              "r3.8xlarge"    :  {  "Arch"  :  "HVM64"    },              "i2.xlarge"      :  {  "Arch"  :  "HVM64"    },              "i2.2xlarge"    :  {  "Arch"  :  "HVM64"    },              "i2.4xlarge"    :  {  "Arch"  :  "HVM64"    },              "i2.8xlarge"    :  {  "Arch"  :  "HVM64"    },              "hi1.4xlarge"  :  {  "Arch"  :  "HVM64"    },              "hs1.8xlarge"  :  {  "Arch"  :  "HVM64"    },              "cr1.8xlarge"  :  {  "Arch"  :  "HVM64"    },              "cc2.8xlarge"  :  {  "Arch"  :  "HVM64"    }          }  ,          "AWSRegionArch2AMI"  :  {              "us-­‐east-­‐1"                :  {"PV64"  :  "ami-­‐8e682ce6",  "HVM64"  :  "ami-­‐146e2a7c",  "HVMG2"  :  "ami-­‐7200461a"},              "us-­‐west-­‐2"                :  {"PV64"  :  "ami-­‐9fc29baf",  "HVM64"  :  "ami-­‐dfc39aef",  "HVMG2"  :  "ami-­‐0b78203b"},              "us-­‐west-­‐1"                :  {"PV64"  :  "ami-­‐f49089b1",  "HVM64"  :  "ami-­‐42908907",  "HVMG2"  :  "ami-­‐244b5361"},              "eu-­‐west-­‐1"                :  {"PV64"  :  "ami-­‐7b3db00c",  "HVM64"  :  "ami-­‐9d23aeea",  "HVMG2"  :  "ami-­‐4d7cf03a"},              "eu-­‐central-­‐1"          :  {"PV64"  :  "ami-­‐0600331b",  "HVM64"  :  "ami-­‐04003319",  "HVMG2"  :  "NOT_SUPPORTED"},              "ap-­‐northeast-­‐1"      :  {"PV64"  :  "ami-­‐3c87993d",  "HVM64"  :  "ami-­‐18869819",  "HVMG2"  :  "ami-­‐2e90892f"},              "ap-­‐southeast-­‐1"      :  {"PV64"  :  "ami-­‐58ba910a",  "HVM64"  :  "ami-­‐96bb90c4",  "HVMG2"  :  "ami-­‐3e78526c"},              "ap-­‐southeast-­‐2"      :  {"PV64"  :  "ami-­‐1500742f",  "HVM64"  :  "ami-­‐d50773ef",  "HVMG2"  :  "ami-­‐315e2a0b"},              "sa-­‐east-­‐1"                :  {"PV64"  :  "ami-­‐fd9925e0",  "HVM64"  :  "ami-­‐af9925b2",  "HVMG2"  :  "NOT_SUPPORTED"},              "cn-­‐north-­‐1"              :  {"PV64"  :  "ami-­‐8a1d8fb3",  "HVM64"  :  "ami-­‐981d8fa1",  "HVMG2"  :  "NOT_SUPPORTED"}          }  

   },  

   "Conditions"  :  {          "Is-­‐EC2-­‐VPC"          :  {  "Fn::Or"  :  [  {"Fn::Equals"  :  [{"Ref"  :  "AWS::Region"},  "eu-­‐central-­‐1"  ]},                                                                              {"Fn::Equals"  :  [{"Ref"  :  "AWS::Region"},  "cn-­‐north-­‐1"  ]}]},          "Is-­‐EC2-­‐Classic"  :  {  "Fn::Not"  :  [{  "Condition"  :  "Is-­‐EC2-­‐VPC"}]}      },  

   "Resources"  :  {  

       "ElasticLoadBalancer"  :  {              "Type"  :  "AWS::ElasticLoadBalancing::LoadBalancer",              "Properties"  :  {                  "AvailabilityZones"  :  {  "Fn::GetAZs"  :  ""  },                  "CrossZone"  :  "true",                  "LBCookieStickinessPolicy"  :  [  {                      "PolicyName"  :  "CookieBasedPolicy",                      "CookieExpirationPeriod"  :  "30"                  }  ],                  "Listeners"  :  [  {                      "LoadBalancerPort"  :  "80",                      "InstancePort"  :  "80",                      "Protocol"  :  "HTTP",                      "PolicyNames"  :  [  "CookieBasedPolicy"  ]                  }  ],                  "HealthCheck"  :  {                      "Target"  :  "HTTP:80/wordpress/wp-­‐admin/install.php",                      "HealthyThreshold"  :  "2",                      "UnhealthyThreshold"  :  "5",                      "Interval"  :  "10",                      "Timeout"  :  "5"                  }              }          },  

       "WebServerSecurityGroup"  :  {              "Type"  :  "AWS::EC2::SecurityGroup",              "Properties"  :  {                  "GroupDescription"  :  "Enable  HTTP  access  via  port  80  locked  down  to  the  load  balancer  +  SSH  access",                  "SecurityGroupIngress"  :  [                      {"IpProtocol"  :  "tcp",  "FromPort"  :  "80",  "ToPort"  :  "80",  "SourceSecurityGroupOwnerId"  :  {"Fn::GetAtt"  :  ["ElasticLoadBalancer",  "SourceSecurityGroup.OwnerAlias"]},"SourceSecurityGroupName"  :  {"Fn::GetAtt"  :  ["ElasticLoadBalancer",  "SourceSecurityGroup.GroupName"]}},                      {"IpProtocol"  :  "tcp",  "FromPort"  :  "22",  "ToPort"  :  "22",  "CidrIp"  :  {  "Ref"  :  "SSHLocation"}}                  ]              }          },  

       "WebServerGroup"  :  {              "Type"  :  "AWS::AutoScaling::AutoScalingGroup",              "Properties"  :  {                  "AvailabilityZones"  :  {  "Fn::GetAZs"  :  ""  },                  "LaunchConfigurationName"  :  {  "Ref"  :  "LaunchConfig"  },                  "MinSize"  :  "1",                  "MaxSize"  :  "5",                  "DesiredCapacity"  :  {  "Ref"  :  "WebServerCapacity"  },                  "LoadBalancerNames"  :  [  {  "Ref"  :  "ElasticLoadBalancer"  }  ]              },              "CreationPolicy"  :  {                  "ResourceSignal"  :  {                      "Timeout"  :  "PT15M"                  }              },              "UpdatePolicy":  {                  "AutoScalingRollingUpdate":  {                      "MinInstancesInService":  "1",                      "MaxBatchSize":  "1",                      "PauseTime"  :  "PT15M",                      "WaitOnResourceSignals":  "true"                  }              }          },  

       "LaunchConfig":  {              "Type"  :  "AWS::AutoScaling::LaunchConfiguration",              "Metadata"  :  {                  "AWS::CloudFormation::Init"  :  {                      "configSets"  :  {                          "wordpress_install"  :  ["install_cfn",  "install_wordpress"  ]                      },                      "install_cfn"  :  {                          "files":  {                              "/etc/cfn/cfn-­‐hup.conf":  {                                  "content":  {  "Fn::Join":  [  "",  [                                      "[main]\n",                                      "stack=",  {  "Ref":  "AWS::StackId"  },  "\n",                                      "region=",  {  "Ref":  "AWS::Region"  },  "\n"                                  ]]},                                  "mode"    :  "000400",                                  "owner"  :  "root",                                  "group"  :  "root"                              },                              "/etc/cfn/hooks.d/cfn-­‐auto-­‐reloader.conf":  {                                  "content":  {  "Fn::Join":  [  "",  [                                      "[cfn-­‐auto-­‐reloader-­‐hook]\n",                                      "triggers=post.update\n",                                      "path=Resources.LaunchConfig.Metadata.AWS::CloudFormation::Init\n",                                      "action=/opt/aws/bin/cfn-­‐init  -­‐v  ",                                                      "                  -­‐-­‐stack  ",  {  "Ref"  :  "AWS::StackName"  },                                                      "                  -­‐-­‐resource  LaunchConfig  ",                                                      "                  -­‐-­‐configsets  wordpress_install  ",                                                      "                  -­‐-­‐region  ",  {  "Ref"  :  "AWS::Region"  },  "\n"                                  ]]},                                                      "mode"    :  "000400",                                  "owner"  :  "root",                                  "group"  :  "root"                              }                          },                          "services"  :  {                              "sysvinit"  :  {                                  "cfn-­‐hup"  :  {  "enabled"  :  "true",  "ensureRunning"  :  "true",  

                                                           "files"  :  ["/etc/cfn/cfn-­‐hup.conf",  "/etc/cfn/hooks.d/cfn-­‐auto-­‐reloader.conf"]}                              }                          }                      },  

                   "install_wordpress"  :  {                          "packages"  :  {                              "yum"  :  {                                  "php"              :  [],                                  "php-­‐mysql"  :  [],                                  "mysql"          :  [],                                  "httpd"          :  []                              }                          },                          "sources"  :  {                              "/var/www/html"  :  "http://wordpress.org/latest.tar.gz"                          },                          "files"  :  {                              "/tmp/create-­‐wp-­‐config"  :  {                                  "content"  :  {  "Fn::Join"  :  [  "",  [                                      "#!/bin/bash\n",                                      "cp  /var/www/html/wordpress/wp-­‐config-­‐sample.php  /var/www/html/wordpress/wp-­‐config.php\n",                                      "sed  -­‐i  \"s/'database_name_here'/'",{  "Ref"  :  "DBName"  },  "'/g\"  wp-­‐config.php\n",                                      "sed  -­‐i  \"s/'username_here'/'",{  "Ref"  :  "DBUser"  },  "'/g\"  wp-­‐config.php\n",                                      "sed  -­‐i  \"s/'password_here'/'",{  "Ref"  :  "DBPassword"  },  "'/g\"  wp-­‐config.php\n",                                      "sed  -­‐i  \"s/'localhost'/'",{  "Fn::GetAtt"  :  [  "DBInstance",  "Endpoint.Address"  ]  },  "'/g\"  wp-­‐config.php\n"                                  ]]},                                  "mode"  :  "000500",                                  "owner"  :  "root",                                  "group"  :  "root"                              }                          },                          "commands"  :  {                              "01_configure_wordpress"  :  {                                  "command"  :  "/tmp/create-­‐wp-­‐config",                                  "cwd"  :  "/var/www/html/wordpress"                              }                          },                          "services"  :  {                              "sysvinit"  :  {                                  "httpd"  :  {  "enabled"  :  "true",  "ensureRunning"  :  "true"  }                              }                          }                      }                  }              },              "Properties":  {                  "ImageId"  :  {  "Fn::FindInMap"  :  [  "AWSRegionArch2AMI",  {  "Ref"  :  "AWS::Region"  },                                                      {  "Fn::FindInMap"  :  [  "AWSInstanceType2Arch",  {  "Ref"  :  "InstanceType"  },  "Arch"  ]  }  ]  },                  "InstanceType"      :  {  "Ref"  :  "InstanceType"  },                  "SecurityGroups"  :  [  {"Ref"  :  "WebServerSecurityGroup"}  ],                  "KeyName"                :  {  "Ref"  :  "KeyName"  },                  "UserData"  :  {  "Fn::Base64"  :  {  "Fn::Join"  :  ["",  [                                                "#!/bin/bash  -­‐xe\n",                                                "yum  update  -­‐y  aws-­‐cfn-­‐bootstrap\n",  

                                             "/opt/aws/bin/cfn-­‐init  -­‐v  ",                                                "                  -­‐-­‐stack  ",  {  "Ref"  :  "AWS::StackName"  },                                                "                  -­‐-­‐resource  LaunchConfig  ",                                                "                  -­‐-­‐configsets  wordpress_install  ",                                                "                  -­‐-­‐region  ",  {  "Ref"  :  "AWS::Region"  },  "\n",  

                                             "/opt/aws/bin/cfn-­‐signal  -­‐e  $?  ",                                                "                  -­‐-­‐stack  ",  {  "Ref"  :  "AWS::StackName"  },                                                "                  -­‐-­‐resource  WebServerGroup  ",                                                "                  -­‐-­‐region  ",  {  "Ref"  :  "AWS::Region"  },  "\n"                  ]]}}              }          },  

       "DBSecurityGroup":  {              "Type":  "AWS::RDS::DBSecurityGroup",              "Condition"  :  "Is-­‐EC2-­‐Classic",              "Properties":  {                  "DBSecurityGroupIngress":  {                      "EC2SecurityGroupName":  {  "Ref":  "WebServerSecurityGroup"  }                  },                  "GroupDescription":  "database  access"              }          },  

       "DBEC2SecurityGroup":  {              "Type":  "AWS::EC2::SecurityGroup",              "Condition"  :  "Is-­‐EC2-­‐VPC",              "Properties"  :  {                  "GroupDescription":  "Open  database  for  access",                  "SecurityGroupIngress"  :  [{                      "IpProtocol"  :  "tcp",                      "FromPort"  :  "3306",                      "ToPort"  :  "3306",                      "SourceSecurityGroupName"  :  {  "Ref"  :  "WebServerSecurityGroup"  }                  }]              }          },  

       "DBInstance"  :  {              "Type":  "AWS::RDS::DBInstance",              "Properties":  {                  "DBName"                        :  {  "Ref"  :  "DBName"  },                  "Engine"                        :  "MySQL",                  "MultiAZ"                      :  {  "Ref":  "MultiAZDatabase"  },                  "MasterUsername"        :  {  "Ref"  :  "DBUser"  },                  "MasterUserPassword":  {  "Ref"  :  "DBPassword"  },                  "DBInstanceClass"      :  {  "Ref"  :  "DBClass"  },                  "AllocatedStorage"    :  {  "Ref"  :  "DBAllocatedStorage"  },                  "VPCSecurityGroups":  {  "Fn::If"  :  [  "Is-­‐EC2-­‐VPC",  [  {  "Fn::GetAtt":  [  "DBEC2SecurityGroup",  "GroupId"  ]  }  ],  {  "Ref"  :  "AWS::NoValue"}]},                  "DBSecurityGroups":  {  "Fn::If"  :  [  "Is-­‐EC2-­‐Classic",  [  {  "Ref":  "DBSecurityGroup"  }  ],  {  "Ref"  :  "AWS::NoValue"}]}              }          }      },  

   "Outputs"  :  {          "WebsiteURL"  :  {              "Value"  :  {  "Fn::Join"  :  ["",  ["http://",  {  "Fn::GetAtt"  :  [  "ElasticLoadBalancer",  "DNSName"  ]},  "/wordpress"  ]]},              "Description"  :  "WordPress  Website"          }      }  }

CloudFormation Template to Deploy Wordpress

https://s3-us-west-1.amazonaws.com/cloudformation-templates-us-west-1/WordPress_Multi_AZ.template

Page 39: Dev & Test on AWS - Journey Through the Cloud

Amazon ECS AWS CodeDeploy

Tools to Create & Manage an Elastic Datacenter

Code

Build

Test

aws.amazon.com/ecs/ aws.amazon.com/codedeploy/

Page 40: Dev & Test on AWS - Journey Through the Cloud

DEVELOPING & TESTING BUSINESS APPLICATIONS ON AWS

Page 41: Dev & Test on AWS - Journey Through the Cloud

Install software in the AWS Cloud or use preconfigured images from the AWS Marketplace

Microsoft SQL Server, Microsoft SharePoint, Microsoft Exchange, SAP HANA, SAP HANA One, Oracle 11g, PeopleSoft, IBM DB2, the IBM WebSphere family of products are available

License portability allows you to move some existing licenses to the AWS Cloud, refer to the appropriate pages on the AWS website for details

aws.amazon.com/microsoft

aws.amazon.com/oracle

aws.amazon.com/sap

aws.amazon.com/ibm

Page 42: Dev & Test on AWS - Journey Through the Cloud

COMMON DEV & TEST PATTERNS

Page 43: Dev & Test on AWS - Journey Through the Cloud

Frameworks & Environments

Source Control

Amazon EC2 to run popular source control systems, integrate with GitHub or

use AWS CodeCommit (coming soon)

Project Management

Add integrated project management and issue tracking applications from the

AWS Marketplace

Workstations

Provide standard build developer/test workstations with Amazon WorkSpaces

CI/Build Servers

Use EC2 instances as continuous integration and build servers

Page 44: Dev & Test on AWS - Journey Through the Cloud

Pattern

SOURCE CODE REPOSITORY

DNS

CONTINUOUS INTEGRATION SERVER

PROJECT MANAGEMENT SERVER

BUILDS

Page 45: Dev & Test on AWS - Journey Through the Cloud

AWS Mark

etplac

e

Page 46: Dev & Test on AWS - Journey Through the Cloud

CLOUDFORMATION TEMPLATE

Page 47: Dev & Test on AWS - Journey Through the Cloud

Testing at Scale

Unit & Regression

Scale up and parallel run unit and regression plans in a fraction of the time

Load & Performance

Use EC2 instances from the spot market to generating load and test how applications perform with auto-scaling

A/B

Run A/B scenario testing with multiple replicated stacks

Security

Create sandboxes for aggressive security testing

Page 48: Dev & Test on AWS - Journey Through the Cloud

Parallel Testing

1 instance for 100 hours ==

100 instances for 1 hour

Page 49: Dev & Test on AWS - Journey Through the Cloud

A/B Testin

g

Page 50: Dev & Test on AWS - Journey Through the Cloud

A/B Testin

g

Page 51: Dev & Test on AWS - Journey Through the Cloud

Load

Testin

g

Page 52: Dev & Test on AWS - Journey Through the Cloud

Load

Testin

g

Page 53: Dev & Test on AWS - Journey Through the Cloud

Load

Testin

g

Page 54: Dev & Test on AWS - Journey Through the Cloud

Load

Testin

g

Page 55: Dev & Test on AWS - Journey Through the Cloud
Page 56: Dev & Test on AWS - Journey Through the Cloud

2.4 MILLION PLAYERSUSING AMAZON EC2 TO SIMULATE

Page 57: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

On-demand Charging ModelUnlimited Elastic Capacity

Infrastructure as Code Durable Storage

Take lots of it when you need it Throw it away when you don’t

Preserve it for future reference & reuseDeploy to a known state, quickly

Page 58: Dev & Test on AWS - Journey Through the Cloud

00:00 01:00 02:00 03:00 04:00 05:00 06:00 07:00 08:00 09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00

Development Environment: CPU Utilisation/Time

Page 59: Dev & Test on AWS - Journey Through the Cloud

00:00 01:00 02:00 03:00 04:00 05:00 06:00 07:00 08:00 09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00

Development Environment: CPU Utilisation/Time

Auto-scaling by schedule

Auto-scaling by schedule

Page 60: Dev & Test on AWS - Journey Through the Cloud

00:00 01:00 02:00 03:00 04:00 05:00 06:00 07:00 08:00 09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00

Development Environment: CPU Utilisation/Time

46% Savings

Page 61: Dev & Test on AWS - Journey Through the Cloud

DEVELOPMENT & TEST IN THE CLOUD

On-demand Charging ModelUnlimited Elastic Capacity

Infrastructure as Code Durable Storage

Take lots of it when you need it Throw it away when you don’t

Preserve it for future reference & reuseDeploy to a known state, quickly

Page 62: Dev & Test on AWS - Journey Through the Cloud

Durable Storage

AMIsCreate a catalog of AMIs for each

iteration of an application

Stored in Amazon S3

TemplatesSource control infrastructure templates

with every application version

SnapshotsSave disk images with ‘frozen’ data sets and attach to instances when needed

Stored in Amazon S3

Page 63: Dev & Test on AWS - Journey Through the Cloud

Durable Storage

AMIsCreate a catalog of AMIs for each

iteration of an application

Stored in Amazon S3

TemplatesSource control infrastructure templates

with every application version

SnapshotsSave disk images with ‘frozen’ data sets and attach to instances when needed

Stored in Amazon S3

Enables you to roll back and recreate an environment for any given application version

Page 64: Dev & Test on AWS - Journey Through the Cloud

SUMMARY

Page 65: Dev & Test on AWS - Journey Through the Cloud

The cloud makes software development & testing easy 1

You can make significant savings by making use of elasticity2

AWS provides unique tools to help you create & manage environments3

Enables you to operate at a scale & speed beyond traditional infrastructure4

Page 66: Dev & Test on AWS - Journey Through the Cloud

RESOURCES YOU CAN USETO LEARN MORE

Page 67: Dev & Test on AWS - Journey Through the Cloud

aws.amazon.com/dev-test/

Page 68: Dev & Test on AWS - Journey Through the Cloud

Certification

aws.amazon.com/certification

Self-Paced Labs

aws.amazon.com/training/self-paced-labs

Try products, gain new skills, and get hands-on practice working

with AWS technologies

aws.amazon.com/training

Training

Validate your proven skills and expertise with the AWS platform

Build technical expertise to design and operate scalable, efficient applications on AWS

AWS Training & Certification

Page 69: Dev & Test on AWS - Journey Through the Cloud

LONDON

15 APRIL 2015

aws.amazon.com/summits/london/

Page 70: Dev & Test on AWS - Journey Through the Cloud

Follow us fo

r more

events

& webina

rs

@AWScloud for Global AWS News & Announcements

@AWS_UKI for local AWS events & news

@IanMmmmIan Massingham — Technical Evangelist