Core Crazy
   Shaun Haber
Warner Bros. Records
What is it?


• Basically, a look into how Warner Bros.
  Records uses Drupal!
Who the hell am I?
Warner Music Group
Warner Bros. Records

• Subsidiary of Warner Music Group
• Family of labels (Reprise, Sire, etc.)
• Over 100 artists
• Top...
So what?
WBR Tech

• Only label with an in-house Tech team
• “Start-up” mentality
• Fast-paced, hectic, and fun!
• We use Drupal......
93 Drupal Sites
  1 new site every week
Launching like crazy!
How do we do it?
It’s not magic!
Give each website its
     own vhost!
Drupal core and vhosts
  Conf:
  DocumentRoot /path/to/drupal/core




             BAD
Drupal core and vhosts
    Conf:
    DocumentRoot /path/to/website


 File System:
 /path/to/website -> /path/to/drupal/co...
Why?

• Flexibility
• Maintainability
• Core Crazy!
Remember these items

   • Apache’s mod_vhost_alias
   • Symbolic links
   • Subversion
   • Drupal’s CVS
   • Shell scrip...
Mod_vhost_alias


   • Dynamic vhosts!
It’s a
VirtualDocumentRoot
VirtualDocumentRoot /websites/%0


     iamlights.com    /websites/iamlights.com

     ericbenet.net    /websites/ericbene...
Why this kicks ass!

• Don’t need to edit conf
• Don’t need to add new vhosts
• Don’t need to restart Apache!
• Seriously,...
2 part domain:
VirtualDocumentRoot /websites/%0/www


 iamlights.com   /websites/iamlights.com/www

 ericbenet.net   /webs...
3 part domain:
 VirtualDocumentRoot /websites/%2+/%1


www.iamlights.com   /websites/iamlights.com/www

www.ericbenet.net ...
http://httpd.apache.org/
     docs/2.0/mod/
 mod_vhost_alias.html
Source: http://flickr.com/photos/iguanajo/109613363




Symbolic Links
ln -s /path/to/src alias
/drupal/5.10


iamlights.com


                /drupal/5.11
Simply change the symlink!


                            /drupal/5.10


iamlights.com


                            /drupa...
/drupal/5.10

         /sites

 /drupal/5.11

         /sites


/drupal/shared

         /sites
All cores share some stuff!
 /drupal/5.10

         /sites

 /drupal/5.11

         /sites


/drupal/shared

         /sit...
/drupal/shared

         /sites
             /lights




 /sites/lights

    /settings.php
      /modules
       /themes
/drupal/shared                  Dev and Prod envs!
          /sites
              /lights
          /iamlights.com
       ...
/sites/lights

    /settings.php
      /modules
            /cck



/drupal/modules/contrib

                    /cck
    ...
/sites/lights                  Simply change the symlink!
    /settings.php
      /modules
            /cck



/drupal/mod...
/drupal/shared              Safe modules in sites/all
        /sites/all
            /modules




/drupal/modules/contrib
...
It’s symlink madness!
Subversion

• /drupal5x
   /cores
   /sites
   /modules
     /contrib
     /custom
Drupal CVS


• http://cvs.drupal.org/viewvc.py/drupal/
Shell Script
Questions?
• Shaun Haber
  shaun.haber@wbr.com

  http://srhaber.com
  Twitter: @srhaber
BADCamp 2008 Core Crazy
BADCamp 2008 Core Crazy
BADCamp 2008 Core Crazy
BADCamp 2008 Core Crazy
Upcoming SlideShare
Loading in …5
×

BADCamp 2008 Core Crazy

1,087 views

Published on

http://badcamp.net/session/core-crazy

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,087
On SlideShare
0
From Embeds
0
Number of Embeds
17
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

BADCamp 2008 Core Crazy

  1. 1. Core Crazy Shaun Haber Warner Bros. Records
  2. 2. What is it? • Basically, a look into how Warner Bros. Records uses Drupal!
  3. 3. Who the hell am I?
  4. 4. Warner Music Group
  5. 5. Warner Bros. Records • Subsidiary of Warner Music Group • Family of labels (Reprise, Sire, etc.) • Over 100 artists • Top-selling albums • It’s music biz after all!
  6. 6. So what?
  7. 7. WBR Tech • Only label with an in-house Tech team • “Start-up” mentality • Fast-paced, hectic, and fun! • We use Drupal... religiously
  8. 8. 93 Drupal Sites 1 new site every week
  9. 9. Launching like crazy!
  10. 10. How do we do it?
  11. 11. It’s not magic!
  12. 12. Give each website its own vhost!
  13. 13. Drupal core and vhosts Conf: DocumentRoot /path/to/drupal/core BAD
  14. 14. Drupal core and vhosts Conf: DocumentRoot /path/to/website File System: /path/to/website -> /path/to/drupal/core GOOD
  15. 15. Why? • Flexibility • Maintainability • Core Crazy!
  16. 16. Remember these items • Apache’s mod_vhost_alias • Symbolic links • Subversion • Drupal’s CVS • Shell scripts
  17. 17. Mod_vhost_alias • Dynamic vhosts!
  18. 18. It’s a VirtualDocumentRoot
  19. 19. VirtualDocumentRoot /websites/%0 iamlights.com /websites/iamlights.com ericbenet.net /websites/ericbenet.net tour.remhq.com /websites/tour.remhq.com
  20. 20. Why this kicks ass! • Don’t need to edit conf • Don’t need to add new vhosts • Don’t need to restart Apache! • Seriously, this rocks
  21. 21. 2 part domain: VirtualDocumentRoot /websites/%0/www iamlights.com /websites/iamlights.com/www ericbenet.net /websites/ericbenet.net/www tour.remhq.com (see next slide)
  22. 22. 3 part domain: VirtualDocumentRoot /websites/%2+/%1 www.iamlights.com /websites/iamlights.com/www www.ericbenet.net /websites/ericbenet.net/www tour.remhq.com /websites/remhq.com/tour
  23. 23. http://httpd.apache.org/ docs/2.0/mod/ mod_vhost_alias.html
  24. 24. Source: http://flickr.com/photos/iguanajo/109613363 Symbolic Links
  25. 25. ln -s /path/to/src alias
  26. 26. /drupal/5.10 iamlights.com /drupal/5.11
  27. 27. Simply change the symlink! /drupal/5.10 iamlights.com /drupal/5.11
  28. 28. /drupal/5.10 /sites /drupal/5.11 /sites /drupal/shared /sites
  29. 29. All cores share some stuff! /drupal/5.10 /sites /drupal/5.11 /sites /drupal/shared /sites
  30. 30. /drupal/shared /sites /lights /sites/lights /settings.php /modules /themes
  31. 31. /drupal/shared Dev and Prod envs! /sites /lights /iamlights.com /iamlights.wbrdev.com /sites/lights /settings.php /modules /themes
  32. 32. /sites/lights /settings.php /modules /cck /drupal/modules/contrib /cck /5.x-1.6 /5.x-1.7
  33. 33. /sites/lights Simply change the symlink! /settings.php /modules /cck /drupal/modules/contrib /cck /5.x-1.6 /5.x-1.7
  34. 34. /drupal/shared Safe modules in sites/all /sites/all /modules /drupal/modules/contrib /admin_menu /5.x-2.5
  35. 35. It’s symlink madness!
  36. 36. Subversion • /drupal5x /cores /sites /modules /contrib /custom
  37. 37. Drupal CVS • http://cvs.drupal.org/viewvc.py/drupal/
  38. 38. Shell Script
  39. 39. Questions? • Shaun Haber shaun.haber@wbr.com http://srhaber.com Twitter: @srhaber

×