Hi!

I've got a master server on a Linode VPS and a couple of headless computers (one at home and one at work) being dev sandboxes.

So i've set up a multiserver Aegir environment with Linode being master and dev sandboxes being slaves.

I found that Aegir multiserver is perfect for building sites. It lets you move and copy sites between servers with no effort, fantastic!

But when it comes to developing themes, i get stuck. :(

I discovered that the multiserver environment of Aegir supposes a one-way sync of platforms from master server to slaves. This means that all files created/modified inside a platform (but outside sites' files folders) on a slave server are lost on platform verification.

This means that one should not modify files in /var/aegir/platforms/homesandbox-drupal-7.19/sites/all/themes/the-theme-i-am-working-on locally because all changes might be lost any moment!

It figures that one should modify themes on the master server and then verify the platform for the changes to propagate to the dev server. But this is ridiculous! Such way of work ruins the whole idea of a dev sandbox. Dev sandbox should be local!

Using the sites/example.com/themes/ folder kinda looks like a solution, but somewhere in Aegir documentation i had read a strong advice against that.

So the question is: how do i use Aegir to develop themes on a local dev sandbox server without the risk of losing all my work by launching the innocuous platform verification task?

Please suggest a recommended modus operandi of developing themes on a local dev sandbox server in an Aegir multiserver environment.

Comments

ergonlogic’s picture

I don't see what the problem would be with sites/example.com/themes/...

But for local development, have you considered http://drupal.org/project/aegir-up?

lolmaus’s picture

Hey ergonlogic,

> I don't see what the problem would be with sites/example.com/themes/...

Here, i found the exact quote for you:

How to get all kinds of failed migrate or clone tasks?

Very easy. Simply use sites/domain-name/modules space for your code. This will guarantee many half-broken migrations...

To help you understand this better, let's quote mig5 - Aegir core developer: "Aegir doesn't track site-specific modules/themes in /sites /$yoursite /(modules|themes)...

Source: http://community.aegirproject.org/content/best-recipes-disaster-and-how-...

> But for local development, have you considered http://drupal.org/project/aegir-up?

I don't think this corresponds to what i want. If i understood it correctly, it would deploy a separate Aegir environment. How am i suppose to migrate ready sites from the Aegir-up sandbox to the production Aegir? I'll have to do that manually via backups.

What i asked for is a routine to develop sites (and themes!) on a development dedicated server and then clone/migrate them to a production dedicated server using the Aegir web interface.

ergonlogic’s picture

Status: Active » Closed (works as designed)

To address your initial question, to my knowledge, using a slave server as a development sandbox is not currently possible. So, I'm closing this issue, since it was never part of the master-slave server functionality to begin with. However, I believe the multi-server functionality is being re-worked to allow changes on slaves to persist, but it won't come about until a future version of Aegir.

Recall that it's the Aegir Hosting System, and was conceived with mass-hosting in mind. While Aegir is tremendously powerful as part of a development workflow, that hasn't been its primary design goal. Some of us are working on Aegir-based development systems, but more on that later.

The problems described on that handbook page are mainly due to poorly written contrib modules and themes, which you're probably better off not using at all. But, since it's impossible to know before-hand whether a given extension will be problematic, the suggested workflows will minimize the problems you're likely to run into.

I highly recommend reading Mig5's seminal work on the subject: http://mig5.net/content/drupal-deployments-workflows-version-control-dru.... While getting a little long in the tooth, it describes a very robust development process that takes full advantage of Aegir's automated rollbacks, etc. You may also be interested in http://drupal.org/project/devshop, which puts the entire platform under Git. As for migrating between servers using backups, you may want to check out http://drupal.org/project/remote_import, which automates the task, and adds a GUI.

At OpenAtria, we're working on a system that will combine some of these, but have only the site directory under Git. Right now, we're looking into hooking into migration and verify tasks to add 'git pull' to the mix, so as to keep site-specific code where it belongs, in the site directory. Since all the code is being pushed around via Git in most cases anyway, a local development environment built on Aegir-up is pretty central.

lolmaus’s picture

Wow, thank you for such a detailed answer, ergonlogic! That was exactly what i was hoping for. You're very kind and helpful.