43
Core Crazy Shaun Haber Warner Bros. Records

BADCamp 2008 Core Crazy

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: BADCamp 2008 Core Crazy

Core CrazyShaun Haber

Warner Bros. Records

Page 2: BADCamp 2008 Core Crazy

What is it?

• Basically, a look into how Warner Bros. Records uses Drupal!

Page 3: BADCamp 2008 Core Crazy

Who the hell am I?

Page 4: BADCamp 2008 Core Crazy
Page 5: BADCamp 2008 Core Crazy
Page 6: BADCamp 2008 Core Crazy

Warner Music Group

Page 7: BADCamp 2008 Core Crazy

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!

Page 8: BADCamp 2008 Core Crazy

So what?

Page 9: BADCamp 2008 Core Crazy

WBR Tech

• Only label with an in-house Tech team

• “Start-up” mentality

• Fast-paced, hectic, and fun!

• We use Drupal... religiously

Page 10: BADCamp 2008 Core Crazy

93 Drupal Sites1 new site every week

Page 11: BADCamp 2008 Core Crazy

Launching like crazy!

Page 12: BADCamp 2008 Core Crazy
Page 13: BADCamp 2008 Core Crazy
Page 14: BADCamp 2008 Core Crazy

How do we do it?

Page 15: BADCamp 2008 Core Crazy

It’s not magic!

Page 16: BADCamp 2008 Core Crazy

Give each website its own vhost!

Page 17: BADCamp 2008 Core Crazy

Drupal core and vhosts

Conf:DocumentRoot /path/to/drupal/core

BAD

Page 18: BADCamp 2008 Core Crazy

Drupal core and vhostsConf:DocumentRoot /path/to/website

File System:/path/to/website -> /path/to/drupal/core

GOOD

Page 19: BADCamp 2008 Core Crazy

Why?

• Flexibility

• Maintainability

• Core Crazy!

Page 20: BADCamp 2008 Core Crazy

Remember these items

• Apache’s mod_vhost_alias

• Symbolic links

• Subversion

• Drupal’s CVS

• Shell scripts

Page 21: BADCamp 2008 Core Crazy

Mod_vhost_alias

• Dynamic vhosts!

Page 22: BADCamp 2008 Core Crazy

It’s a VirtualDocumentRoot

Page 23: BADCamp 2008 Core Crazy

VirtualDocumentRoot /websites/%0

iamlights.com /websites/iamlights.com

ericbenet.net /websites/ericbenet.net

tour.remhq.com /websites/tour.remhq.com

Page 24: BADCamp 2008 Core Crazy

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

Page 25: BADCamp 2008 Core Crazy

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)

Page 26: BADCamp 2008 Core Crazy

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

Page 28: BADCamp 2008 Core Crazy

Source: http://flickr.com/photos/iguanajo/109613363

Symbolic Links

Page 29: BADCamp 2008 Core Crazy

ln -s /path/to/src alias

Page 30: BADCamp 2008 Core Crazy

iamlights.com

/drupal/5.10

/drupal/5.11

Page 31: BADCamp 2008 Core Crazy

iamlights.com

/drupal/5.10

/drupal/5.11

Simply change the symlink!

Page 32: BADCamp 2008 Core Crazy

/drupal/5.10

/drupal/5.11

/drupal/shared

/sites

/sites

/sites

Page 33: BADCamp 2008 Core Crazy

/drupal/5.10

/drupal/5.11

/drupal/shared

/sites

/sites

/sites

All cores share some stuff!

Page 34: BADCamp 2008 Core Crazy

/drupal/shared

/sites

/lights

/sites/lights

/settings.php

/modules/themes

Page 35: BADCamp 2008 Core Crazy

/drupal/shared

/sites

/lights

/sites/lights

/settings.php

/modules/themes

/iamlights.com

/iamlights.wbrdev.com

Dev and Prod envs!

Page 36: BADCamp 2008 Core Crazy

/sites/lights

/settings.php

/modules

/drupal/modules/contrib

/cck

/5.x-1.6

/5.x-1.7

/cck

Page 37: BADCamp 2008 Core Crazy

/sites/lights

/settings.php

/modules

/drupal/modules/contrib

/cck

/5.x-1.6

/5.x-1.7

/cck

Simply change the symlink!

Page 38: BADCamp 2008 Core Crazy

/drupal/shared

/sites/all

/modules

/drupal/modules/contrib

/admin_menu

/5.x-2.5

Safe modules in sites/all

Page 39: BADCamp 2008 Core Crazy

It’s symlink madness!

Page 40: BADCamp 2008 Core Crazy

Subversion

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

Page 41: BADCamp 2008 Core Crazy

Drupal CVS

• http://cvs.drupal.org/viewvc.py/drupal/

Page 42: BADCamp 2008 Core Crazy

Shell Script