Download - Utah Codecamp Cloud Computing
![Page 2: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/2.jpg)
Thanks to our Sponsors!
To connect to wireless 1. Choose Uguest in the wireless list
2. Open a browser. This will open a Uof U website 3. Choose Login
![Page 3: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/3.jpg)
Cloud Computing Definitions
• Essential Characteristics– On-demand self-service– Broad network access– Resource pooling– Rapid elasticity– Measured service
• Service Models– Software as a Service– Platform as a Service– Infrastructure as a Service
NIST defines five essential characteristics, three service models, and four deployment models.
![Page 4: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/4.jpg)
Cloud Computing Definitions
• Deployment Models– Private cloud– Community cloud– Public cloud– Hybrid cloud
NIST cloud computing reference architecture
![Page 5: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/5.jpg)
Cloud Computing Definitions
ACM CTO Roundtables
What is Cloud Computing?
Cloud computing is about moving services, computation and/or data—for cost and business advantage—off-site to an internal or external, location-transparent, centralized facility or contractor. By making data available in the cloud, it can be more easily and ubiquitously accessed, often at much lower cost, increasing its value by enabling opportunities for enhanced collaboration, integration, and analysis on a shared common platform.
Three divisions (areas):• SaaS: WAN-enabled application services
(eg. Google Apps, Salesforce.com, WebEx.)
• PaaS: Foundational elements to develop new applications (eg. Coghead, Google Application Engine.)
• Iaas: Providing computational and storage infrastructure in a centralized, location-transparent service (eg. Amazon.)
![Page 6: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/6.jpg)
Cloud Computing Definitions
• The term "Cloud Computing" refers to the on-demand delivery of IT resources via the Internet with pay-as-you-go pricing.
![Page 7: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/7.jpg)
Cloud Conceptual Framework
![Page 8: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/8.jpg)
Cisco Domain Ten Framework
![Page 9: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/9.jpg)
![Page 10: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/10.jpg)
AWS Regions and Edge Locations
![Page 11: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/11.jpg)
Regions and Availability Zones
![Page 12: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/12.jpg)
Not All Regions Have Same Number of Zones
![Page 13: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/13.jpg)
Cisco Domain Ten Framework
![Page 14: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/14.jpg)
AWS Account Management
![Page 15: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/15.jpg)
Cisco Domain Ten Framework
![Page 16: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/16.jpg)
AWS Service Catalog
![Page 17: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/17.jpg)
S3 Management Console
![Page 18: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/18.jpg)
S3 Objects in a Bucket
![Page 19: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/19.jpg)
An Example Cloud Use
![Page 20: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/20.jpg)
Cloudbursting Example
• 1 Trillion pairs to classify• 500 TB of data• 10 TB result set• CPU Bound– Single core: ~ 1000-1500 classify ops/s
• 11.5 K core-days
![Page 21: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/21.jpg)
Approach
• AWS c1.xlarge spot instances– 8 core, 24GB RAM– $0.075 on AWS spot market– Best CPU/$ ratio
• HP Blades in familysearch.org datacenter– 8 core, 24 GB RAM– 300 servers
![Page 22: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/22.jpg)
Issues to Address
• Machine Instability– Machine death from AWS spot instance volatility– Hardware failure (1000s of machines – certainty)
• Coordination– Partitioning the work– Different server clusters
• Different aws availability zones• Fs.org datacenter
– Restart failed processes
![Page 23: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/23.jpg)
The Solution
• Single Queue Multiple Reader Pattern– SQS with visibility timeouts to manage retries– Dead letter queue for messages failing > threshold
• Claim Check Pattern– AWS S3 as data store
• Homogeneous, Idempotent work units– 15-20 minute target completion time– 0 side effects– Work may get done multiple times
![Page 24: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/24.jpg)
Claim Check - EIP
![Page 25: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/25.jpg)
![Page 26: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/26.jpg)
Results
• Work Completed• 64 hours• 1000 machines avg.; ~2500 peak• $5000– 6X cost savings over previous Hadoop based
solution• 300 lines of Java/bash code• 1 engineer / 1 week
![Page 27: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/27.jpg)
Next Steps
• Better metrics– Log aggregations via Splunk– Performance counters
• Better deployment– CloudFormation
• AWS Simple Workflow (SWF) for better server lifetime management
• Investigate other OSS possibilities– Storm– Hadoop YARN– akka
![Page 28: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/28.jpg)
AWS For Real - Enterprise
![Page 29: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/29.jpg)
Introduction to Autoscale
![Page 30: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/30.jpg)
Configuration Example
![Page 31: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/31.jpg)
CloudFormation Template - 1"Resources" : { "WebServerGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "AvailabilityZones" : { "Fn::GetAZs" : ""}, "LaunchConfigurationName" : { "Ref" : "LaunchConfig" }, "MinSize" : "1", "MaxSize" : "3", "LoadBalancerNames" : [ { "Ref" : "ElasticLoadBalancer" } ] } },
![Page 32: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/32.jpg)
Cloudformation Template - 2 "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" } }},
![Page 33: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/33.jpg)
Cloudformation Template - 3 "WebServerScaleUpPolicy" : { "Type" : "AWS::AutoScaling::ScalingPolicy", "Properties" : { "AdjustmentType" : "ChangeInCapacity", "AutoScalingGroupName" : { "Ref" : "WebServerGroup"}, "Cooldown" : "60", "ScalingAdjustment" : "1" } },
![Page 34: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/34.jpg)
Cloudformation - 4 "WebServerScaleDownPolicy" : { "Type" : "AWS::AutoScaling::ScalingPolicy", "Properties" : { "AdjustmentType" : "ChangeInCapacity", "AutoScalingGroupName" : { "Ref" : "WebServerGroup" }, "Cooldown" : "60", "ScalingAdjustment" : "-1" } },
![Page 35: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/35.jpg)
Cloudformation - 5 "CPUAlarmHigh": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmDescription": "Scale-up if CPU > 90% for 10 minutes", "MetricName": "CPUUtilization", "Namespace": "AWS/EC2", "Statistic": "Average", "Period": "300", "EvaluationPeriods": "2", "Threshold": "90", "AlarmActions": [ { "Ref": "WebServerScaleUpPolicy" } ], "Dimensions": [ { "Name": "AutoScalingGroupName", "Value": { "Ref": "WebServerGroup" } } ], "ComparisonOperator": "GreaterThanThreshold" } },
![Page 36: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/36.jpg)
Cloudformation Template - 6 "CPUAlarmLow": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmDescription": "Scale-down if CPU < 70% for 10 minutes", “MetricName": "CPUUtilization", "Namespace": "AWS/EC2", "Statistic": "Average", "Period": "300", "EvaluationPeriods": "2", "Threshold": "70", "AlarmActions": [ { "Ref": "WebServerScaleDownPolicy" } ], "Dimensions": [ { "Name": "AutoScalingGroupName", "Value": { "Ref": "WebServerGroup" } } ], "ComparisonOperator": "LessThanThreshold" } },
![Page 37: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/37.jpg)
New Stack Creation
![Page 38: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/38.jpg)
Created One Scale Group
![Page 39: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/39.jpg)
Making it Real
![Page 40: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/40.jpg)
Vanilla Amazon
ELB
Internet
RDS RDS
ELB
Availability Zone 2Availability Zone 110.0.0.0/8
ELB
RDS
ELB
RDS
ELB
RDS
ELB
RDS
![Page 41: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/41.jpg)
Virtual Private Cloud
Availability Zone 2Availability Zone 1
VPC – 10.36.0.0/16
![Page 42: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/42.jpg)
VPC With Multiple Subnets
Availability Zone 2Availability Zone 1
VPC – 10.36.0.0/16
Subnet A Subnet B
RDS RDSRDS
ELB
RDS
ELB
Internet
ELB
![Page 43: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/43.jpg)
VPC Gives Control of Networking
Availability Zone 2Availability Zone 1
VPC – 10.36.0.0/16
Subnet A Subnet B
RDS RDS
Internet
Gateway Gateway
ACL
ELB
![Page 44: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/44.jpg)
EC2 vs VPC
EC2• Shared IP• Single Network• No network ACLs
• Internet access by default
• Ingress only Security Groups
• Tunnel/SSL proxy for X-connects
VPC• Private IP• Isolated Subnets• Network ACLs required
• Internet access by design
• Ingress and Egress Security Groups
• Direct Connect for x-connects
![Page 45: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/45.jpg)
Virtual Private Cloud
![Page 46: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/46.jpg)
![Page 47: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/47.jpg)
PaaS Subnet Groups
Availability Zone 2Availability Zone 1
VPC – 10.36.0.0/16
Subnet A Subnet B
Gateway GatewayACL
Subnet C Subnet DWide open
Subnet Group
![Page 48: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/48.jpg)
Subnet Groups
DMZ
• SSH Bastions• NAT Servers• FS.ORG ELBs
Public• DLBs• fs.org web apps
and APIs
Private
• fsg.net web apps and APIs
• Support services
Data• Databases• NoSQL
Tools
• DNS• Build tools• PaaS army
![Page 49: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/49.jpg)
Internet/Datacenter Routing
DMZ
Public
Private
Data
Tools
Internet Gateway
Private Gateway
Direct Connect
![Page 50: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/50.jpg)
VPC Setup
![Page 51: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/51.jpg)
HA VPN Instances for VPN
![Page 52: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/52.jpg)
![Page 53: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/53.jpg)
Public Tier Details
![Page 54: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/54.jpg)
Conclusion
• Cloud technology offers new opportunities in scale and management.
• Properly using these tools is necessary to achieve business goals.
• CapEx to OpEx is one reason to move to cloud computing.• A more important reason is the tremendous flexibility
that the environment offers.• VPC provides the kinds of governance and security an
enterprise needs to be comfortable with so much power under the hood.
![Page 55: Utah Codecamp Cloud Computing](https://reader036.vdocuments.us/reader036/viewer/2022062513/554bbd84b4c9053a298b4e80/html5/thumbnails/55.jpg)