Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make platform build faster #84

Open
ergonlogic opened this issue Sep 29, 2015 · 3 comments
Open

Make platform build faster #84

ergonlogic opened this issue Sep 29, 2015 · 3 comments

Comments

@ergonlogic
Copy link
Member

Platform builds via drush make can be excruciatingly slow for large platforms. This is largely due to the NFS mounting of ~/platforms. Basically, the projects are downloaded to Drush's package cache (in ~/.drush/cache/download), then copied into a temporary directory (/tmp/make_tmp...), then finally moved into place at their final destination (/var/aegir/platforms/...). That final move operation crosses file-system boundaries, and so rather than being nearly instantaneous, requires copying the entire platform over NFS.

In my tests, this is taking roughly 15 minutes for a recent version of Rune. Moving the cache and temp dirs into ~/platforms might help here, as the copy and move operations would stay on the same FS.

@BrianGilbert
Copy link

I've been building my makeiles in the host and then adding the platform in Aegir within the guest, it would be neat if it could trigger the build on the host from the Aegir interface when you use a makefile link..

@ergonlogic
Copy link
Member Author

Building platforms on the host definitely speeds things up. Unfortunately, I don't know how feasible it would be to trigger that from within the VM. That is, the 'aegir' user in the guest would have to SSH into the host for that to work, as far as I can see. This could get pretty complicated.

One way to do this would be to treat the host as a remote server, in which case, we'd need to either create an 'aegir' user on the host (and figure out the file permissions issues that'd entail) or have the 'remote_user' be the host user's account. We'd then need to add the 'aegir' ssh pub key from the guest into the user's authorized_keys.

Assuming we were comfortable with the security implications of that, we'd then need to know the path to the project's platforms directory. So, presumably we'd need to inject that somewhere when provisioning the VM.

This'd also put more of a dependency on the host's version of Drush.

@ergonlogic
Copy link
Member Author

Unfortunately, My attempts to set env vars to allow Drupal to put its cache and temp dirs on the NFS share have only served to slow down the process.

Ideally, we'd reverse the NFS mount direction here. That is, build /var/aegir/platforms/ in the guest, and mount it from the host. This should be supported in a future Vagrant release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants