All-sites theme & module best practices in a multi-site environment?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
mattmcmanus's picture

I'm new to Aegir and there are a couple things that are still unclear to me. Clearly Aegir will bring over modules in a specific site folder when you migrate a site, but what is the default handling of modules and themes in the "all" folder? I migrated a site from a drupal 6.15 platform to a 6.16 platform but it didn't touch the modules in the all folder.

So what is the best practice for running platform upgrades? What is the best way to handle modules that most of my sites use (views, cck, etc)? I technically know how to get everything working I'm just curious as to what is the best practice.

Thanks everyone!

Comments

Move the modules/themes to the install profile

hadsie's picture

I haven't tried putting things in sites/all but what you're experiencing /could/ be a bug. However, I think the general practice for this kind of thing is to not use the sites/all folder at all. Instead put your modules and themes in your install profile, i.e. profiles//modules and profiles//themes, respectively.

Interesting. I've never

mattmcmanus's picture

Interesting. I've never played around with putting modules in the profiles directory. All of my sites are custom sites that don't really benefit from an install profile.

Just so that I understand. If I put all of my modules in /var/aegir/platforms/drupal-6.16/profiles/default/modules it will definitely pull over the correct modules when migrate to a new platform? Or am I just being dense and not really understanding something.

Thanks for your patience and help!

Yeah, a make file would

hadsie's picture

Yeah, a make file would probably be the best way to go in your case.

The modules in the install profile won't be moved over (just like the sites/all modules)... instead they need to be part of your platform. So when you create a new platform to migrate the sites to, those sites/all modules need to be a part of the platform.

It's all by design

mig5's picture

I've not much to add in response but I'll just repeat more or less what hadsie said:

If you aren't using install profiles there is no point in putting your modules in /profiles/default/modules. Put them in /sites/all/modules instead. It is only the modules in /sites/$yoursite/modules that will get carried across to a target platform and thus not upgraded.

You said "will it definitely pull over the correct modules when migrate to a new platform" which is never the case - in all scenarios you are still responsibile for making sure the modules, or updated versions of which, exist on the target platform already prior to running a Migrate task on the site. You could put them manually in /sites/all on the target platform, or use Drush Make to generate your entire target platform complete with the relevant modules, automatically, then migrate to it.

Basically, it's just that Drush Make and install profiles make this an actual sensible procedure :) and you can use Drush Make to put stuff in /sites/all even without an install profile.

Holy smokes! I waited to

mattmcmanus's picture

Holy smokes! I waited to reply because I wanted to take the time to play around with Drush Make. Talk about a best practice...it should be the only practice.

Thank you for taking the time to explain this. I used to think I knew what I was doing with drupal. Ha!

Another option is svn/git/cvs/etc

timwood's picture

We use an svn repository that contains our entire Drupal platform. When I want to upgrade some modules or Drupal core I can do a new SVN checkout, upgrade core or modules with Drush or manually, verify platform in Aegir and migrate sites to it.

I've yet to play with Drush Make, but I'm really looking forward to testing that when I get some time.

-Tim

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week