Recommended Posts

Thanks for sharing this. Seems to work on top of virtual box that I used in the past

for disposable wamp servers. Will give it a try to see how it speeds up virtual box use.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks! I followed the tutorial from their site during the weekend and am very impressed! Very easy to start and to work with :)

  • Like 1

Share this post


Link to post
Share on other sites

We've been using vagrant quite a lot in the past. It's a good way of ensuring everyone working in a Team has the same Serversetup as close to the live System as it can get. It has some performance and complexity drawbacks though. Currently we've mostly switched back to "good ol localhost" for most projects

  • Like 1

Share this post


Link to post
Share on other sites

We've been using vagrant quite a lot in the past. It's a good way of ensuring everyone working in a Team has the same Serversetup as close to the live System as it can get. It has some performance and complexity drawbacks though. Currently we've mostly switched back to "good ol localhost" for most projects

Please, Can you give a detailed example of the drawbacks of using Vagrant?

Thanks :)

Share this post


Link to post
Share on other sites

Please, Can you give a detailed example of the drawbacks of using Vagrant?

Thanks :)

Sure!

  • If you switch a lot between different projects you'll have to either start several instances or you'll "up" and "halt" them all the time: The first way is very "costly" in terms of performance, the second one in terms of time
  • The generated isos tend to be quite big (around 2.5 GB): If you're working on 20+ Projects you'll either have to constantly delete (and therefore re-init) them or waste a lot of disk-space 
  • We've experienced some rather standard setups to be very slow even if we gave them a crazy amount of Memory (4GB+). This was especially the case with larger ModX sites (which has a slow backend anyway)
  • On Windows (which we use for development) sometimes vagrant just keeped crashing on startup for unknown reasons
  • Crazy caching behaviour: We mounted our local work folders into the VM but sometimes they just won't get updated for minutes
  • Plus some very "Workflow related" issues that are not that important 
  • Like 4

Share this post


Link to post
Share on other sites

Vagrant is a great piece of software and for sure makes many things easier (as mentioned in the tao). It's just not fitting into OUR process and workflows.

If you're (for example) working on one or two bigger projects at the same time with a large team of people vagrant would be a perfect fit for that.

  • Like 2

Share this post


Link to post
Share on other sites

This was a very interesting topic, 

tha pros and cons of using Vagrant are much clear now :)

Share this post


Link to post
Share on other sites

I'm using vagrant on a Linux box and am quite happy.

Only drawback is that file operations on the nfs mounted directory where my sites live are slow sometimes, especially when extracting archives through php.

Other than that I love it because I work on different boxes and have the same dev environment.

I stumbled across a vagrant box that has PW preinstalled but haven't used it yet.

  • Like 1

Share this post


Link to post
Share on other sites

I've heard quite a bit about it in the last couple of months, but tried it out myself just yesterday. It's great. I think I'm gonna switch to vagrant instead of my local env.
 

We've been using vagrant quite a lot in the past. It's a good way of ensuring everyone working in a Team has the same Serversetup as close to the live System as it can get. It has some performance and complexity drawbacks though. Currently we've mostly switched back to "good ol localhost" for most projects

If you're using your local env. for all projects you might as well just use one vagrant box for all projects. You'd still have the advantage of not messing up your local env. with crazy configurations.
 

  • Crazy caching behaviour: We mounted our local work folders into the VM but sometimes they just won't get updated for minutes

It'd be interesting to know if those issues are windows only.
 
To all who are using vagrant currently:
 
What are your workflows regarding mysql dumps? I tend to config a pre commit hook in my projects which dumps the database of the current PW install before committing.

Since the db is in the vagrant box, are there any issues getting a dump of a db from it? I haven't tried it out myself yet, I think it should be possible to just connect to the vagrant mysql server instead of the local one and dump the db from there.

  • Like 2

Share this post


Link to post
Share on other sites

Hey.... 2 years later.... lol

    I decided yesterday that I was going to try out some sort of VM on my Windows 10 workstation at home. It had been in the back of my mind for some time but wasn't too high on the list. Thought it would be a good idea to reacquaint myself with some version of Linux in terms of PHP development, with Processwire of course :)  So anyway, for some reason I didn't stumble across Vagrant prior to searching these forums for Virtualbox to see what I could find. Once again the Processwire forums and their contributors have been a big help to me :) Thanks!

Share this post


Link to post
Share on other sites

Who is still using vagrant? Serious question. I'm interested.

I mean, there was a lot of improvement in this to address some of the mentioned issues. OTOH, there are also new technologies like Docker.

Share this post


Link to post
Share on other sites

I'm using it for all my development work. Makes setting up dev environments so much quicker and easier. No more manual installation of LAMP stack in my Linux box or fighting with WAMPP/XAMPP settings.

I have one vagrant box that hosts all of my PW projects. Then I have one that brings all I need for a Drupal project.

My main box is a remnant from the days where I was mainly doing Joomla projects. But it still works quite nice: https://github.com/joomlatools/joomlatools-vagrant

One of these days I want to put together a box solely for PW with wireshell etc. Just didn't have the time to pull it together.

Bernhard put a nice box together with some scripts for automatic PW installation and DB backups: https://github.com/BernhardBaumrock/vagrant-pw-lamp

  • Like 4

Share this post


Link to post
Share on other sites

I find things like laravel valet + php-version much more interesting for a simple dev environment compared to vagrant or docker. At least if you just need a PHP version and something mysql. For setups more involved with the infrastructure I'd also rather suggest trying Docker today, as it's Native-App Beta is doing great and the speed improvement and deployment options are just far superior. The only reason I'm currently still developing on a vm is that I'm working on different machines and don't want to hassle with updating the database back and forth. Put the vm on an external drive and done :D

  • Like 4

Share this post


Link to post
Share on other sites

Update on Vagrant on WIndows 10

  Yeh.. umm.. not such a great experience with Vagrant and Virtualbox yesterday. I've been in sort of a slump lately when it comes to installing new software LOL :). Seems to be an issue with Virtualbox on running the guest in full screen mode, if host is windows 10. Supposedly to use full screen mode, it seems you have to install something called 'Virtual Box Guest Additions'. Apparently there's a problem with installing it on windows 10 (big surprise there :P ). I found a suggestion to run it under Windows 8 compatibility. That didn't help. The screen is not THAT small, I decided to live with it for now. I'll pretend I'm running it on a 15" laptop : :lol: 

Ran into issues with Vagrant also. Seemed I had bad luck picking pre-defined boxes. I'll spare everyone the boring details. I decided to just let it sit for now.

At the moment, I have Debian 8 running on Virtualbox, no Vagrant involved. It took 'longer than expected' to install. From what I saw after Googling, that seems to be the norm, so OK, I let it run. Seems to be fine for now. Will maybe try Ubuntu in the not too distant future. Where I work, it's primarily Windows, so I don't have anyone to call and ask for some recommendations on which flavor of Linux to go with. I saw Mint was recommended. I tried that, but sure enough, there was some sort of 'video rendering' issue. Some screen flickering, etc .. so I decided to pass on it for now. I will add Docker to the list of things to check out. Thank you LostKobrakai .

Anyway, if you have Windows 10 your mileage may vary. Have a good one.

Share this post


Link to post
Share on other sites

update: i'm using laragon now and love it! see this post: 

!!! OUTDATED !!!

i'm using vagrant on win10 for all my development too. i really like it once you have the hassle of setup done. i'm now using scotchbox - i don't use the repo gebeer linked to.

here is my new one: https://gitlab.com/baumrock/vagrant-pw-lamp/tree/master

sorry, no time for documentation right now, but the readme from the old repo should also have some useful informations (as already linked by gebeer): https://github.com/BernhardBaumrock/vagrant-pw-lamp

on win8 i had to switch GUI mode to OFF otherwise it didn't work. on win10 it was the contrary ^^ i'm too busy right know to give more help. gebeer and i have been talking about vagrant and pw development quite for some time now but it all seems too experimental to really recommend our setups to someone else...

but if you want to try and have some specific questions please let me know :)

some nice things i like and why i am using it:

  • have a linux sandbox
  • setup projects with "real" hosts in seconds; my workflow is like this:
  • then i have my machine ready and can access my linux server on example.dev
    mailcatcher will catch all emails, so i can also test all email stuff, even when i'm offline
  • i can do "grabpw" and get a fresh install of PW to choose from master/dev/devns
  • i can do "backup" at any time, that will backup files + db
  • i can do "restore", so i can move projects from one device to another
  • i can even do "push" or "pull" of the whole website from my live server to my vagrant box, but that's a bit experimental :)

when i'm done with the project i do "vagrant destroy", it will backup everything and keep only 1 backup and destroy the machine. so i don't mess up my host system with lots of GB of VMs

ps: sorry i just realized that my repo is private... i can't make it public atm but you can pm me if you are interested

  • Like 6

Share this post


Link to post
Share on other sites

@Bill C

Depending on your knowledge in managing linux servers Docker might not be a good fit. It does make things easier for experienced people, but if you're just getting into it it's just another complex layer. 

  • Like 1

Share this post


Link to post
Share on other sites

I personally love it for the modularity and interchangability of containers (and thus: features). So exchanging PHP to HHVM is an easy task. Vagrant is (imo) too "monolithic", but I think a little more easy to set up, especially with puphpet et al. Docker on the other hand can be quite cumbersome if you want your own containers, re-compile apps etc pp

  • Like 1

Share this post


Link to post
Share on other sites

I'm with bernhard on using Scotchbox. I started using it a while back and it was a great entry point to learning the not so mysterious methods of Vagrant. Plus, I've always been a fan of Ubuntu but being mobile is a must so I've learned to enjoy its presence as a VM on all my Windows devices. I use Scotchbox across Win 7 to Win 10 on multiple devices including Surface Pros and it has always worked out of the box. Once projects are done I just destroy the box because I push everything to GitHub anyway. I used to configure each VM myself in VirtualBox and got those same problems with Guest Additions. It is usually caused by mismatched versions between it and the VirtualBox installation.

  • Like 2

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By rickm
      Hey all,
      A while back I was trying to get Processwire working on the Homestead vagrant box - a really handy vagrant box made by Taylor Otwell (Laravel creator). One cool thing about homestead is it has its own config file where you can set 'path maps' which map a folder on your computer to the vagrant box, and then also set up hostnames. So for example you can set up 10 domains pointing to different locations on your machine, making it a nice all in one vagrant development box for your sites. 
      One thing it didn't do was support processwire. The way it works is it uses setup files for each site, and you can specify things like a site to use nginx, a site to use apache, etc. 
      So to get round this I wrote a custom setup script for it to get processwire working, and it works really well. I've put it up on github should anyone else find it handy, it's a pretty simple little script and is based on the Laravel one included in Homestead.
      Hopefully it'll be useful to someone out there  You can grab it here: https://github.com/rickmills/homestead-processwire
    • By thmsnhl
      Hi everybody,
      we started our first Processwire driven project in my new company and for the first time, I was working on one site with more than 2 colleagues on the same site.
      It didn't take long for us to stumble across some problems when multiple developers work at the same time, conflicts with updating the database on vagrant machines, like duplicate entries for page IDs, errors when setting up fields and stuff like this. We ended up working on a dedicated database server, that we linked to our vagrant machines and most of the problems were gone, but the performance of this constellation is really bad compared to our first approach with database running on vagrant machines.
      I already tried to find a solution in the forums but I couldn't find anyone with problems like this.
      So I was wondering: how do you manage projects with multiple developers on vagrant machines in a git-based workflow?
    • By FrancisChung
      Unfortunately, this magazine has bitten the dust but they were gracious enough to have their entire back catalogue available for download.
      https://secure2.linuxjournal.com/pdf/dljdownload.php
    • By szabesz
      I am subscribed to MacUpdate's daily newsletter, and there is a new promotion: https://www.macupdate.com/app/mac/56703/gopanel
      I'm sharing the link of my email, since there is no sign of the 50% off on the site: normally the promotional offers of apps at MacUpdate are also indicated on these pages as well, but this time it is not for some reason (human error?).
      Anyway, reading up a bit on goPanel, some of you might be interested in it. Check out the "user guide" for a quick overview of the features: http://gopanel.io/user_guide and the FAQ: http://gopanel.io/faq
      Currently goPanel provides basic functionality but for the current $12.49 offer (one time payment, unlimited servers, lifetime access) it looks like a good utility for those interested (they say they are planning to add more features.)
      Edit: I removed my email's link from this post, because in the meantime they updated the app's page, so you can get the discount by going there.
    • By MMG8
      Greetings!


      I'm a non-tech trying to get some info for my IT Manager in Hong Kong.  We have a developer who created a Process Wire site for us and we want to host it ourselves on a virtual machine using our Azure cloud platform.  
      According to my IT Manager, ProcessWire is developed with PHP5, a common/popular language on the Linux platform.  He advised: "although ProcessWire can run on a Windows server, since it's based on PHP it’s best and most efficient to run on the Linux platform."  He is asking the preferred Linux distribution for PW.  Any advise or link to a installation guide would be appreciated.
      Many thanks,
      David