SlideShare a Scribd company logo
Drupal Portugal
 “Deploy to production on Drupal”
       18.06.2011 - Lisbon - Portugal




                     1
                                        Paulo Gomes - www.pauloamgomes.net
Updating Drupal
Specific updates on:
   Modules
   Themes
   Content
   Core
Multi sites feature – same Drupal Core, different
sites




                     2
Updating Drupal (cont)
Filesystem
    PHP Code (Templates, includes,...)
    Static files (CSS, JS, Media files)
    Configuration files (.htaccess files, settings.php)
Database
    Configuration
    Content
    Caches




                      3
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
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
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
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
Tools (cont)
Syncing..Syncing..files
   Drush
   Rsync, Unison, etc..
Versioning
   Svn, Mercurial, Git
Syncing again…database
   Mysql
   Drush
   Back & Migrate Drupal Module



                   8
Tools (cont)
Syncing..Syncing..files
  Drush
   $
drush
rsync
@dev.mysite

   @local.mysite

   $
drush
rsync
./

   @local.mysite:%files/img



   




   Rsync, Unison, etc..
   rsync
‐avz
‐e
ssh
/www/.
pauloamgomes@www.pauloamgomes.net:/www/.

   ‐‐exclude
".DS_Store"
‐‐exclude
".localized"

‐‐exclude
".hg"




                                 9
Tools (cont)
Syncing again…database

  Mysql
  $
mysqldump
‐‐opt
db_name
>
db.dump.sql

  $
mysql
‐‐database=db_name
‐u
drupal
‐pdb_pass

<
db.dump.sql


  Drush
  $
drush
sql‐dump
‐‐result‐file=db.dump.sql

  $
`drush
sql
connect`
<
db.dump.sql

  $
drush
sql‐sync
@dev.mysite
@local.mysite
‐‐sanitize




  Backup & Migrate Drupal Module
                            10
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
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
A simple usecase (cont)




           13
A simple usecase (cont)




           14
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
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
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
Share your ideas!


        18
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
References

http://www.leveltendesign.com/blog/dustin-currie/synchronize-one-drupal-site-to-another

http://civicactions.com/blog/2011/may/31/drupal_quality_assurance_with_dev_qa_live

http://groups.drupal.org/node/56228

http://greenbeedigital.com.au/content/drupal-deployments-workflows-version-control-drushmake-
and-aegir

http://nathan.rambeck.org/blog/7-using-drush-load-database-file




                                       20

More Related Content

KEY
Drupal on your laptop
PDF
Speed up Drupal development with Drush
PDF
Microsoft SQL Server with Linux and Docker
PDF
Apache2 BootCamp : Getting Started With Apache
PDF
Scaling symfony apps
ODP
Drupal database Mssql to MySQL migration
PDF
Common Pitfalls for your Drupal Site, and How to Avoid Them
PDF
Introduction to Drupal - Installation, Anatomy, Terminologies
Drupal on your laptop
Speed up Drupal development with Drush
Microsoft SQL Server with Linux and Docker
Apache2 BootCamp : Getting Started With Apache
Scaling symfony apps
Drupal database Mssql to MySQL migration
Common Pitfalls for your Drupal Site, and How to Avoid Them
Introduction to Drupal - Installation, Anatomy, Terminologies

What's hot (20)

PDF
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
PDF
Drupal 8: frontend development
PPTX
Dc kyiv2010 jun_08
PPT
Speeding Up The Snail
PDF
Building Your Own Drupal Distribution
PDF
How to Use the Command Line to Increase Speed of Development
PDF
Improving your Drupal 8 development workflow DrupalCampLA
PDF
REST in pieces
PDF
Drupal 8 update & drush: October 2014
PDF
Drupal 8 Vocab Lesson
PDF
Entity cache
PPT
How a Content Delivery Network Can Help Speed Up Your Website
PDF
Drupal Presentation for CapitalCamp 2011: Features Driven Development
PPTX
Clustered PHP - DC PHP 2009
PPTX
Drush for drupal website builder
PDF
Nuvola: a tale of migration to AWS
PDF
PDF
CI workflow in a web studio
PPT
Drupal Performance - SerBenfiquista.com Case Study
PDF
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Drupal 8: frontend development
Dc kyiv2010 jun_08
Speeding Up The Snail
Building Your Own Drupal Distribution
How to Use the Command Line to Increase Speed of Development
Improving your Drupal 8 development workflow DrupalCampLA
REST in pieces
Drupal 8 update & drush: October 2014
Drupal 8 Vocab Lesson
Entity cache
How a Content Delivery Network Can Help Speed Up Your Website
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Clustered PHP - DC PHP 2009
Drush for drupal website builder
Nuvola: a tale of migration to AWS
CI workflow in a web studio
Drupal Performance - SerBenfiquista.com Case Study
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Ad

Similar to Drupal Meetup Lisbon (20)

PDF
DrupalCampLA 2011: Drupal backend-performance
PPTX
Drupal Backend Performance and Scalability
PDF
Intro to drupal_7_architecture
PPT
How to? Drupal developer toolkit. Dennis Povshedny.
PDF
Puppet for Sys Admins
PDF
Introduction to PowerShell
PDF
Drupal performance and scalability
PDF
Containerization Is More than the New Virtualization
ODP
Drupal development
PPTX
Harmonious Development: Via Vagrant and Puppet
PDF
Ansible new paradigms for orchestration
PDF
Drupal 8 improvements for developer productivity php symfony and more
PDF
Developing IT infrastructures with Puppet
PDF
大規模サイトにおけるユーザーレベルのキャッシュ活用によるパフォーマンスチューニング
ODP
Configuration Management and Salt
PDF
Puppet for SysAdmins
PPTX
Intro to advanced web development
PPTX
2 Hadoop 1.x presentation in understading .pptx
PDF
PowerShell for SharePoint Developers
PDF
NodeJS
DrupalCampLA 2011: Drupal backend-performance
Drupal Backend Performance and Scalability
Intro to drupal_7_architecture
How to? Drupal developer toolkit. Dennis Povshedny.
Puppet for Sys Admins
Introduction to PowerShell
Drupal performance and scalability
Containerization Is More than the New Virtualization
Drupal development
Harmonious Development: Via Vagrant and Puppet
Ansible new paradigms for orchestration
Drupal 8 improvements for developer productivity php symfony and more
Developing IT infrastructures with Puppet
大規模サイトにおけるユーザーレベルのキャッシュ活用によるパフォーマンスチューニング
Configuration Management and Salt
Puppet for SysAdmins
Intro to advanced web development
2 Hadoop 1.x presentation in understading .pptx
PowerShell for SharePoint Developers
NodeJS
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Empathic Computing: Creating Shared Understanding
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Understanding_Digital_Forensics_Presentation.pptx
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
Empathic Computing: Creating Shared Understanding

Drupal Meetup Lisbon

Editor's Notes