This document discusses deploying Drupal sites to production. It covers updating modules, themes, content and Drupal core across environments. It recommends using staging environments identical to live and automated deployments for zero downtime. Various tools are presented for syncing files and databases between environments like Drush, rsync, Git and MySQL dump/restore. A use case demonstrates maintaining a small multi-environment site using these techniques.
4. Environments
DEV
Low stability
Developers usage
Not always identical to live
QA/Staging
Testing, new functionalities validation
Need to be identical to live
Live/Production
No downtimes allowed
Content up to date
Errors have high impact on business side
4
5. What wee need?
Staging must be 100% identical to live
Few downtimes or zero downtime
Error proof
Full automated deploy to live
Simple and clean process
5
6. Approaches
Different approaches = different results
Different ways
Full automated
Semi Automated + manual steps
Same results
At the end all data is synced
Different downtimes
Automated means faster
Automated means less errors
6
7. Tools
A Ninja uses not one, but various tools
Every tool as own skills
Many tools for same achievement, get focus only
in one
Different environments
“Unixes”: Apple OS X, Linux, Solaris, …
MS Windows
A final solution is a mix of tools, each one has its
own importance
7
11. A simple Usecase
Maintaining a small site
Some nodes with custom CCK
Increasing nodes via Feeds
Blog (CCK content and media files)
Local Dev/staging environment
Remote Live environment
Shared hosting
SSH/SFTP access
11
12. A simple usecase (cont)
Dev/Stg
Local machine running an AMP Stack (Acquia
Stack) on OSX
Apache on port 8082 (Acquia rule), using ipf w
for port for warding (80 8082)
Unix tools (rsync, etc..)
Mercurial Version Control
Live
Shared hosting with ssh access
Limited soft ware (perl, ruby gems)
Limited configurations (no php.ini access)
12
15. More complex sites
Complexity means more probability for errors and higher
downtimes
Downsizing environments
Same Operating System and soft ware versions
Same paths
Same configurations
Mysql, Apache
Same tools
Use of virtual environments
Build tools (ant, phing)
Virtual machines
Use of cloud services
15
16. More complex sites (cont)
Continuous integration
Full automation, with high granularity
Test..test..test..and test again
Fix errors and test again
Deploy to live (and test again)
16
17. Nice to have…
Updates without maintenance mode
Cache all for visitors/users (varnish help?!)
No cache mode for sanity checks (admin mode)
Rollback without impacts (visitors only see
cached pages)
Delta updates on database schema
Validation on dependencies
All operations in same command (drush)
Better update tool (update.php)
17
19. About me
I consider myself a
newbie on Drupal with
one year experience
using Drupal 6 and
more recently Drupal 7.
Any question please be
free to contact me.
19