Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Originally mentioned here: http://drupal.org/node/1205458#comment-4891974
Moving sites/foo/files out of the Drupal root is a great for web clustering. We create an NFS partition at /var/lib/sitedata and symlink sites/aegir/$url/files to /var/lib/sitedata/aegir/$url/files.
For boost we also share the cache, and symlink cache to /var/lib/sitedata/aegir/$url/files.
This patch invokes a drush command hook when provision creates directories, allowing us to implement a hook that alter/override the creation of directories during _provision_drupal_create_directories().
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 1283738_14.patch | 607 bytes | cweagans |
| #12 | provision_drupal_create_directories_12.patch | 608 bytes | cweagans |
| #5 | platform-backup.provision.inc_.patch | 575 bytes | halcyonCorsair |
| #5 | platform-deploy.provision.inc_.patch | 719 bytes | halcyonCorsair |
| #5 | platform-provision_drupal.drush_.inc_.patch | 601 bytes | halcyonCorsair |











Comments
Comment #1
izmeez CreditAttribution: izmeez commentedsubscribe
Comment #2
Steven Jones CreditAttribution: Steven Jones commentedIf this hook is for 'altering' the directories to be created, then it should be called so: 'provision_drupal_create_directories_alter'. Also, does
drush_command_invoke_allpass the first argument around by reference, it looks like it might try to but, can you confirm that it does?Comment #3
mrfelton CreditAttribution: mrfelton commentedDoes anyone have an example implementation of this hook that shows how it could be used to allow the files directory to live on a shared filesystem mountpoint?
Comment #4
halcyonCorsair CreditAttribution: halcyonCorsair commentedI've created a gist with all the relevant bits to make this work here:
https://gist.github.com/1585181
In this scenario, you have some shared storage mounted on your aegir server and any front end webservers at: /var/lib/sitedata (or even /var/lib/sitedata/aegir)
Ownership in my case: aegir:www-data (eg. <aegir user>:<aegir web group>) with group sticky permissions.
Comment #5
halcyonCorsair CreditAttribution: halcyonCorsair commentedAttached files here also.
Comment #6
mrfelton CreditAttribution: mrfelton commentedThis is pretty cool @halcyonCorsair . It's working to the point of moving stuff to the shared mount point, and setting up the symlinks. But when it comes to syncing stuff over to the remote cluster, only the symlinks get transferred and not the actual directories/files on the shared mount point.
Comment #7
mrfelton CreditAttribution: mrfelton commentedBy also making /var/lib/sitedata/aegir on the aegir server a gluster mount I got around the problem noted above.
Comment #8
halcyonCorsair CreditAttribution: halcyonCorsair commentedYes, the aegir server itself needs the /var/lib/sitedata/aegir directory mounted as well. That's where the work gets done! :)
Comment #9
wamilton CreditAttribution: wamilton commentedI'm confused: isn't the -h flag to tar exactly what we don't want for provision-backup?
Also, setting to needs review since that didn't happen when new patches and examples got added, and since I'm reviewing it. :)
Comment #10
anarcat CreditAttribution: anarcat commentedIndeed, -h introduces a serious security vulnerability, see #1484214: [meta] migrate/clone performance optimizations for background information on this.
Comment #11
anarcat CreditAttribution: anarcat commentedFor the record, I think it's okay to add that hook, just not to add a security vulnerability in the meantime. ;)
Comment #12
cweagansChanges from #2 (add _alter).
Per last comment, I think this is okay now.
For the -h option, I think that could be configurable with a warning to the user about potential security issues. In my case, the entire Aegir environment is managed by trusted administrators, so the security issue is significantly less.
Comment #13
ergonlogicI don't think this'll go in the 1.x branch, and the patch doesn't apply to 6.x-2.x.
Comment #14
cweagansReroll from head.
Comment #15
ergonlogicFixed in 8793888