Orchestrating the Cloud
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Orchestrating the Cloud

on

  • 15,725 views

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

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

Statistics

Views

Total Views
15,725
Views on SlideShare
15,699
Embed Views
26

Actions

Likes
46
Downloads
824
Comments
4

11 Embeds 26

http://paper.li 10
http://wp.idgs.my 3
https://twitter.com 2
https://intranet.aconex.com 2
http://albinogoncalves.wordpress.com 2
http://pinterest.com 2
http://edicolaeuropea.blogspot.com 1
http://twitter.com 1
http://localhost 1
http://www.slideshare.net 1
http://www.pinterest.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Good morning, my name is X, I'm Y for Amazon Web Services, based in Singapore.\nToday we will talk about Cloud Computing, and explain to you why it's important to know about it.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Orchestrating the Cloud Presentation Transcript

  • 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