php architect virtual cloud summit

33
php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?" What is this “cloud” stuff I keep hearing about and how do I use it? Kirsten Jones and Jeremy Johnstone Developer Advocates @ LinkedIn Wednesday, November 30, 2011

Upload: kirsten-hunter

Post on 08-May-2015

5.233 views

Category:

Technology


4 download

DESCRIPTION

Slides from Virtual Cloud Summit - http://www.phparch.com/phparchitect-live-presents-the-cloud-summit/Worksheet available from http://www.princesspolymath.com/princess_polymath/?page_id=506 for PaaS slides

TRANSCRIPT

Page 1: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

What is this “cloud” stuff I keep hearing about and how do I

use it?Kirsten Jones and Jeremy Johnstone

Developer Advocates @ LinkedIn

Wednesday, November 30, 2011

Page 2: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

What is "cloud" anyway?

Wednesday, November 30, 2011

Page 3: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Agenda

• About Us

• Cloud Overview

• IaaS Comparison

• PaaS Getting Started

Wednesday, November 30, 2011

Page 4: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Our Backgrounds

• Jeremy

• Used Linux for over 17 years

• Experience scaling to billions of PV/m

• Kirsten

• Passionate about data and mashups

• Self proclaimed scripting princess

Wednesday, November 30, 2011

Page 5: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Types of Cloud providers

• Attack of the aaS:

• IaaS

• PaaS

• SaaS

Wednesday, November 30, 2011

Page 6: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

IaaS vs PaaS

• Level of experience required

• Flexibility

• Customizability

• Ease of setup / deployment

• Risk

Wednesday, November 30, 2011

Page 7: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Types of IaaS providers

• Computing

• Storage

• HPC

• Telecom

• more...

Wednesday, November 30, 2011

Page 8: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

IaaSComparison of three top compute providers

Amazon, Rackspace, and Linode

Wednesday, November 30, 2011

Page 9: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Amazon EC2

• Six geographically diverse facilities

• Moderately easy to use multiple zones

• Linux and Windows support

• Hourly billing

Wednesday, November 30, 2011

Page 10: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

EC2 continued

• HPC support

• Automatic scaling

• Elastic IP

• Most storage included

Wednesday, November 30, 2011

Page 11: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Rackspace Cloud Servers

• Three geographically diverse facilities

• Relatively difficult to use multiple DCs

• Linux and Windows support

• Hourly billing

• Fully managed options available

Wednesday, November 30, 2011

Page 12: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Linode cloud servers

• Six geographically diverse facilities

• Relatively easy to use multiple DCs

• Linux distros only

• Monthly billing

• Closest to experience of a dedicated server

Wednesday, November 30, 2011

Page 13: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Common Functionality

• Burstable resource usage

• 99% or better SLA

• Load balancing

• APIs

• DNS

• Storage / CDN *

Wednesday, November 30, 2011

Page 14: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Use Cases• Conventional multi-machine web

hosting

• Short term / bursty usage

• High performance computing

• Persistent Storage

• Redundancy

• Managed Support

Wednesday, November 30, 2011

Page 15: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

PaaSGetting Started with

Google App Engine, Heroku and Joyent

http://www.princesspolymath.com/princess_polymath/?page_id=506

Wednesday, November 30, 2011

Page 16: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Platform as a Service

• Build code and deploy to the cloud

• Provides the application framework

• More infrastructure: more lock-in

• Choosing: Programming language, pricing scheme

• All have free versions to test on

Wednesday, November 30, 2011

Page 17: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Quick Compare

• Google App Engine - Easy to administer, nice tools, high lock-in

• Heroku - Many languages, scalability, add-ons

• Joyent - Focused on node.js, shell access, more configurability

Wednesday, November 30, 2011

Page 18: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Google App Engine

• Native support for Python and Java

• Other languages supported in JVM

• Easy to deploy django applications

• Integrate with SimpleDB, Google OAuth

• Strong vendor lock-in

Wednesday, November 30, 2011

Page 19: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Getting Started with Google App Engine

• Walkthrough at http://code.google.com/appengine/docs/python/gettingstarted/

• Download the SDK: http://code.google.com/appengine/downloads.html

• Command line functionality or App Engine Launcher (Win/OSX)

Wednesday, November 30, 2011

Page 20: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Creating Hello World

• helloworld/helloworld.pyprint 'Content-Type: text/plain'print ''print 'Hello, world!'

• helloworld/app.yamlapplication: helloworldversion: 1runtime: pythonapi_version: 1handlers:- url: /.*script: helloworld.py

Wednesday, November 30, 2011

Page 21: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Run the application• google_appengine/dev_appserver.py

helloworld/

• By default it will run at :8080 on your local server

• Automatically restarts when you change files

• Real applications use webapp framework

Wednesday, November 30, 2011

Page 22: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Deploy to the Cloud

• The dashboard can be reached at https://appengine.google.com/

• To deploy, you need to create an application ID on the dashboard, then edit app.yaml application: setting to match.

• appcfg.py update helloworld/

• http://application-id.appspot.com

Wednesday, November 30, 2011

Page 23: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Heroku

• Started with Ruby on Rails, now supports node.js, python, scala, clojure

• Plugins to quickly add functionality - logging, couchdb, redis

• Easy to control scaling of web and worker components of your application independently

Wednesday, November 30, 2011

Page 24: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Getting Started with Heroku

• http://devcenter.heroku.com/articles/node-js

• Get a Heroku user account: https://api.heroku.com/signup

• Set up your local workstation

• Node.js, NPM and Git

• Login to heroku

Wednesday, November 30, 2011

Page 25: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Creating Hello World

• server.jsvar http = require('http');var server = http.createServer(function (req, res) { res.writeHead(200, { "Content-Type": "text/plain" }) res.end("Hello world\n");});var port = process.env.PORT||process.env.port||8001;server.listen(port, function() console.log("Listening on " + port);});

Wednesday, November 30, 2011

Page 26: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

NPM Configuration

• package.json{ "name": "my-app", "version": "1.0.0", "scripts": { "start": "node server.js"}

Wednesday, November 30, 2011

Page 27: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Procfile

• Procfileweb: node server.js

• Run foreman$ foreman start14:39:04 web.1 | started with pid 2438414:39:04 web.1 | Listening on 5000

• Test with a browser on localhost

Wednesday, November 30, 2011

Page 28: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Deploy to the Cloud

• Create local Git repo$ git init$ git add .$ git commit -m "init"

• Create heroku stack and deploy$ heroku create --stack cedar$ git push heroku master...-----> Launching... done, v2http://sharp-rain-871.herokuapp.com deployed to Heroku

• Scale web processes$ heroku ps:scale web=1

Wednesday, November 30, 2011

Page 29: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Joyent

• http://wiki.joyent.com/display/node/Getting+Started+with+a+Node.js+SmartMachine

• Sign up for no.de: http://no.de/

• Set up your SSH key

• “Order a machine”

Wednesday, November 30, 2011

Page 30: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Creating Hello World

• Same node.js files as heroku exampleserver.jspackage.json

• Add config.json file (optional)web: node server.js

Wednesday, November 30, 2011

Page 31: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

Deploy to the Cloud

• Update ~/.ssh/configHost synedranodetest.no.de Port 57791 User node ForwardAgent yes

• Create local Git repo$ git init$ git add .$ git commit -m "initial commit"

• Push to joyent$ git remote add joyent synedranodetest.no.de:repo$ git push joyent master

Wednesday, November 30, 2011

Page 33: PHP Architect Virtual Cloud summit

php|architect Live! The Cloud Summit - 11/30/2011 "What's this "cloud" stuff I keep hearing about and how do I use it?"

The end... =)

Questions?

Wednesday, November 30, 2011