Drupal distributions - how to build them

  • 2,019 views
Uploaded on

My slides for my presentation on Drupal distributions from @drupaldaysbxl .

My slides for my presentation on Drupal distributions from @drupaldaysbxl .

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,019
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
4

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.
      Drupal Distros – How To Build Them Dick Olsson a.k.a dixon_
  • 2. I'm dixon_ I work for NodeOne I contribute to Drupal I co-maintain NodeStream Who am I?
  • 3. What? Why? How? Demo! Tips! Questions? Agenda
  • 4. What is a Drupal distribution? What?
  • 5. Tailored product built on Drupal What?
  • 6. OpenAtrium, OpenPublish, Managing News, NodeStream, Drupal Commons, OpenScholar … What?
  • 7. Tailored needs Wider reach Quickly up and running Nice development workflow Why?
  • 8. … and because it's the future (www.angrylittletree.com) Why?
  • 9. Installable Configuration captured in code The difference?
  • 10. Complete product or platform? Choose your path. What's hard?
  • 11. Let's dig deep...
  • 12. What's inside? Configuration Install profile 3 rd party libs Projects Core
  • 13. Drush Make Profiler Exportables (Features, CTools) What tools?
  • 14. What's inside? Configuration Install profile 3 rd party libs Projects Core Features Profiler Drush Make
  • 15. Drush Make http://drupal.org/project/drush_make
  • 16. … is not a module, but a Drush extension Drush Make
  • 17. … is what drupal.org uses for packaging install profiles Drush Make
  • 18. … is located in the install profile A .make file
  • 19. … is a manifest for your distribution A .make file
  • 20. api = 2 core = 6.x projects[] = drupal … A .make file
  • 21. projects[ctools][version] = 1.8 projects[panels][version] = 3.9 … A .make file
  • 22. projects[views][download][type] = cvs projects[views][download][module] = contributions/modules/views projects[views][download][revision] = DRUPAL-6—3:2011-01-15 … A .make file
  • 23. projects[views][patch][] = http://drupal.org/files/issues/x.patch … A .make file
  • 24. libraries[jquery_ui][download][type] = get libraries[jquery_ui][download][url] = http://x.googlecode.com/files/x.zip libraries[jquery_ui][destination] = modules/jquery_ui libraries[jquery_ui][directory_name] = jquery.ui … A .make file
  • 25. Profiler http://drupal.org/project/profiler
  • 26. … is not a module, but a custom library Profiler
  • 27. … is what makes install profiles extendable Profiler
  • 28. … makes it easier to upgrade to Drupal 7 Profiler
  • 29. ./ ../ nodestream.info nodestream.install nodestream.make nodestream.profile Profiler
  • 30. name = NodeStream description = NodeStream profile. core = 6.x theme = ns_theme … nodestream.info
  • 31. dependencies[] = ctools dependencies[] = panels dependencies[] = views … nodestream.info
  • 32. nodes[1][type] = "ns_article" nodes[1][language] = "en" nodes[1][title] = "Lorem" nodes[1][name] = "writer" nodes[1][status] = "1" nodes[1][comment] = "2" nodes[1][field_x][0][value] = "Ipsum” … nodestream.info
  • 33. /** * Implementation of hook_install(). */ function nodestream_install() { db_query('TRUNCATE {blocks}'); } nodestream.install
  • 34. Exportables http://drupal.org/project/features http://drupal.org/project/ctools
  • 35. … are a concept that Features and CTools implement well Exportables
  • 36. … are configurations captured in code, often as modules Exportables
  • 37. … make deployments easier Exportables
  • 38. Views, Panels, Node types, CCK fields, ImageCache, Rules, Menus, Permissions, Roles, Variables, etc. Exportables
  • 39. $view = new view; $view->name = 'ns_article_byline'; $view->description = ''; $view->tag = 'nodestream'; … Exportables
  • 40. How to build and install a distribution Demonstration
  • 41. Tips
  • 42. Drush Make: Use fixed project versions in your .make file Tip #1
  • 43. Install profile: Keep it minimal, it's not upgradeable Tip #2
  • 44. Install profile: Create a test profile that extends the distribution profile Tip #3
  • 45. Exportables: Organize by functionality and follow KIT http://drupal.org/project/kit Tip #4
  • 46. Features should only care of them selfs Avoid global variables and permissions Avoid problematic components Tip #4 continued...
  • 47. Taxonomy Fieldgroups Input formats WYSIWYG Nodequeue Tip #4 continued...
  • 48. Exportables: It's OK to rely on “broken” handlers Tip #5
  • 49. Panels assembles a lot of features Handlers are made to fail silently Tip #5 continued...
  • 50. Thank you! Questions? drupal.org/user/239911 twitter.com/dickolsson