1

Drush 3.0: More Powerful, Flexible, and Magical

http://developmentseed.org
Some examples of what you can do with the latest Drush

Over the last few years Drush has matured significantly and has seen an incredible uptake in usage. It's become indispensable in the day to day workflow of innumerable Drupal users and has been accepted with open arms by contributed module developers who are finding new and wonderful functionality to expose via its clear command line interface.

What not many people realize is that beneath this simple command line API beats the heart of a far more flexible and powerful beast. Drush was written with re-use and scriptability in mind, with this entire concept deeply ingrained in its design, and this is a large part of what gives it its power and flexibility. This will be even more apparent in Drush 3.0.

Below is a rundown of some useful things you'll be able to do with Drush 3.0.

Remote procedure calling

Each Drush command can be called from within any other Drush command, spawning a new process and returning structured and meaningful information to the calling script. A more accurate terminology would be that Drush commands all operate on a somewhat RESTful API , which is similar to XMLRPC and other RPC mechanisms that you may already be familiar with. Because of how this feature is implemented in Drush it can not only call Drush commands locally, but it can also call Drush commands on a remote server via SSH.

Up until now this functionality has been hidden within the API and only systems such as Aegir really made use of it. For example, in the Aegir hosting system we re-use the drush updatedb command when we do site migration and to run updates, and we have a single drush provision-backup command we can simply call when we need to make a backup.

What about security on remote calls?

Remote Drush calls run over SSH and require you to have your key already added to the remote server's list of authorized keys. Therefore Drush isn't capable of doing anything that you don't have the necessary permissions to log in manually and do on the server itself. It just does what it does best - automate away some of the steps so you get your results quicker.

Read »
Created by development_seed 1 year 48 weeks ago – Made popular 1 year 48 weeks ago
Category: Modules   Tags:

PSD to Drupal Theme

Drupal Development

Module Development

Get an Estimate

Recent comments