Short Feedback loops with Vagrant share
Having a short feedback loop is essential for my development workflow. With a short feedback loop I mean really short - seconds if the situation demands it. I want to be able to show my customer the changes I made just seconds ago. Ultimately make changes to code and prototype together with the customer. This is almost trivial if you are lucky enough to be co-located right next to your customer. However, this is seldom the case.
Sometimes the proper way to solve a problem is to use pen-and-paper or apply process. However, when you need to get feedback on your code changes to a real system, then tools can provide leverage and benefit if you are not co-located with your stakeholder. We need something to be able to share the local development environment as easy as Amazon’s one-click ordering. Luckily there is a good range of options available nowadays to help us keep the feedback loop as short as possible.
Aside from being a simple and powerful tool for configuring your local development environment to match production, Vagrant can also share your local box to the world with a single command vagrant share
.
I have setup a simple Vagrant box with nginx, node and mongo, which is used here for demonstration purposes. In this specific case we want to forward https port, which requires the extra params vagrant share --https §PORT
Step 1 : Create Account to Vagrant Cloud
Step 2 : Spin up your environment, login to Vagrant Cloud and share
1 | # clone example vm box and boot it up |
Step 3 : Test and share your box url
1 | $ curl --insecure https://selfish-panda-4911.vagrantshare.com |
That is quite simple, isn’t it? In my next post I plan to drill down a bit deeper on methods for keeping the feedback loop short.