A pre-configured vagrant box for Roots+Grunt+Composer workflow

Hey guys.

I am trying to find a pre-configured Vagrantbox that includes Apache, PHP 5.3, Git and all the other things you need to develop on Wordpress. The problem is that most of the boxes out there for Wordpress development, include Wordpress and I want to handle as much as possible through Composer. I tried building a box from scratch but realized that my Ruby skills are inadequate and that it is a lot of work configuring it. Can someone link to such a box?

Nice idea, I have used varying vagrant vagrants, and it’s cool, but does take a while to provision three separate Wordpress installations from Subversion repos.

Try www.puphpet.com, that should get you 90% of the way. And remember that you can have Puppet run a bash script if you think your bash skills are better. Heck, you can run PHP from the command line"

1 Like

I actually just found phuphet and it seems great. I will give my feedback once I have gained a little bit of a better understanding of it.

Ok I finally got it working… The problems which I had setting up Vagrant, Composer and Wordpress came mostly from the puphpet generated files, since they are differently not idiot proof and required quite a bit of debugging (Vagrant is to my experience quite error prone and quite a handfull to understand). I also followed along in Scotts screencast of Composer and set it up to install Wordpress (buy it, it is worth every penny). The Composer file is also prepared so that you can start listing out your pluggins, download them from http://wpackagist.org and install through composer.

Installing node.js for grunt is very easy through puppet, just look at http://stackoverflow.com/questions/19000534/install-node-js-on-ubuntu-12-04-lts-using-puppet
(remember to vagrant ssh before you run this command)

If someone is interested, I through tougher a public repo on: https://github.com/StenW/ComVagWp

/PS: Lesson learned: Buy the damm screencast! Simple to follow along and supporting the community!

1 Like

Hey thanks for sharing this cool resources.

How long does it take to load up the box with pre-configured everything?

I’m new to Vagrant (just tinkering with it last week due to a client project uses it). And what are some of the example use case?

Thanks!

The repo that we use on roots.io takes long enough for a cup of tea to be made. But most of that time is spent downloading the dependancies, which is only needed first run. Resuming an existing state takes almost no time at all.

The best example use case is for collaboration. It only takes a new team member a few minutes to be ready and able to develop and test code locally, on a machine that’s identical to production.

1 Like

To elaborate on what @Foxaii wrote, it depends. The first time you run “Vagrant up”` it will look for the box on your system, if the box is not there it will download it from a specified link. The box it self is usually on around 1 GB which can be a minute or more. Loading the dependencies is quite slow if you use Puppet in my experience, provisioning the box that is in the repo above took ≥500 sek the first time and to load from cash was around 70 sek. The one thing that Vagrant solves, which next to no other virtual environment can, is that it can mimic your production environment to a high degree. Think about it: you run a LAMP stack on your new Alienware Laptop or Mac Book pro using the latest versions of all relevant dependencies, the site runs grate! You then move it to a production server running a older version of PHP, the access rights are different and the RAM memory that is dedicated shrinks to 1/4. This will make your production server behave differently then the build environment, which makes it very hard to predict the behavior of your app.

2 Likes