Your SlideShare is downloading. ×
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
The Basics of Smart Drupal Deployment
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

The Basics of Smart Drupal Deployment

3,982

Published on

Published in: Technology, Sports
3 Comments
3 Likes
Statistics
Notes
  • Thanks, great! Another good practice is using Features modules and Drush, I'm planning to attend the webinar on this topic, you may find it interesting as well (http://www.qarea.com/webinars/drupal-deployment-features-module-drush)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice to know I am not crazy. This is basically the deployment stategy I've been building for the last year or so at Penn State Harrisburg.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • this is GREAT! so rare to see images which explain version control.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,982
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
55
Comments
3
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. The Basics of Smart Erik Webb @erikwebb Drupal Deployment
  • 2. Background• Technical Consultant at Acquia• Focus on best practices, infrastructure, and developer training• Working with Drupal ~3.5 years• Previously Red Hat sysadmin at Georgia Tech and application developer at IBM
  • 3. Defining Deployment
  • 4. What is deployment?• Maintaining multiple, independent environments• Effortlessly migrating and testing changes between them• Safely updating without downtime or rollbacks• Accounting for changes in a sustainable way
  • 5. 3.5 Environments• Production • Local • Hands-off • Match software versions• Staging • IDE-focused • Sign-off• Development • Integration
  • 6. The 3 Cs (and an F)• Code only moves up• Configuration lives only in code• Content only moves down• Files only move down
  • 7. Version ControlStaying out of your own way
  • 8. Using Branches and Tags• Branches • Tags • Dynamic • Static • Ongoing work • Releases • Strategic • Periodic
  • 9. Version Control Workflow
  • 10. Keeping Version Control Sane• Ignore inappropriate files • Uploaded files directory • settings.php• Prevent bad PHP using lint checks• Don’t be afraid to blame!
  • 11. Moving Configuration to CodeTools and techniques
  • 12. Usual Suspects• CTools export • Strongarm • Bulk Exporter • Boxes • Views • UUID • Panels • Node export• Features• Features extra
  • 13. Filling the Void• 80% handled by CTools-like exportables• Non-developers stuck• Most give up on final 20%• Breaks entire flow• Exceptions suck!
  • 14. Update Functions• Built-in Drupal feature• Well understood and supported• Only functional code• http://api.drupal.org/hook_update_N
  • 15. Update Functions using Helpers /** * @see forum_enable(). */ function mymodule_update_7000() {   $vocab = array(     name => t(Forums),     machine_name => forums,     description => t(Forum navigation vocabulary),     hierarchy => 1,     module => forum,     weight => -10,   );   $vocabulary = (object) $vocab;   taxonomy_vocabulary_save($vocabulary);   return t(New vocabulary imported.); }
  • 16. Update Functions using SQL /** * @link http://drupal.org/node/310079 */ function mymodule_update_7001() {   $pid = db_insert(mytable)     ->fields(array(       col1 => value,       col2 => value,     ))     ->execute();   return t(New row imported.); }
  • 17. Next StepsDeploying like a Pro
  • 18. Deploying via Version Control• Atomic (ACID) • svn update• Tools • Post-commit hooks • Jenkins • Capistrano
  • 19. Drush Deployment• Checkout code from version control • Protect files using ownership• Point web server to new version• drush up• drush cc all
  • 20. Jenkins• “Fancy cron”• Triggered by polling SCM• Integrate deployment with other tools • Selenium • jMeter• Run commands only on success (atomicity)
  • 21. Q&ASlides will be posted on www.erikwebb.net and SlideShareSee more at DrupalCamp SC on June 12, 2011
  • 22. Photo credits• “Advanced Theoretical Physics”, Marvin (PA) on Flickr. http://www.flickr.com/ photos/55853619@N00/145052885/• “Sugar rush from the cupcake wore off”, slworkin2 on Flickr. http:// www.flickr.com/photos/18548283@N00/3094340010/• “Collision between two engines, Bay of Quinte Railway, ON, 1892”, Musée McCord Museum on Flickr. http://www.flickr.com/photos/ 25786829@N08/2918567169/• “Square Peg in a Round Hole”, casa.pokayoke on Flickr. http:// www.flickr.com/photos/43740025@N03/4184481846/• “Vacation in my backyard”, mandolin davis on Flickr. http://www.flickr.com/ photos/43546149@N00/258014588/

×