Fowa Miami 09 Cloud Computing Workshop

Download Fowa Miami 09 Cloud Computing Workshop

Post on 26-Aug-2014

8.909 views

Category:

Technology

5 download

DESCRIPTION

Slides for an introductory workshop on cloud computing for a web app developer audience at FOWA Miami 09 (http://events.carsonified.com/fowa/2009/miami/workshops#workshop_36)

TRANSCRIPT

  • How to build your app quickly (and cheaply?) using the Cloud
  • Intro (Admin, facilities, who I am)
  • Agenda
    • Overview
    • Walk-through deployment on PaaS and IaaS
    • Break
    • Considerations
      • Costs / Economics
      • Architecture
    • Discussion
  • Goals for the workshop
  • Cloud computing. WTF?
  • WAN (Frame Relay, ISDN, etc.) Router Router LAN A LAN B
  • For this workshop, it means: elastic compute resources, charged for like a utility
  • Why bother?
  • Whats a web app?
  • http://www.flickr.com/photos/psd/6732568/in/set-666533/
  • http://www.flickr.com/photos/psd/6733371/in/set-666533/
  • http://www.flickr.com/photos/psd/6733187/in/set-666533/
  • http://www.flickr.com/photos/gopal1035/322084210/
  • http://www.flickr.com/photos/psd/58054545/
  • Its more than static content.
  • So that means, its about any and all commercial web sites, right?
  • No. Dont think so.
  • Griefer alert: is this just flamebait?
  • No. In the context of cloud computing, it makes a difference.
  • A big difference.
  • Apps do something.
  • Content doesnt.
  • Cloud computing is about doing something.
  • http://www.nytimes.com/2006/06/14/technology/14search.html
  • Microsoft is adding 10k servers a month to their infrastructure http://blogs.zdnet.com/microsoft/?p=1391
  • Thats one Facebook per month http://www.datacenterknowledge.com/archives/2008/04/23/facebook-now-running-10000-web-servers/ http://www.istartedsomething.com/20080812/microsoft-enviroment-video-reveals-server-numbers-power/
  • Amazon talks a lot about the demand
  • Animoto went from 50 to 3400 Amazon virtual servers in two days
  • http://aws.typepad.com/aws/2008/04/animoto---scali.html
  • The New York Times converted 4TB of TIFFs to PDFs in a day. For $240
  • http://open.blogs.nytimes.com/2007/11/01/self-service-prorated-super-computing-fun/ http://open.blogs.nytimes.com/2008/05/21/the-new-york-times-archives-amazon-web-services-timesmachine/ http://www.roughtype.com/archives/2008/11/the_new_economi.php
  • And Amazon shows everyone who will sit still for more than 5 seconds the following picture:
  • http://aws.typepad.com/aws/2008/05/lots-of-bits.html
  • Assumption: Mom+Pop ISP cannot compete with this.
  • Are Mom+Pop doomed?
  • Ultimately, that depends on you, the developers of web apps.
  • Its going to depend on decisions you make about architectural and engineering concerns.
  • Architecture is about making design choices. Engineering is about knowing your materials.
  • Making use of the Cloud is an architectural and engineering challenge.
  • So what are the architectural choices? What are the materials?
  • http://rationalsecurity.typepad.com/blog/2009/01/cloud-computing-taxonomy-ontology-please-review.html http://cloudcomputing.sys-con.com/node/811519 http://www.collab-ogce.org/gce08/images/7/76/LamiaYouseff.pdf SADIST-PIMP SPI (SaaS, Paas, IaaS)
  • http://www.mindmeister.com/maps/show_public/15936058
  • But wait! Once thats sorted, you have to consider contextual dimensions
  • The Radeztsky Cube http://cloudforum.googlegroups.com/web/Metaverse+Decomposition.pdf
  • http://cloudforum.googlegroups.com/web/Metaverse+Decomposition.pdf
  • IOW, your choices are influenced by whether you are integrating established apps, or writing a green-field app.
  • And whether your architecture will be entirely in the public Cloud, or a mix of public and private resources.
  • For the sake of this workshop, were going to refer to the SPI model
  • SPI Model SaaS PaaS IaaS
  • Were going to assume a green-field app, deployed entirely on the public Cloud
  • Were going to focus on the scenario of your code, running elsewhere not so much on mashups and re-use of SaaS
  • And were going to examine the question of PaaS vs. IaaS for that app.
  • Goals for the workshop
  • OK. So what is PaaS?
  • Platform As A Service
  • Some examples: Google App Engine, Bungee, Force.com, Heroku
  • Characterized by
  • Constraints on language and design
  • A high level programming model
  • A specific model of multi-tenancy
  • Takes care of low level concerns
  • Google App Engine
  • Thats it.
  • Constraints on language and design (Python + BigTable + Goog Svcs)
  • A high level programming model (The WebApp (or other Python) framework, Datastore APIs, Memcache, etc.)
  • A specific model of multi-tenancy (Googles BigTable + GFS platform)
  • Takes care of the low level concerns (Scales for you (up and down), distribution across cluster nodes, load balancing, replication of data, etc. )
  • Pretty cool.
  • Infrastructure As A Service
  • Characterized by
  • No constraints on language or design
  • A high level architectural model
  • A specific model of multi-tenancy
  • Takes care of very few low level concerns
  • This is a LOT more work. ;)
  • Amazon Web Services
  • Amazon Web Services
    • Elastic Compute Cloud (EC2)
    • SimpleDB
    • Simple Storage Service (S3)
    • Simple Queue Service (SQS)
    • EC2 Elastic Block Store (EBS)
    • Other stuff
      • Cloudfront
      • DevPay
      • Flexible Payments Service (FPS)
      • Mechanical Turk
      • Alexa
  • By and large, Amazon means EC2
  • EC2 is the only AWS service that one deploys to
  • You just use the other services whether from an EC2 instance or anywhere else on the Web is irrelevant
  • The core unit of EC2 is the Amazon Machine Image AMI
  • An AMI is a virtual machine image a VM
  • A VM is just a (very large) file. Like a live ISO disk image. Typically, it is some distro of Linux.
  • Amazon uses Xen, an open source VM system http://www.xen.org/
  • The key to IaaS is that you can use any app architecture you like
  • The drawback with IaaS is that you therefore have to design your own app architecture
  • Generally speaking, this is the same task (with the same effort) that you would need for physical hardware hosted at an ISP
  • App servers, load balancers, databases, clusters, replication, networking
  • You sort it out yourself
  • With Amazon, this begins with obtaining your credentials
  • Then you download the command line tools and set them up
  • You use the tools to proceed through the AMI workflow
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ AMI ID
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/
    • Create keypair
      • Save the private key locally
      • ec2-add-keypair
    • Launch selected instance
      • Using AMI ID and keypair name
      • ec2-run-instances -k
      • Returns the Instance ID
    • Examine the running instance
      • ec2-describe-instances
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/
  • Lets pick that apart
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Reservation ID
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ AWS Access Key ID
  • AWS Access Key ID
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Security Group ID
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Instance ID
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ AMI ID
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ External DNS host name
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Internal DNS host name
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Current state of the instance
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Keypair name
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ AMI Launch Index
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Instance type
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Launch time
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/ Availability Zone ID
  • Availability zones are a bit complicated
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/
  • Other IaaS providers may (or may not) have similar capabilities
  • The point is that, unlike GAE, here is yet another detail that you need to think about
  • http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/...