developer guide: setting up a workspace - ManvilleFog/buttonmen GitHub Wiki

How to start testing your changes locally

You will need a way to make code changes locally and test them before submitting them.

As of November 2013, we are using:

  • Github, for version-control of code and tickets: see general workflow, James's git crib sheet, and [Chaos's git workflow](https://github.com/buttonmen-dev/buttonmen/wiki/Chaos%27s-git-workflow Chaos's git workflow) for git setup and workflow information.
  • Major types of deployments for testing:
    • Vagrant using VirtualBox on your local Linux/Mac machine: for lightweight "as you go" testing of changes - see below. Note that we have tried to get this running on a Windows 7 machine, but the packages don't seem to load correctly (see issue #64).
    • PagodaBox: a PHP PaaS provider with a free tier, for sandbox sites you want to share with other people. Getting Started has information about getting setup with PagodaBox, but we're mostly using it only for code compliance testing at this point --- if you try it out and can't easily get it working, don't sweat it.
    • Vagrant using AWS (Amazon Web Services): for public deployments, including the alpha site - see below
    • Custom-setup AMP (Apache, MySQL, PHP) stack on your local machine: we hope that most developers can use Vagrant to get a consistent deployment environment, rather than starting from scratch. Talk to Chaos if you're having trouble getting Vagrant working. If you need to use a different tool for some reason, James has setup an AMP stack for buttonmen a couple of times on Mac, Windows, and Android, and can offer advice.

Vagrant: what, why, and how

Background: [Vagrant](http://www.vagrantup.com] is an automated deployment tool for quickly building consistent virtual machines. It is not a virtual machine engine itself, rather it uses one behind the scenes to do its work. The goal of using Vagrant is to store our system configurations (the OS version, software packages, webserver configuration, file locations, etc, which the buttonmen software needs to run) in our git repository and make them easy to deploy on a running system, so that all developers can be running using the same configurations that exist on the live webserver. So don't expect that you'll setup a VM once and leave it running --- rather expect that you'll do a little bit of setup once, and then use Vagrant as a push-button method to stand up a fresh VM every time you want to test something.

Vagrant can use one of a handful of hypervisors behind the scenes, to actually create VMs. We've tested our config with VirtualBox (which makes VMs on your local machine), and with Amazon AWS (which makes public VMs). To get Vagrant working on your computer using VirtualBox, you need to install:

Once you have Vagrant and VirtualBox installed, our Vagrant README contains the set of commands to run every time you want to stand up a vagrant instance, and use it to test.

⚠️ **GitHub.com Fallback** ⚠️