Customising a Vagrant box with Veewee

In my job I’ve noticed that the number of web sites, applications and APIs keep growing and all need servers to run on. I’m not a Systems Administrator but being a lone developer I want to try and keep as much of my time focused on doing what I love, building great apps for people. To help combat the issue of managing multiple servers I started to experiment with Chef and I have to say, after a bit of a learning curve, I like it, or I like what it enables me to be getting on with.

Recently, I’ve been tasked with working alongside another developer and the topic of a development environment came up when working on an existing site. Until now I had my VM running on my laptop mirroring production as best as possible and I was happy but someone else now needed the same environment I had. In fact, my local development environment was more akin to a shared hosting platform. That is, I’m running multiple sites on my VM, simply because it was easier than launching a whole new VM and configuring it for each site. I didn’t want to give this guy a copy of my current VM since it would have all of my settings running on it and after playing with Chef for a bit, I came across Vagrant and knew that it supported provisioning with Chef and allows developers to share VMs. I also thought that I could now have a VM dedicated per website. With this in mind I got to work.

Continue reading

My Daily Web Development Tools

After reading a post on the IDE used by @skoop as one of the tools he uses in his everyday development, I felt inspired to do the same and hope that others find my individual set up useful to them.

The first and most obvious place to start, is that which is at the centre of the universe for a PHP developer, his IDE of choice and at present, that honour goes to PhpStorm.

Back in the day when I first started out coding in PHP I used PHPEdit. It was free and built around speed and productivity. I still miss their drop marks feature and surprised other IDEs have not incorporated this into their environments. Once it became commercial, I moved onto something else unmemorable, before adopting Zend Studio 5 and 5.5. Good days. I then persisted with Zend Studio 6 for Eclipse but refused to shell out for 7 and switched to Netbeans after hearing good things. I was happy for months until I started having performance issues. After failing to resolve this annoyance I finally moved onto PhpStorm and haven’t looked back.

Continue reading

VirtualBox: Bridged, NAT or Neither?

Google the phrase ‘VirtualBox set up’ or similar and you’ll find plenty of guides that will instruct you on the install of a Virtual Machine (VM) with the network adapter set to either NAT or Bridged. While these options work fine, as a web developer you are quick to realise their limitations. So what does a web developer need from their VM networking set up? Simple:

  1. To simply and consistently connect to the guest VM from the host, and
  2. To connect to the Internet, remote servers and web applications from the guest VM with the same ease as the host.

Once a VM has been installed, the first goal can be expanded into some real world use cases:

  1. To immediately be able to SSH into the guest machine from a terminal to configure the environment.
  2. To connect to another port on the guest VM via an SSH tunnel, i.e. to administer MySQL from a GUI client.
  3. To request web sites running in the VM through the host’s web browser on the HTTP and HTTPS ports.
  4. To be able to connect to any other port which maybe required. For example, my VMs run Zend Server so I need to connect over HTTPS on port 10082.
  5. To be able to connect to the guest VM regardless of my location or the network I’m connected to.
  6. To set this up once and not have to worry about a guest VM having different IP addresses every now and again.

As for the second goal, the following use cases should be met:

  1. To immediately be able to connect to the Internet and perform system updates and software installs from the guest VM.
  2. To be able to piggy back on a host’s private VPN connection.
  3. To have exactly the same ACL rules as the host when connecting to remote servers or services.

So which network adapter satisfies all of the above use cases? NAT or bridged?

Continue reading