SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
~$ DRUSH WORKSHOP_


 Drupal Developer Days Barcelona

                  Juan Pablo Novillo Requena (juampy)
                                        16th June 2012
About me
Juan Pablo Novillo Requena (juampy)


● Drupal Developer at

● Maintainer of Twitter and OAuth.

● Author of Drush User's Guide.
  Tweet with #drushworkshop to
  win a copy at the end.
Introduction


Drush = Drupal + Shell = Drupal in the
command line.

Provides shortcuts to perform common tasks.

Highly customizable and extendable.

Maintained by an outstanding team.
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
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
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)
Write custom commands/scripts


● user-blocker example

● Alter an existing command

● drush php-eval and php-script commands

● drush-workshop-book example
Customize your shell


● drush topic docs-bashrc

● drush cc all turns to cca

● cdd @drupal.local > changes directory

● Command and site-alias autocompletion
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
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 site's dependencies
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
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
Architecture example

Drush settings can be placed in several locations.

       Level                        Possible locations
System-wide            /etc/drush
User-wide
                       /home/juampy/.drush

All sites within a     sites/all/drush
Drupal installation    sites/all/modules/custom/mymodule
Specific to a Drupal
                       /var/www/mysite/sites/mysite.com
site
Resources

● README.txt

● drush topic

● http://api.drush.org

● IRC #drush

● Help on the issue queue!
Thanks!

● Let's find out our book winners.

● Are there any questions?

● My contact details:

  ○ @juampy72

  ○ http://drupal.org/user/682736

  ○ http://linkedin.com/in/juampy

Mais conteúdo relacionado

Destaque

Drush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилDrush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек Михаил
PVasili
 
Drush installation guide
Drush installation guideDrush installation guide
Drush installation guide
Thierno Fall
 
Depolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and CapistranoDepolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and Capistrano
libsys
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
jcarrig
 

Destaque (17)

Getting started with Drupal 8
Getting started with Drupal 8Getting started with Drupal 8
Getting started with Drupal 8
 
Drush Presentation
Drush PresentationDrush Presentation
Drush Presentation
 
Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013
 
Composer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptComposer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.ppt
 
Managing Drupal on Windows with Drush
Managing Drupal on Windows with DrushManaging Drupal on Windows with Drush
Managing Drupal on Windows with Drush
 
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on Windows
 
Drush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилDrush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек Михаил
 
Drush installation guide
Drush installation guideDrush installation guide
Drush installation guide
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 Migration
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
 
Depolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and CapistranoDepolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and Capistrano
 
Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014
 
Automation testing with Drupal 8
Automation testing with Drupal 8Automation testing with Drupal 8
Automation testing with Drupal 8
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
 

Semelhante a Drush workshop

Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
kbasarab
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
Chris Tankersley
 
Drush&drupal. administration
Drush&drupal. administrationDrush&drupal. administration
Drush&drupal. administration
zabej
 
Drush and drupal. администрирование волчек михаил
Drush and drupal. администрирование  волчек михаилDrush and drupal. администрирование  волчек михаил
Drush and drupal. администрирование волчек михаил
drupalconf
 

Semelhante a Drush workshop (20)

Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Hong Kong Drupal User Group - Introduction of Drush
Hong Kong Drupal User Group - Introduction of DrushHong Kong Drupal User Group - Introduction of Drush
Hong Kong Drupal User Group - Introduction of Drush
 
Beginning Drush
Beginning DrushBeginning Drush
Beginning Drush
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
 
A Drush Primer - DrupalCamp Chattanooga 2013
A Drush Primer - DrupalCamp Chattanooga 2013A Drush Primer - DrupalCamp Chattanooga 2013
A Drush Primer - DrupalCamp Chattanooga 2013
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Drupal + composer = new love !?
Drupal + composer = new love !?Drupal + composer = new love !?
Drupal + composer = new love !?
 
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal StackDecoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and Aegir
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
 
Drush in the Composer Era
Drush in the Composer EraDrush in the Composer Era
Drush in the Composer Era
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Drush&drupal. administration
Drush&drupal. administrationDrush&drupal. administration
Drush&drupal. administration
 
drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010
 
Drush for drupal website builder
Drush for drupal website builderDrush for drupal website builder
Drush for drupal website builder
 
Drush and drupal. администрирование волчек михаил
Drush and drupal. администрирование  волчек михаилDrush and drupal. администрирование  волчек михаил
Drush and drupal. администрирование волчек михаил
 
Drush A beginners guide to a advanced tool.
Drush A beginners guide to a advanced tool.Drush A beginners guide to a advanced tool.
Drush A beginners guide to a advanced tool.
 

Mais de Juampy NR

Mais de Juampy NR (12)

GitHub Pull Request Builder for Drupal
GitHub Pull Request Builder for DrupalGitHub Pull Request Builder for Drupal
GitHub Pull Request Builder for Drupal
 
Por qué Drupal es un potente gestor de contenidos
Por qué Drupal es un potente gestor de contenidosPor qué Drupal es un potente gestor de contenidos
Por qué Drupal es un potente gestor de contenidos
 
Authentication in Drupal 8 - DrupalCamp Spain 2014
Authentication in Drupal 8 - DrupalCamp Spain 2014Authentication in Drupal 8 - DrupalCamp Spain 2014
Authentication in Drupal 8 - DrupalCamp Spain 2014
 
Trabajar en una empresa distribuida - DrupalCamp Mexico 2014
Trabajar en una empresa distribuida - DrupalCamp Mexico 2014Trabajar en una empresa distribuida - DrupalCamp Mexico 2014
Trabajar en una empresa distribuida - DrupalCamp Mexico 2014
 
Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014
 
Drupal 8 Authentication
Drupal 8 AuthenticationDrupal 8 Authentication
Drupal 8 Authentication
 
Symfony y Drupal - Drupal Day Santander 2013
Symfony y Drupal - Drupal Day Santander 2013Symfony y Drupal - Drupal Day Santander 2013
Symfony y Drupal - Drupal Day Santander 2013
 
Symfony y Drupal
Symfony y DrupalSymfony y Drupal
Symfony y Drupal
 
Git y drupal
Git y drupalGit y drupal
Git y drupal
 
Learn through the issue queue
Learn through the issue queueLearn through the issue queue
Learn through the issue queue
 
Taller de Simpletest - Drupal Day Valencia 2012
Taller de Simpletest - Drupal Day Valencia 2012Taller de Simpletest - Drupal Day Valencia 2012
Taller de Simpletest - Drupal Day Valencia 2012
 
Aegir: un Drupal para gobernarlos a todos
Aegir: un Drupal para gobernarlos a todosAegir: un Drupal para gobernarlos a todos
Aegir: un Drupal para gobernarlos a todos
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Drush workshop

  • 1. ~$ DRUSH WORKSHOP_ Drupal Developer Days Barcelona Juan Pablo Novillo Requena (juampy) 16th June 2012
  • 2. About me Juan Pablo Novillo Requena (juampy) ● Drupal Developer at ● Maintainer of Twitter and OAuth. ● Author of Drush User's Guide. Tweet with #drushworkshop to win a copy at the end.
  • 3. Introduction Drush = Drupal + Shell = Drupal in the command line. Provides shortcuts to perform common tasks. Highly customizable and extendable. Maintained by an outstanding team.
  • 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. 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. 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. Write custom commands/scripts ● user-blocker example ● Alter an existing command ● drush php-eval and php-script commands ● drush-workshop-book example
  • 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. 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. 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 site's dependencies
  • 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. 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. Architecture example Drush settings can be placed in several locations. Level Possible locations System-wide /etc/drush User-wide /home/juampy/.drush All sites within a sites/all/drush Drupal installation sites/all/modules/custom/mymodule Specific to a Drupal /var/www/mysite/sites/mysite.com site
  • 14. Resources ● README.txt ● drush topic ● http://api.drush.org ● IRC #drush ● Help on the issue queue!
  • 15. Thanks! ● Let's find out our book winners. ● Are there any questions? ● My contact details: ○ @juampy72 ○ http://drupal.org/user/682736 ○ http://linkedin.com/in/juampy