• Save
Cloudify your applications with Amazon Web Services
Upcoming SlideShare
Loading in...5
×
 

Cloudify your applications with Amazon Web Services

on

  • 9,992 views

A talk about the advantages of cloud computing services and the integration of PHP and Amazon Web Services

A talk about the advantages of cloud computing services and the integration of PHP and Amazon Web Services

Statistics

Views

Total Views
9,992
Slideshare-icon Views on SlideShare
9,795
Embed Views
197

Actions

Likes
30
Downloads
0
Comments
3

7 Embeds 197

http://www.slideshare.net 93
http://cloudify.me 54
http://www.phpday.it 43
http://www.linkedin.com 3
https://www.linkedin.com 2
http://www.lmodules.com 1
http://translate.googleusercontent.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

13 of 3 Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • cloudifyyourapps.com for sale.
    contact Buymydomains@live.com
    Are you sure you want to
    Your message goes here
    Processing…
  • There is a brand new Oracle Middleware and Cloud Computing book available now:
    http://www.munzandmore.com/writing/cloudcomputing_book
    Are you sure you want to
    Your message goes here
    Processing…
  • Very interesting ppt. The research indicated PPT only contains 30% of information; therefore the 70% valuable information comes from the presenter himself/herself. soEZLecturing.com provides you a chance to record your voice with your PowerPoint presentation and upload to the website. It can share with more readers and also promote your presentation more effectively on soEZLecturing.com.
    www.soezlecturing.com
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Cloudify your applications with Amazon Web Services Cloudify your applications with Amazon Web Services Presentation Transcript

  • Cloudify your applications with Amazon Web Services Federico Feroldi, Cloudify phpDay 2009 - May 15, 16 2009 - Verona, Italy http://grusp.it - http://phpday.it - http://joind.in/event/view/34
  • Before we start Feel free to ask questions! phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • About me “I’m a technologist, I like to find simple solutions to solve hard challenges” Federico Feroldi phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • About me: the beginning First BASIC program at 7 years old on my Commodore 64 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • About me: coding for fun Had fun during late 90s DemoScene coding realtime GFX in C and i386 assembly phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • About me: work experience Working in the Internet industry since 1996 for many small and big companies phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • About me: thinking big 6 years in Yahoo! Member of the intl MyYahoo team during the rewriting project, from C++/Perl to PHP + C++ extensions phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • About me: the future Founded Cloudify in January 2009, helping customers unleash the power of cloud computing technologies http://cloudify.me phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Agenda phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Agenda • The cloud advantage phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Agenda • The cloud advantage • Overview of Amazon Web Services phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Agenda • The cloud advantage • Overview of Amazon Web Services • Amazon Web Services and PHP phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Agenda • The cloud advantage • Overview of Amazon Web Services • Amazon Web Services and PHP • Examples phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: a definition phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: a definition NIST Working Definition of Cloud Computing phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: a definition NIST Working Definition of Cloud Computing “Cloud computing is a pay-per-use model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.” http://tinyurl.com/qjfonl phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: a definition NIST Working Definition of Cloud Computing “Cloud computing is a pay-per-use model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.” http://tinyurl.com/qjfonl phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: optimize resource usage 100 75 Systems usage Idle 50 25 Active 0 Time phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: optimize resource usage 100 Cloud 75 Systems usage 50 Idle 25 Active 0 Time phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud: you can scale FAST! Animoto server > 3500 instances grew from less than 80 to more than 3500 in 3 days after launch of Facebook application < 80 http://tinyurl.com/6fa7qo phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud advantage cloud platform phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud advantage Technology cloud platform phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud advantage Technology cloud platform Speed phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud advantage Technology cloud platform Speed Flexibility phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • The cloud advantage Technology Cost cloud platform Speed Flexibility phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: overview phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: overview phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: overview More than 540,000 developers phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB SQS S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB SQS S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB SQS CloudFront S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB SQS CloudFront S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: components EC2 SimpleDB SQS CloudFront S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • EC2 Amazon Web Services: EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM • You can create custom VM images (AMI) phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM • You can create custom VM images (AMI) • Fixed IPs, persistent volumes, snapshots phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM • You can create custom VM images (AMI) • Fixed IPs, persistent volumes, snapshots • You pay cpu time and data transferred phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: S3 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: S3 S3 • Create a bucket and put objects inside phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: S3 S3 • Create a bucket and put objects inside • http://s3.amazonaws.com/bucket/object or http://xxx.yoursite.com/object phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: S3 S3 • Create a bucket and put objects inside • http://s3.amazonaws.com/bucket/object or http://xxx.yoursite.com/object • You can put an infinite number of objects in a bucket, objects have 5GB size limit phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: S3 S3 • Create a bucket and put objects inside • http://s3.amazonaws.com/bucket/object or http://xxx.yoursite.com/object • You can put an infinite number of objects in a bucket, objects have 5GB size limit • You pay storage, data transferred and operations phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SimpleDB SimpleDB phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) • Domains, Items and Attributes phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) • Domains, Items and Attributes • Very simple query language (no JOINs) phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) • Domains, Items and Attributes • Very simple query language (no JOINs) • You pay storage, data transferred and operations phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SQS SQS phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SQS SQS • Implements message queing service phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SQS SQS • Implements message queing service • Useful to build asyncronous workers and offload web servers phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Amazon Web Services: SQS SQS • Implements message queing service • Useful to build asyncronous workers and offload web servers • You pay messages and data transferred phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • AWS and PHP How do I build my PHP application on AWS? phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • AWS and PHP: Amazon libraries phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • AWS and PHP: Amazon libraries Amazon “official” PHP libraries ✓ support all services ✓ many tutorials available - verbose and often incostintent syntax - not very well documented phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • AWS and PHP: Tarzan AWS ✓ full AWS support (S3, EC2, SQS, SimpleDB, CloudFront) ✓ clean, consistent API ✓ well documented http://tarzan-aws.com/ phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); Include Tarzan core class $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php Create AmazonS3 object require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php Create a new bucket that require_once('tarzan.class.php'); will contain the file $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); Upload a local file to S3 $s3 = new AmazonS3(); and make it public $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Get a file from S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Get a file from S3 <?php Get a handler to a require_once('tarzan.class.php'); remote file $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Get a file from S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Get a file from S3 <?php require_once('tarzan.class.php'); Output the file $s3 = new AmazonS3(); content to the client $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Get a file from S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php Include Tarzan class and require_once('tarzan.class.php'); create AmazonEC2 object $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php Create an EC2 instance of an Ubuntu 8.04 LTS Hardy Server require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); Allocate an Elastic IP (fixed public IP) and associate it with the instance created $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); Disassociate and $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id release the Elastic IP )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id Reboot the instance )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); Shutdown the instance $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); Create a persistent $ec2->create_snapshot($volume_id); volume of 10 GB size $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); Attach the volume to the running instance as /dev/sdh $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); Crate a snapshot (backup) $ec2->delete_volume($volume_id); volume of the ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); Unmount the volume $ec2->delete_volume($volume_id); ?> from the running instance phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); Delete the volume $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', Create a domain named “tarzan_test” that will store items 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); Create an item with $domain = ID=”testuser” $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', Attributes have a key and 'fantastic' one or more values ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); Get the password for $q = $sdb->$query('tarzan_test', the user “testuser” array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', Get the ID of 50 users array( 'MaxNumberOfItems' => 10 ), without any particular order quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php Get at most 50 users that have $q = the tags ”cool” and “awesome” $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = but not the tag “deleted” $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); Fetch all the attributes, ?> not only the IDs phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); Create the queue $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); Push a message into the queue $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); Remove temporaly a $queue = $sqs->create_queue('tarzan_test_queue'); message from the queue $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); Remove permanently the $message = $sqs->send_message('This is my message!'); $message = message from the queue $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); Destroy the queue $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • What we have learned? The cloud is real and it takes less than 5 minutes to start using it in you applications! With Tarzan you can easily integrate the powerful Amazon Web Services into you application or start build one on them. phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • Thank you! Questions? http://cloudify.me info@cloudify.me @cloudify We’re hiring, send your resume to jobs@cloudify.me phpDay 2009 - May 15, 16 2009 - Verona, Italy