20

When installing Drupal for different sites I find myself frequently installing the same modules over and over again. In the interest of DRY, how can I create a kind of custom site "template" which would allow me to install drupal and have the basic modules I install already installed, basic theme set, and possibly some other common configuration options set?

I've read a little about Drupal profiles and I've seen the Drush tool and perhaps there are other tools besides these. I'm wondering what's the best way to do this?

UPDATE

Ok so it seems Drush make and Drupal installation profiles are the correct tools for the job. I found these blog posts which talk about them:

Overview

Drush make

Installation profiles

I feel like I've got almost all the puzzle pieces. What I'm still not clear on is how to combine the drush make process with the profiles? How do you get your profile files into the profiles directory of the drupal install that drush make creates? Or should I just do this via a shell script?

UPDATE 2

I found this video:

http://chicago2011.drupal.org/sessions/zero-distribution-using-features-profiler-and-drush-make

which explains using drush make with profiler. Seems like the connection between drush make and profiles is you have one drush make file which downloads only drupal and your profile. Then inside your profile "module" you have another drush make file which will download all your module components.

The video also talks about features which is another level of drupal setup automation.

I'm not sold on this work flow. It all seems a little convoluted. However this was my first exposure so maybe I will appreciate it more later. I like drush make but I'm thinking I can use drush to enable modules instead of messing with profiles. I think I will make a bash shell script that runs drush make and then uses plain drush to enable modules.

Next step would be how to do some configuration of the modules in a repeatable way. I guess this might be features? Or maybe I should look further into profiles.

4 Answers 4

13

Have a look at the Drush make project:

http://drupal.org/project/drush_make

There is also a companion website at:

http://drushmake.me/

This website allows you to select the modules you want to package with Drupal, and produces a Drush-ready makefile.

There are other varieties of this functionality out there, so I advise experimenting and testing with your specific configuration.

4
  • Reading the description at drushmake.me this seems like exactly what I'm looking for. But when I go to the drush make project I only see 6.x-2.3. Can I use this with Drupal 7?
    – User
    Nov 28, 2011 at 15:45
  • 1
    Yes, as drush isn't tied to a specific version. Please see drupal.org/node/1000172 for further details.
    – rickumali
    Nov 28, 2011 at 20:12
  • How does this compare with Installation Profiles? I'm reading Drush make and it says it doesn't turn modules on, or adjust their settings, etc. So I guess you need a profile for that? But what does drush make give you over an installation profile alone?
    – User
    Nov 28, 2011 at 22:07
  • Installation Profiles are a Drupal feature, and Drush make is a tool for using this feature. The two go hand in hand, from what I've read at drupal.org/node/159730 and drupal.org/node/180078. As for needing to "turn modules on, or adjust their settings", drush can at least turn on modules.
    – rickumali
    Nov 29, 2011 at 12:06
5

We have solved this problem with the use of:

  • drupal 7
  • custom installation profile (these are much better and easier to make in drupal 7 compared to 6)
  • custom features
  • aegir to manage the sites, and handle backups and code migrations

The end result is that aegir can provision a new site, with all modules/features installed, and also with a base IA with dummy content in around 6 minutes on our production servers.

1
  • Just remember that Aegir deploys multi site config, So choose wisely what modules should be shared between sites :)
    – Vic
    Aug 2, 2013 at 8:49
3

The easiest solution is to : install this module Profiler Builder

Profiler Builder is a module for automating the creation of installation profiles and distributions. It has support for the Profiler installation profile simplifier library but is able to run independent of it (1.0-RC4+). This module creates a downloadable tar package that gives you a well made installation profile and associated drush make file based on the site its installed on.

This is a fast, simple way of creating a distributions from any produced drupal site and is an excellent form of documentation via blue-print creation.

Its so easy,

together with Bryan Ollendyke how to video, you can do this in under 15 minutes.

How to create a profile with Profiler Builder

1

You should make the module you need as a profile put all modules in the profiles folder before installation and choose your profile in installation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.