Introducing Primary Vagrant

Primary VagrantLife before Primary Vagrant

I first learned of Vagrant last July at WordCamp San Francisco when Mark Jaquith gave his talk “Confident Commits, Delightful Deploys.” For years before that I had used various local web servers starting back with MAMP Pro when I moved to the Mac in 2008 and more recently with AMPPS which seemed to solve many of the shortcomings of MAMP Pro.

While these applications weren’t bad they definitely left something to be desired in particular when I had to work with other folks or have to deploy to a server with an unusual configuration. Even on my own servers which have run on Ubuntu since around 2008 deployments from my local machine could be problematic if I didn’t match PHP version or some other seemingly random configuration item.

Vagrant solved my issues but…

While Vagrant solved most of my issues I never could get the configuration I wanted with products like Varying Vargrant Vagrants (which I actually still sometimes use for NGINX) or some of the other Vagrant configurations out there. Don’t get me wrong, Varying Vagrant Vagrants is an excellent product with really awesome people behind it but for me it came down to two items that I really wanted to have in it.

  1. First, I wanted to use Puppet and, ideally, some of the bigger existing and stable Puppet modules to avoid recreating the wheel and for more responsive support within a specific part of the project. Maybe this is a side-effect of using WordPress plugins for so long but it just didn’t seem necessary or even beneficial for a configuration to try to handle every aspect of the configuration by itself.
  2. Second, I wanted to use Apache. While I use NGINX on this site I need to do most of my plugin and other work on Apache. Like it or not for WordPress plugins is still the predominant server and as such I just can’t break away from it.

Enter Primary Vargrant

With these considerations in mind and with the help of a few others, particularly Ian Anderson Gray who suggested the addition of phpMyAdmin and helped me find other bugs, I’ve started the Primary Vagrant project with a few goals in mind.

  1. It must replicate the web servers I use and be able to adjust important settings with ease.
  2. It must support Apache and MySQL on Ubuntu and allow for different major PHP versions (currently 5.3 – 5.5 can be used by changing only one line of code).
  3. It must use a stable base and be able to handle anything I need to throw at it without a hiccup.

Primary Vagrant meets all of these goals. The Varantfile itself started with Varying Vagrant Vagrants and evolved to a point where it is easily changed to mount any data the user would need. In addition, it uses Puppet modules from multiple sources including Example42 and Puppet Labs to provide the core services. Together these stable modules are both highly configurable and easily replaceable to meet futures needs.

So what can it do now?

Currently Primary Vagrant has the following features and software:

In addition to the above packages the Primary Vagrant configurations are split up so that making a new virtualhost, database or other configuration change is as easy as adding a couple of lines of code without risking breaking anything in the process.

What will Primary Vagrant do in the future?

That’s a darn good question. I’ve built it for my own work to date but that isn’t where it has to stop. If there is something you would like to see in it or something you would like to improve issue a pull request. The more eyes and hands on the project the better.

Check out Primary Vagrant on GitHub Today

About Chris Wiegman

Chris is a Senior Web Engineer for 10up where he works on solutions for clients both large and small. In past roles he has served as a teacher, blogger, manager and even an airline captain. He resides in Sarasota, FL with his wife Joy and their four-legged children.

Find Chris on Facebook, , LinkedIn, and Twitter.


  1. I think you’ve done amazing work here and I think Primary Vagrant will be a great success. I’ll certainly do my best to let people know about it. Most developers I know still use Apache, so VVV isn’t going to work for them. I think this is going to be integral to my development in the future. Thanks for building it and putting it on GitHub! I’ll be mentioning it at our local WordPress users group- one of the co-founders of WordPress, Mike Little, runs it and I am sure he’ll be interested! :-)

  2. Chris, this is awesome. Nice job!

    I am an experienced RoR developer, but I am a Vagrant newbie. I installed Vagrant and Primary Vagrant for the first time last night and went through the Vagrant tutorials. I setup share –ssh and it works great. I can ssh in remotely.

    The thing I can’t figure out is how to remotely browse to the sites running on the VM such as “http://wordpress.core.pv/” etc.

    On Atlas, I see my share (i.e. and when I click the link I get the default “Apache2” page.

    Can you tell me how can I browse to the WP sites remotely?

    Chris S.

  3. Hi Chris, thanks for your reply!

    I do have the “vagrant-hostsupdater” plugin installed and my host file appears to have been updated properly and the preconfigured sites links work great locally.

    Sorry, I think I worded my question poorly. What I meant was …

    If I’m running the VM on my iMac at home, and I want to access the preconfigured sites such as “wordpress.core.pv” using my laptop while I’m at work or Starbucks, how can I do that? It seems “http://wordpress.core.pv/” only works locally.

    I’m sure I’m missing something easy and I’m probably being thick-headed :)

    Chris S.

    1. Pretty sure you would need to setup a VPN or at least portforwarding in your router to pass that request for the “wordpress.core.pv” domain to the VM’s webserver.

      If you go the port forwarding route your laptop would need to have a hosts file entry that points to your home network’s public IP and then let your portforwarding routing rule help the request get to the VM’s webserver.

      So if your ISP gives you an IP then make an entry like this below. wordpress.core.pv

      Then I think you can do something like this from your local computer (depending on your chosen port forwarding port.


      Again I’m pretty sure this would work and just require that you have a static ISP ip address or make sure you know what IP has been leased to your modem.

Comments are closed.