How Drush Make Just Changed My Life
Note: Apparently it works fine with Windows too! See comments.
I'm pretty excited right now. I just tried drush make for the first time. Download it here:
http://drupal.org/project/drush_make
That's an order! You'll need drush too, if you don't have it yet (in which case, shame on you ... call yourself a Drupal developer?!)
http://drupal.org/project/drush
Install it (the README instructions are nice and clear). Now what? Make a make file. Again, the README is pretty clear. Here's my "standard" make file, but I intend to make a "commerce" file, "services" file, "flash support" file, "social sites" file, etc. Anyway, the file:
core = 6.x
projects[] = drupal
projects[cck][subdir] = "contrib"
projects[filefield][subdir] = "contrib"
projects[imagefield][subdir] = "contrib"
projects[link][subdir] = "contrib"
projects[email][subdir] = "contrib"
projects[date][subdir] = "contrib"
projects[vertical_tabs][subdir] = "contrib"
projects[better_formats][subdir] = "contrib"
projects[imce_wysiwyg][subdir] = "contrib"
projects[imce][subdir] = "contrib"
projects[wysiwyg][subdir] = "contrib"
libraries[tinymce][download][type] = "get"
libraries[tinymce][download][url] = "http://downloads.sourceforge.net/project/tinymce/TinyMCE/3.2.7/tinymce_3_2_7.zip"
libraries[tinymce][directory_name] = "tinymce"
projects[admin_menu][subdir] = "contrib"
projects[adminrole][subdir] = "contrib"
projects[masquerade][subdir] = "contrib"
projects[taxonomy_manager][subdir] = "contrib"
projects[backup_migrate][subdir] = "contrib"
projects[views][subdir] = "contrib"
projects[imagecache][subdir] = "contrib"
projects[imageapi][subdir] = "contrib"
projects[token][subdir] = "contrib"
projects[logintoboggan][subdir] = "contrib"
projects[webform][subdir] = "contrib"
projects[blocktheme][subdir] = "contrib"
projects[zenophile][subdir] = "contrib"
projects[boost][subdir] = "contrib"
projects[pathauto][subdir] = "contrib"
projects[globalredirect][subdir] = "contrib"
projects[nodewords][subdir] = "contrib"
projects[page_title][subdir] = "contrib"
projects[xmlsitemap][subdir] = "contrib"
projects[zen][subdir] = "contrib"
projects[fusion][subdir] = "contrib"
projects[clean][subdir] = "contrib"
projects[rootcandy][subdir] = "contrib"
projects[seven][subdir] = "contrib"Save it as standard.make. Make a new directory. Go there in a terminal window. Type drush make /path/to/standard.make then go make a cup of tea. Come back, go to your new site, run through the installer. Done! New Drupal site with all your desired contrib pre-installed. =)
I particularly like the way it can fetch 3rd party stuff (note the TinyMCE download - you could also use it to fetch all the players for SWF Tools, for example).
Of course, now you can actually run this from a Linux shell script. I don't think it's possible to script a generic installation with drush (yet!) but it *is* possible to use drush, post install, to enable everything. And come Drupal 7 you could have a Linux shell script that goes something like this:
# get core and contrib
drush make ~/workspace/core/makefiles/standard.make
# install Drupal
drush ic
# enable modules
drush en cck filefield views imagefield imagecache imageapi path ...You get the idea. So no more box-ticking on the modules page either. You can do the above with Drupal 6, but you'll need Aegir, and that's a whole other story!
http://groups.drupal.org/aegir-hosting-system
I think I need to lie down.


I don't think it's possible
I believe the 'drush site-install' command does a similar thing, with a specified install profile as an argument. This command is present in Drush 3.0-alpha1, I haven't tried it.
For anything more resilient, that's a job for Aegir (Provision, which is a Drush extension, which will automatically fire away at your install profile (which in turn, can take care of configuring your modules either directly in the profile or by enabling Features that do so per what Budda said))
Nice to see others falling in love with Drush Make and this new era of automating builds like this :)
windows supported
drush most definately supports windows now. please file bugs if you have had trouble with it.
Never tried it
Haven't used Windows for years, just kinda assumed it didn't because the project page specifies it's a Unix tool. Will update. Sorry.
Drush Make + Features = Killer
@budda: Features allows you to store many of the desired preconfigurations (views, content types etc.) in - tada! - module form. So what you can do is save your preconfigurations as Features modules and install and enable these with a Drush Make file.
Big advantage here is that all your configurations are actually stored in code which is really nice if you use version control like svn or git. This way you can have different versions of your setup (say 0.9, 1.0, 1.1 and so on) saved as tags in your version control system and will be able to deploy them with a simple shell command.
Granted, Features doesn't allow to store everything in modules yet (taxonomy, cck fieldsets etc.) but it gets you at least halfway to a readily reproducable installation without the hassle of database dumps.
Cup Of Tea
I just come back from my first cup of tea! Woooooaaaah!
What a time saver, thanks for the hint..
Christophe
Nearly there
Its a good start, but there is still the hassle of configuring the modules once they are auto installed. This is where having a pre configured database dump is easier, and maybe Features will support everything one day.
variable_set
If you have a custom module, you can export your variables and import them into your new site at install using your custom module's hook_install.
Features can export variables to code.
There's also strongarm which might be helpful.
Oh my
That's very cool. Features is next on my list. Hauling myself out of the dark ages, one product at a time! I have about five different Features tutorials open as tabs in Chromium, waiting for me to find time to read them. They've been there for about 2 weeks now. ;-)
Post new comment