0
Drupal 7 Deployment Using Apache Ant Dmitriy Svetlichniy http://donetsk.drupal.ua
Drupal Cafe №2. Kharkiv Dmitriy Svetlichniy WDG Company Drupal 7 Deployment Using Apache Ant
Drupal Site Deployment. Problems Dev site Prod site ver. 2.0 ver. 1.0 Deployment
Main Deployment Task <ul><li>DON'T   LOSE </li></ul><ul><li>current site   CONTENT </li></ul><ul><li>and modules   SETTING...
Drupal Site Deployment. Problems <ul><li>Drupal site deployment: </li></ul><ul><li>Files – SVN, Git, FTP, SSH, etc. </li><...
Disclaimer <ul><li>If  YOU  have </li></ul><ul><li>any  suggestions </li></ul><ul><li>any  commentaries </li></ul><ul><li>...
Problem Solution <ul><li>Based on strict  agreement </li></ul><ul><li>of the separating DB tables </li></ul><ul><li>into <...
Problem Solution <ul><li>Step 1 </li></ul>settings data dev prod
Problem Solution <ul><li>Step 2 </li></ul>dev settings data variable variable prod
Problem Solution <ul><li>Step 3 </li></ul>settings data variable dev
Problem Solution <ul><li>Step 4 </li></ul>settings data dev prod
Algorithm Implementation <ul><li>Used technologies: </li></ul><ul><li>Drupal 7; </li></ul><ul><li>Apache Ant . </li></ul><...
Module Interface
Module Interface
Module Interface
Module functionality <ul><li>Form submit: </li></ul>Ant script directory: [site-path]  /sites/default/files/synchro/ Form ...
Module functionality <ul><li>Scanning for “variable_set()” </li></ul>
Apache Ant <ul><li>Installation  (for Ubuntu): </li></ul><ul><ul><ul><li>sudo apt-get install ant </li></ul></ul></ul><ul>...
Ant Script Functionality <ul><li>Script files: </li></ul><ul><ul><li>build.xml + .htaccess + compare.php </li></ul></ul><u...
Ant Script Functionality <ul><li>Target “merge_to_dev” (part 1): </li></ul><ul><ul><li>mkdir “backups” and “temp” </li></u...
Ant Script Functionality <ul><li>Target “merge_to_dev” (part 2): </li></ul><ul><ul><li>make settings + data dump (using my...
Testing Results <ul><li>Target “merge_to_dev”. </li></ul><ul><li>Time of Ant script runnings: </li></ul><ul><ul><li>Testin...
Summary <ul><li>Problem </li></ul><ul><li>Problem solution </li></ul><ul><li>Solution implementation: </li></ul><ul><ul><l...
Helpful Links <ul><li>You can download module by this link: </li></ul><ul><li>drupal.org/sandbox/wdg-company/1324828 </li>...
Drupal Cafe №2. Kharkiv <ul><li>Thank you! </li></ul>Skype: svetlichiyd E-mail:  [email_address] Sponsored by:
Upcoming SlideShare
Loading in...5
×

Drupal 7 Deployment Using Apache Ant. Dmitriy Svetlichniy.

1,561

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,561
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Drupal 7 Deployment Using Apache Ant. Dmitriy Svetlichniy."

  1. 1. Drupal 7 Deployment Using Apache Ant Dmitriy Svetlichniy http://donetsk.drupal.ua
  2. 2. Drupal Cafe №2. Kharkiv Dmitriy Svetlichniy WDG Company Drupal 7 Deployment Using Apache Ant
  3. 3. Drupal Site Deployment. Problems Dev site Prod site ver. 2.0 ver. 1.0 Deployment
  4. 4. Main Deployment Task <ul><li>DON'T LOSE </li></ul><ul><li>current site CONTENT </li></ul><ul><li>and modules SETTINGS </li></ul><ul><li>(f.e., for Google Analytics module) </li></ul>
  5. 5. Drupal Site Deployment. Problems <ul><li>Drupal site deployment: </li></ul><ul><li>Files – SVN, Git, FTP, SSH, etc. </li></ul><ul><li>DB – ? </li></ul>Dev site Prod site ver. 2.0 ver. 1.0 files db
  6. 6. Disclaimer <ul><li>If YOU have </li></ul><ul><li>any suggestions </li></ul><ul><li>any commentaries </li></ul><ul><li>found bugs </li></ul><ul><li>write here in Skype: </li></ul><ul><li>svetlichniyd </li></ul><ul><li>antonnavi </li></ul><ul><li>dovgiy-dmitriy </li></ul>
  7. 7. Problem Solution <ul><li>Based on strict agreement </li></ul><ul><li>of the separating DB tables </li></ul><ul><li>into </li></ul><ul><li>“ settings ” “ data ” </li></ul>
  8. 8. Problem Solution <ul><li>Step 1 </li></ul>settings data dev prod
  9. 9. Problem Solution <ul><li>Step 2 </li></ul>dev settings data variable variable prod
  10. 10. Problem Solution <ul><li>Step 3 </li></ul>settings data variable dev
  11. 11. Problem Solution <ul><li>Step 4 </li></ul>settings data dev prod
  12. 12. Algorithm Implementation <ul><li>Used technologies: </li></ul><ul><li>Drupal 7; </li></ul><ul><li>Apache Ant . </li></ul><ul><li>Developed tools: </li></ul><ul><li>Drupal 7 module “synchro”; </li></ul><ul><li>Apache Ant script “build.xml”. </li></ul>
  13. 13. Module Interface
  14. 14. Module Interface
  15. 15. Module Interface
  16. 16. Module functionality <ul><li>Form submit: </li></ul>Ant script directory: [site-path] /sites/default/files/synchro/ Form Data Ant Script
  17. 17. Module functionality <ul><li>Scanning for “variable_set()” </li></ul>
  18. 18. Apache Ant <ul><li>Installation (for Ubuntu): </li></ul><ul><ul><ul><li>sudo apt-get install ant </li></ul></ul></ul><ul><li>Apache Ant script structure (build.xml): </li></ul><ul><ul><li>XML </li></ul></ul><ul><ul><ul><li>project </li></ul></ul></ul><ul><ul><ul><ul><li>property </li></ul></ul></ul></ul><ul><ul><ul><ul><li>target </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>actions : echo, exec, mkdir... </li></ul></ul></ul></ul></ul>
  19. 19. Ant Script Functionality <ul><li>Script files: </li></ul><ul><ul><li>build.xml + .htaccess + compare.php </li></ul></ul><ul><li>Main script targets (tasks): </li></ul><ul><ul><li>merge_to_dev </li></ul></ul><ul><ul><li>deploy_db </li></ul></ul><ul><ul><li>restore_dev_db </li></ul></ul><ul><ul><li>restore_prod_db </li></ul></ul>
  20. 20. Ant Script Functionality <ul><li>Target “merge_to_dev” (part 1): </li></ul><ul><ul><li>mkdir “backups” and “temp” </li></ul></ul><ul><ul><li>DB structure dumps (using mysqldump) </li></ul></ul><ul><ul><li>compare DB structure (using compare.php) </li></ul></ul><ul><ul><li>compare tables structure (using diff tool) </li></ul></ul><ul><ul><li>DB dumps (using mysqldump) </li></ul></ul>
  21. 21. Ant Script Functionality <ul><li>Target “merge_to_dev” (part 2): </li></ul><ul><ul><li>make settings + data dump (using mysqldump) </li></ul></ul><ul><ul><li>merge setting with data on dev (using mysql) </li></ul></ul><ul><ul><li>make “variable” dump from live (using mysql) </li></ul></ul><ul><ul><li>merge “variable” on dev (using mysql) </li></ul></ul><ul><ul><li>flush dev caches (using get + synchro.module API) </li></ul></ul><ul><ul><li>clean temp folder </li></ul></ul>
  22. 22. Testing Results <ul><li>Target “merge_to_dev”. </li></ul><ul><li>Time of Ant script runnings: </li></ul><ul><ul><li>Testing on initial Drupal site: </li></ul></ul><ul><ul><ul><li>7-8 s </li></ul></ul></ul><ul><ul><li>Testing on 10 000 data nodes: </li></ul></ul><ul><ul><ul><li>40-45 s </li></ul></ul></ul><ul><ul><li>Testing on 100 000 data nodes: </li></ul></ul><ul><ul><ul><li>230-250 s </li></ul></ul></ul>
  23. 23. Summary <ul><li>Problem </li></ul><ul><li>Problem solution </li></ul><ul><li>Solution implementation: </li></ul><ul><ul><li>Drupal 7 module </li></ul></ul><ul><ul><li>Apache Ant script </li></ul></ul>
  24. 24. Helpful Links <ul><li>You can download module by this link: </li></ul><ul><li>drupal.org/sandbox/wdg-company/1324828 </li></ul><ul><li>http://drupal.org </li></ul><ul><li>http://ant.apache.org </li></ul><ul><li>http://ant.apache.org/manual </li></ul><ul><li>http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html </li></ul><ul><li>http://www.ubuntu.com/download </li></ul>
  25. 25. Drupal Cafe №2. Kharkiv <ul><li>Thank you! </li></ul>Skype: svetlichiyd E-mail: [email_address] Sponsored by:
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×