Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Orchestrating the     Cloud                              Matt Wood        T E C H N O L O G Y   E VA N G E L I S T
Welcome
AGENDA     Orchestrating the Cloud1. Ap   plication architecture2. Role of orchestration3 . Pillars of orchestration4. Orc...
1ApplicationArchitecture
Applicationsin the cloud
3 tiers
Application tierCode   Configuration
Application tierCode   Configuration
Application tier       Code           Configuration                                         Service tier                   ...
Application tier       Code           Configuration                                         Service tier                   ...
Application tier        Code                    Configuration                                                        Servic...
Value baked into    each tier
Value inapplication
Value inservice tier
Optimisation        Configuration     Value in    service tier           Technology             choices
Value ininfrastructure
Engine room   Optimised     Value in  infrastructure Scalable     Fault tolerant
Maximising  Orchestrationmaximises this value     value
EphemeralMaximising     to  value  concrete
One team Maximising        to     valuewhole organisation
One hitMaximising      to   value reproducible
MaximisingBrittle to strong     value
MaximisingMaximise value  value
Maximising Minimise risk   value
2  Role ofOrchestration
Cloud life cycle
Initialisation
Steady state  run time
Updates
Application updatesUpdates Service updates
Scale events
Changemanagement
Ver y me t a !      Managing       change     management
3  Pillars ofOrchestration
Z   E   R   O   T   H   P   I   L   L   A   RVersion control
F   I   R   S   T   P   I   L   L   A   RProvisioningorchestration
CloudFormation aws.amazon.com/cloudformation
Template
Define a fullinfrastructure     stack
Auto-scaling                                      RDS  EC2        SNS                           SimpleDB                  ...
Template   CloudFormation                            Provisioned                             resources
Completedefinition
Atomic
Idempotent
Free
Anatomy of a  template
JSON
Perfect forPlain text                        version control             JSON             Validate-able
Declarative language
{    "AWSTemplateFormatVersion" : "2010-09-09",    "Description" : "Create an EC2 instances",    "Parameters" : {       "K...
{    "AWSTemplateFormatVersion" : "2010-09-09",    "Description" : "Create an EC2 instances",                             ...
ParametersProvision-time specification  Command line options
"Parameters" : {   "KeyName" : {     "Description" : "Name of an existing      EC2 KeyPair to enable SSH access to      th...
Mappings  Conditionals Case statements
"Mappings" : {   "RegionMap" : {     "us-east-1" : {         "AMI" : "ami-76f0061f"     },     "us-west-1" : {         "AM...
"Mappings": {  "AWSInstanceType2Arch" : {     "t1.micro"    : { "Arch"   :   "64"   },     "m1.large"    : { "Arch"   :   ...
Resources
"Resources" : {    "Ec2Instance" : {      "Type" : "AWS::EC2::Instance",      "Properties" : {        "KeyName" : { "Ref" ...
"Resources" : {    "Ec2Instance" : {      "Type" : "AWS::EC2::Instance",      "Properties" : {        "KeyName" : { "Ref" ...
"Resources" : {    "Ec2Instance" : {      "Type" : "AWS::EC2::Instance",      "Properties" : {        "KeyName" : { "Ref" ...
"KeyName" : { "Ref" : "KeyName" },                  Par  ame  ter                   re fere nce
"ImageId" : {     "Fn::FindInMap" :     [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},
M ap c ondit ional"ImageId" : {     "Fn::FindInMap" :     [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},
"ImageId" : {     "Fn::FindInMap" :     [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},       Nam e of         map
"ImageId" : {     "Fn::FindInMap" :     [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},                     Intrinsic ...
OutputsReturned values
"Outputs" : {      "InstanceId" : {         "Description" : "InstanceId of the newly created EC2 instance",         "Value...
Deliver via API
Validate via API
Deliver via S3
Growing library
S   E   C   O   N   D   P   I   L   L   A   RConfigurationmanagement
Custom AMI
m1.large100Gb
Template m1.large  AMI         AMISNAPSHOT  100Gb     SNAPSHOT
m1.large  AMI       m1.largeSNAPSHOT  100Gb     100Gb
m1.large   m1.large   m1.large   m1.large100Gb      100Gb      100Gb      100Gbm1.large   m1.large   m1.large   m1.large10...
Bootstrap
Generic AMI
Custom build
Services       DependenciesDefine manifests     Configuration                      Applications
AMI              SNAPSHOTTemplate   CloudFormation
AMI          m1.large                              AMI              SNAPSHOT      SNAPSHOT                              10...
Services                AMI          m1.large                              AMI       Dependencies                         ...
1. Setup users and groups2. Install Apache3. Configure Apache4. Setup directories5. Start ancillary services6. Deploy code
Management  server
Pull
AMISNAPSHOT   m1.large    m1.large    m1.large           100Gb        100Gb      100Gb                      Management    ...
Push
m1.large    m1.large    m1.large100Gb        100Gb      100Gb           Management             server
Fewer AMIs to   manage
Versionedconfiguration
Codified updates
Known state
Rolling updates
Simulations
Built for elastic architectures
Loose coupling
Address via meta-data
And much more!
:(Extra overhead
Chef+ Knife
Puppet+ MCollective
T   H   I   R   D   P   I   L   L   A   RPerformance automation
Auto-scaling
ELBCloudWatch Auto-scaling
Scaling group
DatabaseConnections                DatabaseConnectionsScaling group             Triggers                  (Alarms + Polici...
Launchconfigurations                       DatabaseConnections                       DatabaseConnections       Scaling grou...
Additionalperformance
Launchconfigurations                       DatabaseConnections                       DatabaseConnections       Scaling grou...
Launchconfigurations                       DatabaseConnections                       DatabaseConnections       Scaling grou...
Launchconfigurations                       DatabaseConnections                       DatabaseConnections       Scaling grou...
Launchconfigurations                       DatabaseConnections                       DatabaseConnections       Scaling grou...
Auto-healing
4Orchestrationby Example
Web application Web application
Initialisation with CloudFormation
Design stack
Load balancerFault tolerantweb serversRDS
Create template
{    "AWSTemplateFormatVersion" : "2010-09-09",    "Parameters" : {                                                       ...
"Parameters" : {   "InstanceType" : {      "Description" : "Type of EC2 instance to launch",      "Type" : "String",      ...
"Mappings" : {   "AWSInstanceType2Arch" : {      "t1.micro"    : { "Arch" : "64" },      "m1.small"    : { "Arch" : "32" }...
"Resources" : {  "WebServerGroup" : {    "Type" : "AWS::AutoScaling::AutoScalingGroup",    "Properties" : {      "Availabi...
"SampleDatabase": {       "Properties": {          "Engine": "MySQL5.1",          "DBName": {             "Ref": "RailData...
"LaunchConfig" : {      "Type" : "AWS::AutoScaling::LaunchConfiguration",      "Properties" : {        "KeyName" : { "Ref"...
"UserData": {                "Fn::Base64": {                  "Fn::Join": [                    ":",                    [  ...
"ElasticLoadBalancer" : {       "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",       "Properties" : {         "Availa...
"DBSecurityGroup": {     "Properties": {        "DBSecurityGroupIngress": {           "EC2SecurityGroupName": {           ...
"Outputs" : {    "URL" : {      "Description" : "URL of the website",      "Value" : { "Fn::Join" : [ "", [ "http://",{ "F...
Create stack
DatabasePortDatabaseUserDatabaseName
Example application
Example application
Example applicationApplicationStackELB URL            URL of website                         165783690.eu-.west-1.elb.
Steady statemonitoring with CloudWatch
Updatewith CloudFormation
Updatewith Puppet
Define manifest Resource lists, dependencies
define apache::site ( $ensure = present, $require_package= apache, $content = , $source = ) { include apache   $site_file ...
define apache::site ( $ensure = present, $require_package= apache, $content = , $source = ) { include apache   $site_file ...
define apache::site ( $ensure = present, $require_package= apache, $content = , $source = ) { include apache   $site_file ...
Apply manifest        puppet apply,Pull/push from the Puppet Master
Performance automation with EC2 autoscaling
as-create-launch-config     AppLaunchConfig     --image-id ami-132216677     --instance-type m1.large     --key amazon-web...
as-create-auto-scaling-group AppScalingGroup --launch-configuration AppLaunchConfig --availability-zones eu-west-1a, eu-we...
as-put-scaling-policy AppScaleUpPolicy --auto-scaling-group AppScalingGroup --scaling-adjustment 1 --type ChangeInCapacity...
mon-put-metric-alarm AppHighCPUAlarm --comparison-operator GreaterThanThreshold --evaluation-period 1 --metric-name CPUUti...
as-put-scaling-policy AppScaleDownPolicy --auto-scaling-group AppScalingGroup --scaling-adjustment -1 --type ChangeInCapac...
mon-put-metric-alarm AppLowCPUAlarm --comparison-operator LessThanThreshold --evaluation-period 1 --metric-name CPUUtiliza...
aws.amazon.com/cloudformation       puppetlabs.com      opscode.com/chef aws.amazon.com/whitepapers
AGENDA     Orchestrating the Cloud1. Ap   plication architecture2. Role of orchestration3 . Pillars of orchestration4. Orc...
3 tiers of cloudapplication design
Maximising the value    in each tier
Orchestrationcodifies knowledge
Three pillars of orchestration
Provisioningorchestration
Configurationmanagement
Performance automation
CloudFormation
Puppet, Chef
Autoscaling service
aws.amazon.com
Thank you!
Q U E S T I O N S     +     C O M M E N T Smatthew@amazon.com              @mza              O N   T W I T T E R
Orchestrating the Cloud
Orchestrating the Cloud
Orchestrating the Cloud
Upcoming SlideShare
Loading in …5
×

Orchestrating the Cloud

56,646 views

Published on

An overview of cloud orchestration techniques, tips and best practices, featuring CloudFormation, Puppet and Chef.

Published in: Technology
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL MOVIE, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... ,DOWNLOAD FULL. MOVIE 4K,FHD,HD,480P here { https://tinyurl.com/yybdfxwh }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Orchestrating the Cloud

  1. Orchestrating the Cloud Matt Wood T E C H N O L O G Y E VA N G E L I S T
  2. Welcome
  3. AGENDA Orchestrating the Cloud1. Ap plication architecture2. Role of orchestration3 . Pillars of orchestration4. Orche stration by example5. Summar y
  4. 1ApplicationArchitecture
  5. Applicationsin the cloud
  6. 3 tiers
  7. Application tierCode Configuration
  8. Application tierCode Configuration
  9. Application tier Code Configuration Service tier Integration Operating system settings Services +Launch configuration configuration
  10. Application tier Code Configuration Service tier Integration Operating system settings Services +Launch configuration configuration
  11. Application tier Code Configuration Service tier Integration Operating system settings Services +Launch configuration configuration Infrastructure tier AMIs Architecture Multi-AZScaling rules Security groups Middleware
  12. Value baked into each tier
  13. Value inapplication
  14. Value inservice tier
  15. Optimisation Configuration Value in service tier Technology choices
  16. Value ininfrastructure
  17. Engine room Optimised Value in infrastructure Scalable Fault tolerant
  18. Maximising Orchestrationmaximises this value value
  19. EphemeralMaximising to value concrete
  20. One team Maximising to valuewhole organisation
  21. One hitMaximising to value reproducible
  22. MaximisingBrittle to strong value
  23. MaximisingMaximise value value
  24. Maximising Minimise risk value
  25. 2 Role ofOrchestration
  26. Cloud life cycle
  27. Initialisation
  28. Steady state run time
  29. Updates
  30. Application updatesUpdates Service updates
  31. Scale events
  32. Changemanagement
  33. Ver y me t a ! Managing change management
  34. 3 Pillars ofOrchestration
  35. Z E R O T H P I L L A RVersion control
  36. F I R S T P I L L A RProvisioningorchestration
  37. CloudFormation aws.amazon.com/cloudformation
  38. Template
  39. Define a fullinfrastructure stack
  40. Auto-scaling RDS EC2 SNS SimpleDB SQS ResourcesElastic Beanstalk CloudWatch Security groups Tags
  41. Template CloudFormation Provisioned resources
  42. Completedefinition
  43. Atomic
  44. Idempotent
  45. Free
  46. Anatomy of a template
  47. JSON
  48. Perfect forPlain text version control JSON Validate-able
  49. Declarative language
  50. { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "Create an EC2 instances", "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" } }, "Mappings" : { "RegionMap" : { "us-east-1" : { "AMI" : "ami-76f0061f" }, "us-west-1" : { "AMI" : "ami-655a0a20" }, "eu-west-1" : { "AMI" : "ami-7fd4e10b" }, "ap-southeast-1" : { "AMI" : "ami-72621c20" }, "ap-northeast-1" : { "AMI" : "ami-8e08a38f" } } }, "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, "UserData" : { "Fn::Base64" : "80" } } } }, "Outputs" : { "InstanceId" : { "Description" : "InstanceId of the newly created EC2 instance", "Value" : { "Ref" : "Ec2Instance" } }, "AZ" : { "Description" : "Availability Zone of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "AvailabilityZone" ] } }, "PublicIP" : { "Description" : "Public IP address of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "PublicIp" ] } } }}
  51. { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "Create an EC2 instances", Headers Parameters "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" } }, "Mappings" : { "RegionMap" : { "us-east-1" : { "AMI" : "ami-76f0061f" }, "us-west-1" : { Mappings "AMI" : "ami-655a0a20" }, "eu-west-1" : { "AMI" : "ami-7fd4e10b" }, "ap-southeast-1" : { "AMI" : "ami-72621c20" }, "ap-northeast-1" : { "AMI" : "ami-8e08a38f" } } }, "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", Resources "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, "UserData" : { "Fn::Base64" : "80" } } } }, "Outputs" : { "InstanceId" : { "Description" : "InstanceId of the newly created EC2 instance", "Value" : { "Ref" : "Ec2Instance" } }, Outputs "AZ" : { "Description" : "Availability Zone of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "AvailabilityZone" ] } }, "PublicIP" : { "Description" : "Public IP address of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "PublicIp" ] } } }}
  52. ParametersProvision-time specification Command line options
  53. "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" }},
  54. Mappings Conditionals Case statements
  55. "Mappings" : { "RegionMap" : { "us-east-1" : { "AMI" : "ami-76f0061f" }, "us-west-1" : { "AMI" : "ami-655a0a20" }, "eu-west-1" : { "AMI" : "ami-7fd4e10b" }, "ap-southeast-1" : { "AMI" : "ami-72621c20" }, "ap-northeast-1" : { "AMI" : "ami-8e08a38f" } }},
  56. "Mappings": { "AWSInstanceType2Arch" : { "t1.micro" : { "Arch" : "64" }, "m1.large" : { "Arch" : "64" }, "m1.xlarge" : { "Arch" : "64" }, "m2.xlarge" : { "Arch" : "64" }, "m2.2xlarge" : { "Arch" : "64" }, "m2.4xlarge" : { "Arch" : "64" }, "c1.xlarge" : { "Arch" : "64" }, "cc1.4xlarge" : { "Arch" : "64" } },
  57. Resources
  58. "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" :[ "RegionMap", { "Ref" : "AWS::Region" },"AMI" ]}, "UserData" : { "Fn::Base64" : "80" } } } }
  59. "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" :[ "RegionMap", { "Ref" : "AWS::Region" },"AMI" ]}, "UserData" : { "Fn::Base64" : "80" } } } }
  60. "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" :[ "RegionMap", { "Ref" : "AWS::Region" },"AMI" ]}, "UserData" : { "Fn::Base64" : "80" } } } }
  61. "KeyName" : { "Ref" : "KeyName" }, Par ame ter re fere nce
  62. "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},
  63. M ap c ondit ional"ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},
  64. "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, Nam e of map
  65. "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, Intrinsic property reference
  66. OutputsReturned values
  67. "Outputs" : { "InstanceId" : { "Description" : "InstanceId of the newly created EC2 instance", "Value" : { "Ref" : "Ec2Instance" } }, "AZ" : { "Description" : "Availability Zone of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "AvailabilityZone" ] } }, "PublicIP" : { "Description" : "Public IP address of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "PublicIp" ] } } }}
  68. Deliver via API
  69. Validate via API
  70. Deliver via S3
  71. Growing library
  72. S E C O N D P I L L A RConfigurationmanagement
  73. Custom AMI
  74. m1.large100Gb
  75. Template m1.large AMI AMISNAPSHOT 100Gb SNAPSHOT
  76. m1.large AMI m1.largeSNAPSHOT 100Gb 100Gb
  77. m1.large m1.large m1.large m1.large100Gb 100Gb 100Gb 100Gbm1.large m1.large m1.large m1.large100Gb 100Gb 100Gb 100Gb
  78. Bootstrap
  79. Generic AMI
  80. Custom build
  81. Services DependenciesDefine manifests Configuration Applications
  82. AMI SNAPSHOTTemplate CloudFormation
  83. AMI m1.large AMI SNAPSHOT SNAPSHOT 100GbTemplate CloudFormation
  84. Services AMI m1.large AMI Dependencies Applications Configration SNAPSHOT SNAPSHOT 100GbTemplate CloudFormation
  85. 1. Setup users and groups2. Install Apache3. Configure Apache4. Setup directories5. Start ancillary services6. Deploy code
  86. Management server
  87. Pull
  88. AMISNAPSHOT m1.large m1.large m1.large 100Gb 100Gb 100Gb Management server
  89. Push
  90. m1.large m1.large m1.large100Gb 100Gb 100Gb Management server
  91. Fewer AMIs to manage
  92. Versionedconfiguration
  93. Codified updates
  94. Known state
  95. Rolling updates
  96. Simulations
  97. Built for elastic architectures
  98. Loose coupling
  99. Address via meta-data
  100. And much more!
  101. :(Extra overhead
  102. Chef+ Knife
  103. Puppet+ MCollective
  104. T H I R D P I L L A RPerformance automation
  105. Auto-scaling
  106. ELBCloudWatch Auto-scaling
  107. Scaling group
  108. DatabaseConnections DatabaseConnectionsScaling group Triggers (Alarms + Policies)
  109. Launchconfigurations DatabaseConnections DatabaseConnections Scaling group Triggers (Alarms + Policies)
  110. Additionalperformance
  111. Launchconfigurations DatabaseConnections DatabaseConnections Scaling group Triggers (Alarms + Policies)
  112. Launchconfigurations DatabaseConnections DatabaseConnections Scaling group Triggers (Alarms + Policies)
  113. Launchconfigurations DatabaseConnections DatabaseConnections Scaling group Triggers (Alarms + Policies)
  114. Launchconfigurations DatabaseConnections DatabaseConnections Scaling group Triggers (Alarms + Policies)
  115. Auto-healing
  116. 4Orchestrationby Example
  117. Web application Web application
  118. Initialisation with CloudFormation
  119. Design stack
  120. Load balancerFault tolerantweb serversRDS
  121. Create template
  122. { "AWSTemplateFormatVersion" : "2010-09-09", "Parameters" : { Parameters "InstanceType" : { "Description" : "Type of EC2 instance to launch", "Type" : "String", "Default" : "m1.small" }, "WebServerPort" : { "Description" : "TCP/IP port of the web server", "Type" : "String", "Default" : "8888" }, "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", "Type" : "String" } }, "Mappings" : { "AWSInstanceType2Arch" : { "t1.micro" : { "Arch" : "64" }, "m1.small" : { "Arch" : "32" }, "m1.large" : { "Arch" : "64" }, "m1.xlarge" : { "Arch" : "64" }, "m2.xlarge" : { "Arch" : "64" }, Mappings "m2.2xlarge" : { "Arch" : "64" }, "m2.4xlarge" : { "Arch" : "64" }, "c1.medium" : { "Arch" : "32" }, "c1.xlarge" : { "Arch" : "64" }, "cc1.4xlarge" : { "Arch" : "64" } }, "AWSRegionArch2AMI" : { "us-east-1" : { "32" : "ami-6411e20d", "64" : "ami-7a11e213" }, "us-west-1" : { "32" : "ami-c9c7978c", "64" : "ami-cfc7978a" }, "eu-west-1" : { "32" : "ami-37c2f643", "64" : "ami-31c2f645" }, "ap-southeast-1" : { "32" : "ami-66f28c34", "64" : "ami-60f28c32" }, "ap-northeast-1" : { "32" : "ami-9c03a89d", "64" : "ami-a003a8a1" } } }, "Resources" : { "WebServerGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "AvailabilityZones" : { "Fn::GetAZs" : "" }, "LaunchConfigurationName" : { "Ref" : "LaunchConfig" }, "MinSize" : "2", "MaxSize" : "2", "LoadBalancerNames" : [ { "Ref" : "ElasticLoadBalancer" } ] } }, "LaunchConfig" : { "Type" : "AWS::AutoScaling::LaunchConfiguration", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" : [ "AWSRegionArch2AMI", { "Ref" : "AWS::Region" }, { "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch" ] } ] }, "UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }}, "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], "InstanceType" : { "Ref" : "InstanceType" } } }, Resources "ElasticLoadBalancer" : { "Type" : "AWS::ElasticLoadBalancing::LoadBalancer", "Properties" : { "AvailabilityZones" : { "Fn::GetAZs" : "" }, "Listeners" : [ { "LoadBalancerPort" : "80", "InstancePort" : { "Ref" : "WebServerPort" }, "Protocol" : "HTTP" } ], "HealthCheck" : { "Target" : { "Fn::Join" : [ "", ["HTTP:", { "Ref" : "WebServerPort" }, "/"]]}, "HealthyThreshold" : "3", "UnhealthyThreshold" : "5", "Interval" : "30", "Timeout" : "5" } } }, "InstanceSecurityGroup" : { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { "GroupDescription" : "Enable SSH access and HTTP access on the inbound port", "SecurityGroupIngress" : [ { "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : "0.0.0.0/0" }, { "IpProtocol" : "tcp", "FromPort" : { "Ref" : "WebServerPort" }, "ToPort" : { "Ref" : "WebServerPort" }, "CidrIp" : "0.0.0.0/0" } ] } } Outputs }, "Outputs" : { "URL" : { "Description" : "URL of the website", "Value" : { "Fn::Join" : [ "", [ "http://", { "Fn::GetAtt" : [ "ElasticLoadBalancer", "DNSName" ]}]]} } }}
  123. "Parameters" : { "InstanceType" : { "Description" : "Type of EC2 instance to launch", "Type" : "String", "Default" : "m1.small" }, "WebServerPort" : { "Description" : "TCP/IP port of the web server", "Type" : "String", "Default" : "8888" }, "DatabaseName": { "Default": "SampleDatabase", "Description" : "Name of the sample database", "Type": "String" }, "DatabaseUser": { "Default": "admin", "NoEcho": "true", "Description" : "Sample database admin account username", "Type": "String" }, "DatabasePwd": { "Default": "admin", "NoEcho": "true", "Description" : "Sample database admin account password", "Type": "String" }, "DatabasePort": { "Default": "8443", "Description" : "TCP/IP port for the RDS database", "Type": "String" }, "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", "Type" : "String" }},
  124. "Mappings" : { "AWSInstanceType2Arch" : { "t1.micro" : { "Arch" : "64" }, "m1.small" : { "Arch" : "32" }, "m1.large" : { "Arch" : "64" }, "m1.xlarge" : { "Arch" : "64" }, "m2.xlarge" : { "Arch" : "64" }, "m2.2xlarge" : { "Arch" : "64" }, "m2.4xlarge" : { "Arch" : "64" }, "c1.medium" : { "Arch" : "32" }, "c1.xlarge" : { "Arch" : "64" }, "cc1.4xlarge" : { "Arch" : "64" } }, "AWSRegionArch2AMI" : { "us-east-1" : { "32" : "ami-6411e20d", "64" : "ami-7a11e213" }, "us-west-1" : { "32" : "ami-c9c7978c", "64" : "ami-cfc7978a" }, "eu-west-1" : { "32" : "ami-37c2f643", "64" : "ami-31c2f645" }, "ap-southeast-1" : { "32" : "ami-66f28c34", "64" : "ami-60f28c32" }, "ap-northeast-1" : { "32" : "ami-9c03a89d", "64" : "ami-a003a8a1" } }},
  125. "Resources" : { "WebServerGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "AvailabilityZones" : { "Fn::GetAZs" : "" }, "LaunchConfigurationName" : { "Ref" : "LaunchConfig" }, "MinSize" : "3", "MaxSize" : "3", "LoadBalancerNames" : [ { "Ref" : "ElasticLoadBalancer" } ] } },
  126. "SampleDatabase": { "Properties": { "Engine": "MySQL5.1", "DBName": { "Ref": "RailDatabaseName" }, "Port": "8443", "MultiAZ" : { "Fn::FindInMap" : [ "AWSRegionCapabilities",{ "Ref" : "AWS::Region" }, "RDSMultiAZ"] }, "MasterUsername": { "Ref": "DatabaseUser" }, "DBInstanceClass": "db.m1.small", "DBSecurityGroups": [ { "Ref": "DBSecurityGroup" } ], "AllocatedStorage": "5", "MasterUserPassword": { "Ref": "DatabasePwd" } }, "Type": "AWS::RDS::DBInstance" },
  127. "LaunchConfig" : { "Type" : "AWS::AutoScaling::LaunchConfiguration", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" :[ "AWSRegionArch2AMI", { "Ref" : "AWS::Region" },{ "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" :"InstanceType" }, "Arch" ] } ] }, "SecurityGroups" : [ { "Ref" :"InstanceSecurityGroup" } ], "InstanceType" : { "Ref" : "InstanceType" } } },
  128. "UserData": { "Fn::Base64": { "Fn::Join": [ ":", [ { "Ref": "DatabaseName" }, { "Ref": "DatabaseUser" }, { "Ref": "DatabasePwd" }, { "Ref": "DatabasePort" }, { "Fn::GetAtt": [ "SampleDatabase", "Endpoint.Address" ] }, { "Ref": "WebServerPort" } ] ] }
  129. "ElasticLoadBalancer" : { "Type" : "AWS::ElasticLoadBalancing::LoadBalancer", "Properties" : { "AvailabilityZones" : { "Fn::GetAZs" : "" }, "Listeners" : [ { "LoadBalancerPort" : "80", "InstancePort" : { "Ref" : "WebServerPort" }, "Protocol" : "HTTP" } ], "HealthCheck" : { "Target" : { "Fn::Join" : [ "", ["HTTP:", { "Ref" :"WebServerPort" }, "/"]]}, "HealthyThreshold" : "3", "UnhealthyThreshold" : "5", "Interval" : "30", "Timeout" : "5" } } },
  130. "DBSecurityGroup": { "Properties": { "DBSecurityGroupIngress": { "EC2SecurityGroupName": { "Ref": "EC2SecurityGroup" } }, "GroupDescription": "database access" }, "Type": "AWS::RDS::DBSecurityGroup" }, "InstanceSecurityGroup" : { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { "GroupDescription" : "Enable SSH access and HTTP access on the inbound port", "SecurityGroupIngress" : [ { "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : "0.0.0.0/0" }, { "IpProtocol" : "tcp", "FromPort" : { "Ref" : "WebServerPort" }, "ToPort" : { "Ref" : "WebServerPort" }, "CidrIp" : "0.0.0.0/0" } ] } }},
  131. "Outputs" : { "URL" : { "Description" : "URL of the website", "Value" : { "Fn::Join" : [ "", [ "http://",{ "Fn::GetAtt" : [ "ElasticLoadBalancer", "DNSName" ]}]]} } }
  132. Create stack
  133. DatabasePortDatabaseUserDatabaseName
  134. Example application
  135. Example application
  136. Example applicationApplicationStackELB URL URL of website 165783690.eu-.west-1.elb.
  137. Steady statemonitoring with CloudWatch
  138. Updatewith CloudFormation
  139. Updatewith Puppet
  140. Define manifest Resource lists, dependencies
  141. define apache::site ( $ensure = present, $require_package= apache, $content = , $source = ) { include apache $site_file = "${module_dir_path}/apache/sites/${name}" config_file { $site_file: ensure => $ensure, content => $content, source => $source, notify => Exec["reload-apache"] }}
  142. define apache::site ( $ensure = present, $require_package= apache, $content = , $source = ) { include apache $site_file = "${module_dir_path}/apache/sites/${name}" config_file { $site_file: ensure => $ensure, content => $content, source => $source, notify => Exec["reload-apache"] }}
  143. define apache::site ( $ensure = present, $require_package= apache, $content = , $source = ) { include apache $site_file = "${module_dir_path}/apache/sites/${name}" config_file { $site_file: ensure => $ensure, content => $content, source => $source, notify => Exec["reload-apache"] }}
  144. Apply manifest puppet apply,Pull/push from the Puppet Master
  145. Performance automation with EC2 autoscaling
  146. as-create-launch-config AppLaunchConfig --image-id ami-132216677 --instance-type m1.large --key amazon-web --group "Web and SSH"
  147. as-create-auto-scaling-group AppScalingGroup --launch-configuration AppLaunchConfig --availability-zones eu-west-1a, eu-west-1b --min-size 10 --max-size 100 --load-balancers app-load-balancer
  148. as-put-scaling-policy AppScaleUpPolicy --auto-scaling-group AppScalingGroup --scaling-adjustment 1 --type ChangeInCapacity --cool-down 300
  149. mon-put-metric-alarm AppHighCPUAlarm --comparison-operator GreaterThanThreshold --evaluation-period 1 --metric-name CPUUtilization --namespace “AWS:EC2” --period 600 --statistic Average --threshold 80 --alarm-actions <high-cpu-policy-arn> --dimensions “AutoscalingGroupName=AppScalingGroup”
  150. as-put-scaling-policy AppScaleDownPolicy --auto-scaling-group AppScalingGroup --scaling-adjustment -1 --type ChangeInCapacity --cool-down 300
  151. mon-put-metric-alarm AppLowCPUAlarm --comparison-operator LessThanThreshold --evaluation-period 1 --metric-name CPUUtilization --namespace “AWS:EC2” --period 600 --statistic Average --threshold 80 --alarm-actions <low-cpu-policy-arn> --dimensions “AutoscalingGroupName=AppScalingGroup”
  152. aws.amazon.com/cloudformation puppetlabs.com opscode.com/chef aws.amazon.com/whitepapers
  153. AGENDA Orchestrating the Cloud1. Ap plication architecture2. Role of orchestration3 . Pillars of orchestration4. Orche stration by example5. Summar y
  154. 3 tiers of cloudapplication design
  155. Maximising the value in each tier
  156. Orchestrationcodifies knowledge
  157. Three pillars of orchestration
  158. Provisioningorchestration
  159. Configurationmanagement
  160. Performance automation
  161. CloudFormation
  162. Puppet, Chef
  163. Autoscaling service
  164. aws.amazon.com
  165. Thank you!
  166. Q U E S T I O N S + C O M M E N T Smatthew@amazon.com @mza O N T W I T T E R

×