Support for multiple PHP projects on one server along with the ability to use Vagrant

38 views
Skip to first unread message

Szerémi Attila

unread,
Aug 15, 2014, 9:05:48 AM8/15/14
to puppet...@googlegroups.com
Say I want to host 20 php projects on one digital ocean server. How would I go about using PuPHPet and setting puppet scripts up in general such that I could host all 20 projects on the same server, residing in e.g. /var/www/project1, /var/www/project2 etc.
but each project would be able to have its own Vagrant file, and each project with the help of the Vagrantfile you could set up your own PHP environment for that one project. So e.g. you'd have a versioned Vagrant file for project1 which sets everything up so you could work with the environment very similar to production, making sure all the PHP extension dependencies are installed for that PHP project, placing the project into /var/www/project1 inside the Vagrant machine BUT not installing all the other, unrelated PHP projects next to it with their dependencies as it would take a lot of time to set all of them up every time someone does `vargant up`

So does this make sense? I basically want to be able to support hosting multiple projects of PHP in a server, but being able to make a 99% accurate virtual environment for each as well.

Normally all the tutorials for using PuPHPet and Vagrant assume that you want to 1 project onto 1 server and gives you a great virtualization for that which is 99.99% accurate, but I want to cut off a little bit accuracy and add some complexity in exchange for saving costs by not having to always open an entire new VM for every single project especially if many projects are very small.

Felix Frank

unread,
Aug 27, 2014, 3:29:12 AM8/27/14
to puppet...@googlegroups.com
On 08/15/2014 03:05 PM, Szerémi Attila wrote:
> but I want to cut off a little bit accuracy and add some complexity in
> exchange for saving costs by not having to always open an entire new VM
> for every single project especially if many projects are very small.

If there is a distinct Vagrantfile per project, is not a respective
dedicated VM the logical consequence?

If I understand you right, you'd like to switch one VM between different
specifications, yes? You can probably just have Puppet run different
manifests inside the container to achieve that end. It's hard to offer a
definitive answer without a deeper insight into your setup.

Reply all
Reply to author
Forward
0 new messages