14. Directory Structure
• Directory of web roots
• Directory of Drupal cores
• Directory of contributed (and custom) modules
• Directory of Drupal sites
• All pieced together by symbolic links!
Tuesday, February 10, 2009
29. Serving external pages?
★ http://theveronicas.com/foo
★ http://disturbed1.com/foo
• Problem: These should be two separate pages.
How to implement using a shared code-base?
• Solution: Don’t place site-exclusive files in Drupal root.
Instead, place each file in a dedicated location and tell
Apache to check there first.
Tuesday, February 10, 2009
34. Use a symlink for files
Read by Akamai’s servers
Tuesday, February 10, 2009
35. Cron
• Run cron as a command-line PHP script.
• Input list of sites and run cron for each site.
Tuesday, February 10, 2009
36. Environment Setup
Recap
• DNS • Serving external pages
• Apache mod_vhost_alias • Using a CDN
• Directory structure • Cron
• Shared code-base
• Symbolic links
• Monikers
Tuesday, February 10, 2009
37. My short talk
1. Background of Drupal at WBR
2. Environment setup
3. Development workflow
4. Site implementation
Tuesday, February 10, 2009
38. Development Workflow
• Subversion repository
• Provisioning a dev site
• Development cycle
• Deploying a site
• Development on a production site
• Database synchronization
Tuesday, February 10, 2009
40. Provisioning a Dev site
• Name the site (moniker!).
• Create vhost.
• SVN Copy skel site folder.
• Create symlink(s) in drupal sites folder.
• Create database.
• Populate settings.php.
• Run install.php.
Tuesday, February 10, 2009
41. Development Cycle
SVN
update
update
update
commit
Local Dev Prod
Tuesday, February 10, 2009
45. Database
• Mysqldump + gzip + scp
• Search/Replace dev environment strings
• UPDATE files SET filepath = REPLACE(filepath,
‘mutemath.wbrdev.com’, ‘mutemath’
• UPDATE system SET filename = REPLACE(filename,
‘mutemath.wbrdev.com’, ‘mutemath’
• Create and populate settings.php file
Tuesday, February 10, 2009
46. Files
• Tar + gzip + scp
• RewriteRules for CDN
Tuesday, February 10, 2009
47. Configs
• Change file paths
• Turn on caching
• Turn off error log to display
• Disable devel and watchdog modules
• Etc.
Tuesday, February 10, 2009
48. Development on a Production site
• Code already handled by SVN
• Take snapshot of production DB, copy to dev
• Copy files over to dev
• Change paths, configs
• Obfuscate email addresses
• Take note of date and sequences table (D5 only)
Tuesday, February 10, 2009
49. Database Synchronization
1. Take dev site down
2. Shift sequenced IDs on Dev
3. Take prod site down
4. Merge content from Prod to Dev
5. QA “new” dev site
6. Copy dev site to prod site
7. Bring “new” prod site live
Tuesday, February 10, 2009
58. Development Workflow
Recap
• Subversion repository
• Provisioning a dev site
• Development cycle
• Deploying a site
• Development on a production site
• Database synchronization
Tuesday, February 10, 2009
59. My short talk
1. Background of Drupal at WBR
2. Environment setup
3. Development workflow
4. Site implementation
Tuesday, February 10, 2009
61. Asyncronous Data
Processing
• Pull model
• Push model
Tuesday, February 10, 2009
62. Pull model
• Create a site node type
• Stores db info, document root, URL, 3rd-party API
keys, etc.
• Create acquisition layer
• Aggregate data
• Generate views
Tuesday, February 10, 2009
63. 01Detail Module Overview
Shaun Haber
Fri Jan 16 2009
Report Filtered View
Chart
Aggregator
Vendor API Bootstrap Query Env Master User
(Service) (XML-RPC) (MySQL) (OS) (API)
Site List
Tuesday, February 10, 2009
64. Push model
• Setup site with actions and triggers.
• Setup a message queue system (Spread Toolkit).
• Asynchronously send data via Spread daemon for further
processing.
• XML-RPC callback to the site when data processing
completes.
Tuesday, February 10, 2009
65. Questions?
Shaun Haber
shaun.haber@wbr.com
Lead architect, developer, administrator
for Warner Bros. Records
Tuesday, February 10, 2009