We are currently deploying an Aegir based system for one of our clients. The client provides a Drupal ‘reporting’ system for their software. They have many customers around the country. Each customer has a separate Drupal Deployment.
We deployed a feature server 2 years ago to manage keeping all the different sites at the same level. This was a rewrite of a .NET 1.x based system. And the client had lost the original source code. So, every time we added a new feature for one of our clients customers, it would break someone else. This was very frustrating. So from the very beginning, this project was predicated upon ease of maintenance and updates.
While we felt very successful with that aspect of the project, our client has grown to over 40 deployments. So, the process of upgrading each site was simply taking too much time.
This is where Aegir comes in. With Aegir, we have been able to reduce the ‘upgrade’ time from 2-3 hours down to 2-3 minutes. But there were a few issues we had to resolve.
The first big issue for us was the fact that each of these sites was maintaining an inventory of 10-250K PDF files. This is the essence of the reports. The PDF files are actually copies from the internal servers where the reports are generated. Since the information contained on the PDF files was not only private, but required protections from competitors, we had to put them into the Drupal ‘Private’ file system.
Now we are working with Aegir and discover that setting the ‘private’ file system on each site gets overwritten by Aegir on save. It always goes back to the same value.
Call us stubborn, but that is simply not what we wanted. We had those files on specific SAMBA shares and didn’t want to have to changed all that architecture. So we did a little work inside Aegir and found that the simple answer was to use the local.settings.php file that is optional in sites/[sitename].
The essence of the fix was to use the Variable overrides section of settings.php. But settings.php is controlled by Aegir and tends to get re-written. So we could not make the ‘fix’ there. But in an Aegir system they have an ‘include’ for local.settings.php at the very end of settings.php.
So that was it. We managed $conf inside of local.settings.php as follows:
global $conf;
$conf['file_directory_path'] = '/var/private/files/standard';
$conf['file_directory_temp'] = ‘sites/[site]/files/tmp’;
Where [site] is normally replaced with the site name.