drush dl this | drush en that | drush vset this | drush vel that | drush QUIT PIPING SO MANY COMMANDS!

Experience level: 
Advanced
Session Track: 

Code and DevOps

This track is focused on developers and the back-end technologies to deal with today’s and future challenges. With the coming release of Drupal 8, as well as emerging Web technologies, preparation is essential. These sessions will help you learn how to deliver effective solutions to meet these needs.

Speaker(s): 

I have a theory that's proving to be true. Everyone using Drush is piping a billion commands together to automate tasks. We're using it in bash scripts, ansible / puppet / chef scripting, and good ol' copy and paste. But we're largely not just using drush commands in a vaccume. We're trying to accomplish something, something larger then the single command. The string of commands togehter form something new, something else that can be run as one.

Enter Drush Recipes.

Drush Recipes (DR) is a packaging format for Drush which is a replacement for command piping that can allow for complex chain automation to be accomplished in single commands. DR has several ingredient types that allow for everything from simple "drush en that"  to complex tokenized, looping and conditional ingredent routines.

Why Drush Recipes?

Drush recipes allow you to package, label, and share complex commandsets with other developers and non-developers. For example, I can tell someone to build a complex dev environment just by running drush cook btopro_dev --y. They don't need to understand what it does, just that it runs 100s of drush commands and builds a standard dev system.

DR isn't intended to replace Ansible and other formats, it's to augment them by keeping drupal logic more closely knit. It also plays nice with make files and can either be used with them or to replace them (cause most people don't just want to download your dependencies, they want to use them!). We're also working to automate and capture export / import of content and configuration so you can drop the over dependence on Features for Features sake!

Presentation

In this presentation I'll cover what Drush recipes is and show examples in practice. Examples to be shown:

  • DR in the wild (like Zurb foundation)
  • How you can use nested recipes to chain together development environments
  • Using Drush Target Differential to streamline your development workflows (multi-dev comparisons)
  • How ELMS Learning Network lazy loads recipes during system upgrades to contextually apply upgrades without authoring hook_update_N
  • How Nittany Vagrant uses recipes to jump start development of a new site based on common needs

Attendees will learn

  • How to use Drush recipes
  • How to get started doing more with less commands!
  • How to make their own commands with little effort via DVR and DWR commands
  • How to further automate all the things :)