~$ DRUSH WORKSHOP_ Drupal Developer Days Barcelona                  Juan Pablo Novillo Requena (juampy)                   ...
About meJuan Pablo Novillo Requena (juampy)● Drupal Developer at● Maintainer of Twitter and OAuth.● Author of Drush Users ...
IntroductionDrush = Drupal + Shell = Drupal in thecommand line.Provides shortcuts to perform common tasks.Highly customiza...
Day to day tasks●   Clear caches and image styles●   Set a site to maintenance●   Download, enable and upgrade modules●   ...
Really cool tasks● Run commands in remote systems● Write custom commands/scripts● Customize your bashrc● Define configurat...
Run commands in remote systems● Site aliases● Pack site metadata and command settings in  an array● Details at drush topic...
Write custom commands/scripts● user-blocker example● Alter an existing command● drush php-eval and php-script commands● dr...
Customize your shell● drush topic docs-bashrc● drush cc all turns to cca● cdd @drupal.local > changes directory● Command a...
Define configuration files● drushrc.php files● Site | user | installation | site wide● Details at drush topic docs-configu...
Create your own distribution● drush make● Pack all Drupal dependencies and  configuration into an installation profile● Dr...
Establish policy rules● drush topic drush-policy● Define validation rules to avoid typing  mistakes or enforce security● p...
Installation● Windows users: use the installer● Unix/OSX: PEAR, package management  systems● Manually by downloading it or...
Architecture exampleDrush settings can be placed in several locations.       Level                        Possible locatio...
Resources● README.txt● drush topic● http://api.drush.org● IRC #drush● Help on the issue queue!
Thanks!● Lets find out our book winners.● Are there any questions?● My contact details:  ○ @juampy72  ○ http://drupal.org/...
Upcoming SlideShare
Loading in …5
×

Drush workshop

654 views

Published on

Drush Workshop at Drupal Developer Days Barcelona 2012

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
654
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Drush workshop

  1. 1. ~$ DRUSH WORKSHOP_ Drupal Developer Days Barcelona Juan Pablo Novillo Requena (juampy) 16th June 2012
  2. 2. About meJuan Pablo Novillo Requena (juampy)● Drupal Developer at● Maintainer of Twitter and OAuth.● Author of Drush Users Guide. Tweet with #drushworkshop to win a copy at the end.
  3. 3. IntroductionDrush = Drupal + Shell = Drupal in thecommand line.Provides shortcuts to perform common tasks.Highly customizable and extendable.Maintained by an outstanding team.
  4. 4. Day to day tasks● Clear caches and image styles● Set a site to maintenance● Download, enable and upgrade modules● Revert a feature● Run database updates● Backup/Restore a complete site● Run cron● Login as a specific user
  5. 5. Really cool tasks● Run commands in remote systems● Write custom commands/scripts● Customize your bashrc● Define configuration files● Create your own distribution● Establish policy rules
  6. 6. Run commands in remote systems● Site aliases● Pack site metadata and command settings in an array● Details at drush topic docs-aliases● Example at http://drupal.org/node/1401522 (google site alias example)
  7. 7. Write custom commands/scripts● user-blocker example● Alter an existing command● drush php-eval and php-script commands● drush-workshop-book example
  8. 8. Customize your shell● drush topic docs-bashrc● drush cc all turns to cca● cdd @drupal.local > changes directory● Command and site-alias autocompletion
  9. 9. Define configuration files● drushrc.php files● Site | user | installation | site wide● Details at drush topic docs-configuration● Shell Aliases (like Git aliases): drush pull● Command-specific options
  10. 10. Create your own distribution● drush make● Pack all Drupal dependencies and configuration into an installation profile● Drupal Commerce installation profile● use drush generate-makefile to create an skeleton of your sites dependencies
  11. 11. Establish policy rules● drush topic drush-policy● Define validation rules to avoid typing mistakes or enforce security● policy.drush.inc has to be in the system that executes drush
  12. 12. Installation● Windows users: use the installer● Unix/OSX: PEAR, package management systems● Manually by downloading it or cloning the Git repository● Extra dependencies: php-cli
  13. 13. Architecture exampleDrush settings can be placed in several locations. Level Possible locationsSystem-wide /etc/drushUser-wide /home/juampy/.drushAll sites within a sites/all/drushDrupal installation sites/all/modules/custom/mymoduleSpecific to a Drupal /var/www/mysite/sites/mysite.comsite
  14. 14. Resources● README.txt● drush topic● http://api.drush.org● IRC #drush● Help on the issue queue!
  15. 15. Thanks!● Lets find out our book winners.● Are there any questions?● My contact details: ○ @juampy72 ○ http://drupal.org/user/682736 ○ http://linkedin.com/in/juampy

×