Your SlideShare is downloading. ×
Voiture tech talk
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Voiture tech talk

1,060
views

Published on

Talk given on Hoppinger's Drupal deployment automation tool (named Voiture) at the Drupal Tech Talk, 19th May 2011. …

Talk given on Hoppinger's Drupal deployment automation tool (named Voiture) at the Drupal Tech Talk, 19th May 2011.

Please note the references to all things that 'suck' ... the point was not to complain about the software or issues in question but to raise awareness to the fact that nothing is perfect, that 'good' developers should be critical thinkers and that when you think something 'sucks' it's an opportunity to improve on it somehow :)

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,060
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
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
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • \n \n
  • Transcript

    • 1. I want to practice “better” web development with Drupal the first steps of a long roadtowards continuous integration in the context of Droopy
    • 2. Drupal sucks.
    • 3. Web development sucks.
    • 4. developers aim toimprove by identifying what sucks.
    • 5. What is my problem?Don’t want to develop on a live siteDon’t want to develop and test on thesame siteDon’t want to have multipledevelopers working on a singleinstallationDon’t want to spend hours/daysmanually rolling out and configuringnew functionality
    • 6. I have more problems...Don’t click upgrade/install and prayit worksDon’t want to bugfix a live site at3amI’m not a site administrator!
    • 7. I need ...Multiple developers working on aproject efficientlyMultiple installations of a projectTestable, reproducible rollouts ofnew functionality
    • 8. I need ...Multiple developers working on aproject efficientlyMultiple installations of a projectTestable, reproducible rollouts ofnew functionality I need automation!
    • 9. automated Drupal deployment?!this is quite difficult! why?
    • 10. automated Drupal deployment?!this is quite difficult! why?nobody is offering a completesolution
    • 11. automated Drupal deployment?!this is quite difficult! why?nobody is offering a completesolutioninteractive site building paradigm
    • 12. automated Drupal deployment?!this is quite difficult! why?nobody is offering a completesolutioninteractive site building paradigmeverything is in the database
    • 13. automated Drupal deployment?!this is quite difficult! why?nobody is offering a completesolutioninteractive site building paradigmeverything is in the databasedrush only goes so far?
    • 14. Building a deployment automation vehicle for Drupal ...
    • 15. Building a deployment automation vehicle for Drupal ... Voiture!
    • 16. Voiture Requirements
    • 17. Voiture Requirements single command installation
    • 18. Voiture Requirements single command installation single command update (idempotent)
    • 19. Voiture Requirements single command installation single command update (idempotent) project integrated developer tools
    • 20. Voiture Requirements single command installation single command update (idempotent) project integrated developer tools everything in source control
    • 21. Voiture Requirements single command installation single command update (idempotent) project integrated developer tools everything in source control zero interactive configuration
    • 22. Voiture Requirements single command installation single command update (idempotent) project integrated developer tools everything in source control zero interactive configuration no hacks in core
    • 23. Voiture LimitationsSVN support only*nix only (Linux & MacOSX)Seperate D6 & D7 versionsDevelopers require [cmdline] experienceClick & go not supportedFixed project structureproject setup & configuration overhead
    • 24. Voiture Capabilities initialize ‘structural’ data install/enable project defined modules (removes all others) project integrated drush all site configuration in code per environment settings logged `changeset` functionality extensible bootstrap wrapper
    • 25. Voiture/Drupal Project Layoutcnf shared ... config shared by all ‘targets’ targets ... per app-mode/install ‘target’ configsdata structural_fixtures sqlinc class .... custom classes funcs .... custom function ‘libs’httpdocs ..... std drupal install + custom settings.php+ sites/all/*/*voiture bin/*/* .. dev and deployment tools cnf dfc ...... custom ‘drupal front-controllers’ inc init . ‘bootstrapping’ include files
    • 26. Drupal Variablesdefined in codeeasy to edit (unserialized)overloads whatever is in the DBvariables data lives incnf/shared/vars/*.php
    • 27. installation targets contains your app.ini contains your vhost configuration
    • 28. shared `targets`contains project / app-mode sharedapp.ini + vhost configurationcontains project module listcontains other fun stuff too!
    • 29. SFI (wtf?)Data that defines the required structure & entities of your site, think:★ Nodes (e.g. home page)★ Menulinks★ Taxonomy★ Domains (domains module)★ Users (admin accounts)
    • 30. Leveraging Featuresif it’s not a self-contained moduleput it in a feature!when it doesn’t fit in a feature goto Voiture!no inter-dependencies please!
    • 31. Developer tools ... voiture/bin/*install / updatetranslation toolsSQL dump & loadDB backup & copyintegrated drushsvn cleanup, switch & updatevariable dumping & listingintegrated php(+ debug & profile variants)
    • 32. Hole in one ... what happens when you “voiture/bin/app/update”1. check target 13. load modules **2. check env (system dependencies) 14. load features **3. put site offline 15. load super user **4. fix file perms 16. load customer admin users **5. backup DB (production env’s) 17. cleanup **6. svn clean 18. cache purge **7. svn up/switch (optional branch/tag) 19. load SFIs **8. include core ** 20. display `messages` **9. load language (deltas) ** 21. run changesets ***10. cache purge ** 22. update crontab11. load themes ** 23. restart apache12. load variables ** 24. put site online (if no errors) driven by PHP Code: ** AppMutator, *** ChangesetMutator
    • 33. Settings.php <?php// $Id: default.settings.php,v 1.51 2010/10/11 23:49:48 dries Exp $include DrupalApp::getVoitureIncludeDir() . /init/settings.php;return;// ... etc
    • 34. index.php voiture/dfc/index.php not httpdocs/index.php uses Alias apache directive<?php/** * Voiture bootstrapping wrapper around drupal */require dirname(__FILE__). /../inc/init/web.inc.php;// let drupal do its thing ...menu_execute_active_handler();
    • 35. Voiture’s update.php <?php/** * Voiture bootstrapping wrapper around drupal */require dirname(__FILE__). /../inc/init/web-light.inc.php;if (in_array(DrupalApp::getMode(), array(stage, prod))) { if (!DrupalApp::isCLI() && !headers_sent()) header(Location: .strip_tags($_SERVER[HTTP_HOST])); exit;}/** * Global flag indicating that update.php is being run. * * When this flag is set, various operations do not take place, such as invoking * hook_init() and hook_exit(), css/js preprocessing, and translation. */define(MAINTENANCE_MODE, update);function update_selection_page() { drupal_set_title(Drupal database update); $elements = drupal_get_form(update_script_selection_form);
    • 36. Demo Time! ... target definition, installation,updating, destroying, switching version