• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
WordPress & Cloud: integration with AWS
 

WordPress & Cloud: integration with AWS

on

  • 2,548 views

How-to, tutorial and tips.

How-to, tutorial and tips.

Statistics

Views

Total Views
2,548
Views on SlideShare
1,426
Embed Views
1,122

Actions

Likes
2
Downloads
18
Comments
0

4 Embeds 1,122

http://startup.corley.it 909
http://www.gabrielemittica.com 85
http://cloudconf 73
http://www.corley.it 55

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

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

    WordPress & Cloud: integration with AWS WordPress & Cloud: integration with AWS Presentation Transcript

    • WORDPRESS & AMAZON WEB SERVICES Cascina Roccafranca – Torino – 16 giugno 2012Gabriele Mittica – gabrielemittica.com – gabriele.mittica@corley.it - @gabrielemittica 1 di 47
    • CHAPTER 1.INTRODUCING THE CLOUD Corley S.r.l. Piazza Statuto 10, Torino (10122) 2 di 47 P.Iva 10669790015 www.corley.it
    • What is CLOUD COMPUTING?Cloud computing refers to the delivery of computingand storage capacity as a service to a heterogeneouscommunity of end-recipients.Cloud computing entrusts services with a users data,software and computation over a network.It has considerable overlap with software as aservice (SaaS). Corley S.r.l. Piazza Statuto 10, Torino (10122) 3 di 47 P.Iva 10669790015 www.corley.it
    • FAQ about the cloud… Is the cloud just a fad?1. No. It’s a rational evolution of IT architecture towards a more efficient way of managing resources and designing Web applications efficiently.2. Is the cloud cheap? No. The cloud allows you to pay the right for each service involved. Is the cloud just a scalable vps?3. No. The cloud is a set of services designed to meet specific computing needs. Corley S.r.l. Piazza Statuto 10, Torino (10122) 4 di 47 P.Iva 10669790015 www.corley.it
    • Advantages- access to unlimited resources- scalable architecture- no hardware dependency- pay as you go- geographical redundancy- high availability- increased competition for start-up Corley S.r.l. Piazza Statuto 10, Torino (10122) 5 di 47 P.Iva 10669790015 www.corley.it
    • AWS - Amazon Web Services Services Pricing Dev & SocialScalable virtual machines On-demand & reserved servers SDK & xml webservicesStorage services Storage starting from 0.093$ / GB Community forumContent delivery network Bill by credit card Premium supportAutoscaling & loadbalancing Consolidated billing Events & webinarRealational & No-SQL DB Free tier Start-up challengePrivate Cloud & Policies No setup fee… much more Corley S.r.l. Piazza Statuto 10, Torino (10122) 6 di 47 P.Iva 10669790015 www.corley.it
    • AWS - Links- Home page: http://aws.amazon.com/- About AWS: https://aws.amazon.com/what-is-aws/- All products: http://aws.amazon.com/products/- Dev area: http://aws.amazon.com/resources/- Documentation: http://aws.amazon.com/documentation/- SDK: http://aws.amazon.com/code/- Community: https://forums.aws.amazon.com/index.jspa- AWS Blog: http://aws.typepad.com/- Events: https://aws.amazon.com/about-aws/events/- Services Health Dashboard: http://status.aws.amazon.com/- Pricing Calculator: http://calculator.s3.amazonaws.com/calc5.html Corley S.r.l. Piazza Statuto 10, Torino (10122) 10 di 47 P.Iva 10669790015 www.corley.it
    • CHAPTER 2.WP + S3 + CLOUDFRONT Corley S.r.l. Piazza Statuto 10, Torino (10122) 11 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFrontUploads your wordpress attachements Services involved:to S3 with an option CloudFront Simple Storage Service (S3):distribution. S3 provides a simple web services interface that can be used to store andThis WordPress plugin allows you to use retrieve any amount of data, at any time,Amazons Simple Storage Service to host from anywhere on the web.your media for your WordPress powered It provides 99.999999999% durability.blog with an optional CloudFrontdistribution. CloudFront: CF can be used to deliver your entirePlugin homepage: website, including dynamic, static andhttp://wordpress.org/extend/plugins/tan streaming content using a global networktan-s3-cloudfront/ of edge locations. Over 30 edge locations. Corley S.r.l. Piazza Statuto 10, Torino (10122) 12 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFrontTipical use of WordPress: html and media files are provided by apache (httprequest): Corley S.r.l. Piazza Statuto 10, Torino (10122) 13 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFrontThanks to S3 and CloudFront, you can easily send all your media files throughthe content Delivery Network Corley S.r.l. Piazza Statuto 10, Torino (10122) 14 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configCreate a new user in aws console: Corley S.r.l. Piazza Statuto 10, Torino (10122) 15 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configDownload Credentials: Corley S.r.l. Piazza Statuto 10, Torino (10122) 16 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configThen set the policy: Corley S.r.l. Piazza Statuto 10, Torino (10122) 17 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configGrant full access to S3 management: Corley S.r.l. Piazza Statuto 10, Torino (10122) 18 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configCreate a new bucket in S3 console: Corley S.r.l. Piazza Statuto 10, Torino (10122) 19 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configThen go in CloudFront console and create a new CF distribution: Corley S.r.l. Piazza Statuto 10, Torino (10122) 20 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configSelect the bucket created as origin: Corley S.r.l. Piazza Statuto 10, Torino (10122) 21 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configEnable the new cloudfront distribution: Corley S.r.l. Piazza Statuto 10, Torino (10122) 22 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configDownload the wordpress Plugin (http://wordpress.org/extend/plugins/tantan-s3-cloudfront/) and follow these steps:- Upload tantan-s3-cloudfront to the /wp-content/plugins/ directory- Activate the plugin through the Plugins menu in WordPress- Configure the plugin in the Options (or Settings) screen by following the onscreen prompts.- Set an optional CloudFront distribution URL (must be paired with your S3 bucket on AWS) Corley S.r.l. Piazza Statuto 10, Torino (10122) 23 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: configSet the plugin options: Corley S.r.l. Piazza Statuto 10, Torino (10122) 24 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: usageNow each file uploaded is hosted by S3 and provided by CloudFront: Corley S.r.l. Piazza Statuto 10, Torino (10122) 25 di 47 P.Iva 10669790015 www.corley.it
    • WP + S3 + CloudFront: advantages- Easy to use- Cost affordable- Very-low latency- Reduced load on the server- Increased page speed- Useful in big files hosting, download repository, media files- Useful in js/css/images distribution Corley S.r.l. Piazza Statuto 10, Torino (10122) 26 di 47 P.Iva 10669790015 www.corley.it
    • CHAPTER 3.WP + CLOUDFRONT Corley S.r.l. Piazza Statuto 10, Torino (10122) 27 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFrontCloudFront helps you to provide your Services involved:content through a world wild contentdelivery network. CloudFront: CF can be used to deliver your entireFollowing this how-to you can easily set website, including dynamic, static andCloudFront to provide all your data (html, streaming content using a global networkcss, js, images, videos and more). of edge locations. Over 30 edge locations.You need:- An active AWS account- Dns management You need to edit the dns configuration of your- Edit your wp-config.php file website in order to use properly this tutorial.- No plugins required Corley S.r.l. Piazza Statuto 10, Torino (10122) 28 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFrontTipical use of WordPress: Corley S.r.l. Piazza Statuto 10, Torino (10122) 29 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFrontWordpress hosted by CloudFront: Corley S.r.l. Piazza Statuto 10, Torino (10122) 30 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFront: configEdit the dns configuration of your website: www.example.com. CNAME your-cloudfront-distribution-url cdn.example.com. A your-server-ip Corley S.r.l. Piazza Statuto 10, Torino (10122) 31 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFront: configThen go in CloudFront console and create a new CF distribution: Corley S.r.l. Piazza Statuto 10, Torino (10122) 32 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFront: configSet your subdomain as origin: Corley S.r.l. Piazza Statuto 10, Torino (10122) 33 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFront: configEnable the new CloudFront distribution: Corley S.r.l. Piazza Statuto 10, Torino (10122) 34 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFront: configPlace in your wp-config.php file: define(WP_ALLOW_MULTISITE, true); define(COOKIEPATH, /); define(COOKIE_DOMAIN, . example.com); if(strpos($_SERVER[SCRIPT_NAME], "/wp-login")===0 || strpos($_SERVER[SCRIPT_NAME], "/wp-admin")===0) { define(WP_HOME,http://cdn.example.com); define(WP_SITEURL,http://cdn.example.com); } Corley S.r.l. Piazza Statuto 10, Torino (10122) 35 di 47 P.Iva 10669790015 www.corley.it
    • WP + CloudFront: pros & consPROS: CONS:- Fast implementation - No POST data managed- No-load on your server - Comment system unavailable- High-speed, low-latency (use DISQUS instead)- Useful for product website or - Pay attention to cache timeout website with heavy traffic Corley S.r.l. Piazza Statuto 10, Torino (10122) 36 di 47 P.Iva 10669790015 www.corley.it
    • CHAPTER 4.SENDING EMAILS WITH SES Corley S.r.l. Piazza Statuto 10, Torino (10122) 37 di 47 P.Iva 10669790015 www.corley.it
    • Sending emails with SESWP-SES is a plugin that redirects all Services involved:outgoing WordPress emails throughAmazon Simple Email Service (SES) for Simple Email Service (SES):maximum email delivrability. SES is a highly scalable and cost-effective bulk and transactional email-sendingYou can download this plugin on official service for businesses and developerswebsite http://wp-ses.com/ Only $0.10 per thousand.Requires: 3.0.0 or higherCompatible up to: 3.0.5 Corley S.r.l. Piazza Statuto 10, Torino (10122) 38 di 47 P.Iva 10669790015 www.corley.it
    • Sending emails with SES: features- Ability to adjust WordPress Default Sender Email and Name- Validation of Amazon API Credentials- Request confirmation for sender Emails- Test message within Amazon Sandbox mode- Full Test message within Amazon Production mode- Full integration as seamless replacement for wp_mail internal function- Dasboard panel with Quota and statistics- Ability to customize return path for delivery failure notifications Corley S.r.l. Piazza Statuto 10, Torino (10122) 39 di 47 P.Iva 10669790015 www.corley.it
    • 40 di 47
    • Sending emails with SES: configFirst, install like any other plugin:- Upload and activate the plugin- The setting are in settings / WP SESThen, proceed to the settings:- Fill the email address and name to use as the sender for all emails- Fill in Amazon API credentials- Save changes (Important !)- Ask to add the email as a confirmed sender- Click on the link you got by email from Amazon SES- Refresh the plugin, send a test email- If ok, ask Amazon to go out of sandbox into production mode- Once in production mode, you can use the top button to activate the plugin. Corley S.r.l. Piazza Statuto 10, Torino (10122) 41 di 47 P.Iva 10669790015 www.corley.it
    • Sending emails with SES: configPlugin configuration: Corley S.r.l. Piazza Statuto 10, Torino (10122) 42 di 47 P.Iva 10669790015 www.corley.it
    • CHAPTER 5.WP HOSTING WITH AWS Corley S.r.l. Piazza Statuto 10, Torino (10122) 43 di 47 P.Iva 10669790015 www.corley.it
    • WP hosting with AWS Autoscaling+High AvailabilityThanks to AWS you can setup Wordpress toscaling up and down and grant high-availability to your customers.Some advantages:- Ability to Serve millions of pages/day- Ability to scale out/down dynamically- Should be Highly available- Automated Backup and Monitoring This process involves a lot of services: EC2,- Cost effective Autoscaling, RDS, S3, ROUTE 53, CloudFront… http://aws.amazon.com/products/- Corley S.r.l. Piazza Statuto 10, Torino (10122) 44 di 47 P.Iva 10669790015 www.corley.it
    • WP hosting with AWS: links- How-to part one: http://harish11g.blogspot.it/2012/01/scaling-wordpress-aws- amazon-ec2-high.html- How-to part two: http://harish11g.blogspot.it/2012/02/wordpress-aws-ec2- architecture-part2.html- FAQ about WP on AWS: http://harish11g.blogspot.in/2012/02/faq-scaling-wordpress- aws-ec2-million.html- Slides on SlideShare: http://www.slideshare.net/harishganesan/scaling-wordpress-in- aws-amazon-ec2- AWS Architecture Center: http://aws.amazon.com/architecture/- AWS Web hosting architecture: http://d36cz9buwru1tt.cloudfront.net/architecturecenter/AWS_ac_ra_web_01.pdf- WP on EC2 + RDS tutorial: http://wp.tutsplus.com/tutorials/scaling-caching/deploy- your-wordpress-blog-to-the-cloud/ Corley S.r.l. Piazza Statuto 10, Torino (10122) 46 di 47 P.Iva 10669790015 www.corley.it
    • Thank you for listening Cascina Roccafranca – Torino – 16 giugno 2012Gabriele Mittica – gabrielemittica.com – gabriele.mittica@corley.it - @gabrielemittica 47 di 47