Local, Development, Stage, Production,
Huh?!Michael Anello
@ultimike
Thursday, January 31, 13
You can build a Drupal site. Good job.
Thursday, January 31, 13
You can also probably get it up-and-running
on a shared development server.
Thursday, January 31, 13
Thursday, January 31, 13
...and do it in a way that its content is up-to-
date
Thursday, January 31, 13
...and it is password-protected from prying
eyes
Thursday, January 31, 13
...and code updates stay in-sync with the
production server.
Thursday, January 31, 13
Also, don’t lose any content.
Thursday, January 31, 13
And do it quickly.
Thursday, January 31, 13
Thursday, January 31, 13
Setting up a production workflow
Thursday, January 31, 13
What do we want?
Thursday, January 31, 13
What do we want?
Thursday, January 31, 13
What do we want?
• Local development environment(s)
Thursday, January 31, 13
What do we want?
• Local development environment(s)
• Shared development environment
Thursday, January 31, 13
What do we want?
• Local development environment(s)
• Shared development environment
• Shared staging environment (optional)
Thursday, January 31, 13
What do we want?
• Local development environment(s)
• Shared development environment
• Shared staging environment (optional)
• Production environment
Thursday, January 31, 13
What do we want?
• Local development environment(s)
• Shared development environment
• Shared staging environment (optional)
• Production environment
• The ability to easily move code, data, and files between each.
Thursday, January 31, 13
The most important thing to remember...
Thursday, January 31, 13
Code flows up
Thursday, January 31, 13
Data flows downThursday, January 31, 13
Production
Stage
Development
Local(s)
Database/Files Code
Thursday, January 31, 13
Pretty picture, but how do I actually do that?
Thursday, January 31, 13
FTP
SSH
SCP
RSYNCDrush
Git
SVN
SFTP
Backup and
Migrate
mysqldump
Thursday, January 31, 13
There’s lots of options.
Thursday, January 31, 13
Let’s consider three of them...
Thursday, January 31, 13
Good(ish), Better, and Best.
Thursday, January 31, 13
Good(ish)
Thursday, January 31, 13
Good(ish)• Use FTP/SFTP to move code up and files
down
Thursday, January 31, 13
Good(ish)• Use FTP/SFTP to move code up and files
down
• Use the Backup and Migrate module to move databases down.
Thursday, January 31, 13
Good(ish)• Use FTP/SFTP to move code up and files
down
• Use the Backup and Migrate module to move databases down.
• Pro: it does the job (barely)
Thursday, January 31, 13
Good(ish)• Use FTP/SFTP to move code up and files
down
• Use the Backup and Migrate module to move databases down.
• Pro: it does the job (barely)
• Con: No (easy) way to keep track of what has been updated where.
Thursday, January 31, 13
Good(ish)• Use FTP/SFTP to move code up and files
down
• Use the Backup and Migrate module to move databases down.
• Pro: it does the job (barely)
• Con: No (easy) way to keep track of what has been updated where.
• Con: Easy to overwrite something and have no way back.
Thursday, January 31, 13
Better
Thursday, January 31, 13
Better• Use version control (git/svn) to move code
up
Thursday, January 31, 13
Better• Use version control (git/svn) to move code
up
• Use FTP/SFTP/SSH/SCP to move files down.
Thursday, January 31, 13
Better• Use version control (git/svn) to move code
up
• Use FTP/SFTP/SSH/SCP to move files down.
• Use the Backup and Migrate module to move databases down.
Thursday, January 31, 13
Better• Use version control (git/svn) to move code
up
• Use FTP/SFTP/SSH/SCP to move files down.
• Use the Backup and Migrate module to move databases down.
• Pro: it does the job
Thursday, January 31, 13
Better• Use version control (git/svn) to move code
up
• Use FTP/SFTP/SSH/SCP to move files down.
• Use the Backup and Migrate module to move databases down.
• Pro: it does the job
• Pro: relatively easy to revert code
Thursday, January 31, 13
Better• Use version control (git/svn) to move code
up
• Use FTP/SFTP/SSH/SCP to move files down.
• Use the Backup and Migrate module to move databases down.
• Pro: it does the job
• Pro: relatively easy to revert code
• Con: possible to overwrite database.Thursday, January 31, 13
Best
Thursday, January 31, 13
Best• Use version control (git/svn) to move code
up
Thursday, January 31, 13
Best• Use version control (git/svn) to move code
up
• Use Drush (aliases) rsync and sql-sync to move files down and database down.
Thursday, January 31, 13
Best• Use version control (git/svn) to move code
up
• Use Drush (aliases) rsync and sql-sync to move files down and database down.
• Pro: it does the job really, really, really well
Thursday, January 31, 13
Best• Use version control (git/svn) to move code
up
• Use Drush (aliases) rsync and sql-sync to move files down and database down.
• Pro: it does the job really, really, really well
• Pro: relatively easy to revert code
Thursday, January 31, 13
Best• Use version control (git/svn) to move code
up
• Use Drush (aliases) rsync and sql-sync to move files down and database down.
• Pro: it does the job really, really, really well
• Pro: relatively easy to revert code
• Pro: ability to put permission controls on each step
Thursday, January 31, 13
Best• Use version control (git/svn) to move code
up
• Use Drush (aliases) rsync and sql-sync to move files down and database down.
• Pro: it does the job really, really, really well
• Pro: relatively easy to revert code
• Pro: ability to put permission controls on each step
• Con: lots of learning to do!Thursday, January 31, 13
Resources
Thursday, January 31, 13
Resources
• Workflow for Solo Developers and Small Teams - presentation by Emma Jane Hogbin - http://tutr.tv/t6194
Thursday, January 31, 13