matomo-org / matomo-dev-environment

Matomo Development Environment (Vagrant)
http://developer.matomo.org
GNU General Public License v3.0
33 stars 21 forks source link

Find a way to make it work with an existing Piwik install #2

Open mnapoli opened 9 years ago

mnapoli commented 9 years ago

I've been trying to use the Vagrant box with my Piwik install, but with no success until now.

piwik/
    # contains Piwik code
piwik-dev-environment/
    ...
    www/
        piwik/ # hey Piwik is cloned here again

I've tried symlinking piwik-dev-environment/www/piwik to the existing Piwik install but VirtualBox doesn't like that (since the simlinked repo is outside of the VM).

How do you do it yourselves?

Should we consider merging that in Piwik's repo? I'd love (and I guess users too) to be able to do just git clone and vagrant up on the Piwik repository.

mnapoli commented 9 years ago

Maybe instead we could do something like Laravel (but much simpler):

That way we keep piwik/piwik clean while still having the vagrant VM right inside of it.

I'll have a look into that soon if nobody sees downsides with that (I badly need a VM).

mattab commented 9 years ago

we distribute the box on https://vagrantcloud.com

it sounds like a good idea. How much work would be involved in this?

Also +1 if it help developers getting started with developing for Piwik. If so we want to explain how to use the vagrant thing in the Setting up developer guide here: http://developer.piwik.org/guides/getting-started-part-1#getting-setup-to-extend-piwik

mnapoli commented 9 years ago

I honestly don't know how long it would take.

halfdan commented 9 years ago

The usual way this is handled is instead of cloning the code repo to www/piwik it would be NFS mounted into the vm (via sync folders). So the setup would be like @mnapoli already has it.

e.g. https://github.com/TryGhost/Ghost-Vagrant/blob/master/Vagrantfile#L38

mnapoli commented 9 years ago

For people stumbling on this, see https://github.com/piwik/piwik/pull/8542