My development setupOctober 11, 2012
I’m always interested in how other people setup an internal development environment. So I thought I’d share the different ways I setup.
I’ll show you both how I did before I left for Sweden, i.e., when I had all my machines available for me, and how I manage without them. I thought I’d also go through how I do at work, even though the setup is fairly similar.
Since I first got introduced to virtualization, I’ve always tried to virtualize as much as possible, at home I try to run everything on VMware player (it’s free adn you don’t need a dedicated machine for it), but if you actually need stable dev servers, go for a dedicated ESXi hypervisor instead.
When I still had my internal servers available, I never ran anything but my favorite text-editor on my own workstation. On my Microserver, which ran a few VMs, which of one was a Debian webserver.
I’ve stopped running my dev web servers on barebone machines, they’re always virtualized, my reasoning is, backup is a lot easier, just shutdown the machine and copy the machine over to a backup disk, and you have a lot more freedom in testing different things without having to worry about breaking the machine. And if it breaks, you just copy over the backup, and start off where you left off. Another great thing with running virtualized is that testing more large scale things, spanning multiple servers, or segregating different experiments is far more cheap than actually running 3-4 machines.
Anyway, back to my setup, one barebone server, which runs on a windows operating system, that in turn have multiple VMware machines running on it. There’s a few reasons to why I choose to run a Windows OS as the base system, one, the most obvious one, is that VMware player runs on windows flawlessly, and, secondly, the base system usually run other services that I need for the other windows machines (e.g. backup).
My white label Debian machines usually run Apache, MySQL, PHP, some various mods for Apache and lastly Samba. I then share the webroot through Samba to my work machine, where I actually do the coding.
I’ve been an avid notepad++ user for the last 5 years, I’ve liked it’s simplicity, and I’ve never been really fond of auto complete functionality (even though I believe notepad++ does offer it).
But after some recommendations at work I’ve now started to use Sublime Text 2. While it does take some time to get used to, I do find it rather nice. I like the concept of opening folders and having everything in one window, the syntax highlighting on the other hand, is awful, I have yet to find a single theme that I like (Though I can’t claim I’ve really been out looking for themes, only tested the default ones).
In Vaasa, when everything was still operational, I had one VM for random testing and another almost-but-not production server. The “production” server was port forwarded and I used DynDNS to reach the server. The server backed up itself with a bash script to my router/modem over FTP, the modem had a USB slot where I had a 500GB disk attached.
The Microserver also had DHCP, DNS, AD and fileserver duties. Putting all these services on one server is against best practice and you shouldn’t go this route, but seeing as I only serve two users, I did it anyway.
Today, in Stockholm, with all my gear packed up in Vasa, I’ve resorted to a much more simpler version of the above. Armed with only my laptop, I only have VM sporadically in use, which is the same dev VM that I had running on my Microserver. Before I packed it up (the Microserver), I dumped all the production DBs from my production VM, because I knew the probability of me getting a server in Stockholm before I had retrieved my servers from Vasa. (And rightfully so). I don’t have any real DNS capabilities, but use my hosts file to mimic as much as I can.
My work setup at bazooka is pretty much the same as my home setup, a Dell laptop with 8GB RAM and a i7 processor, running three VMs. Two of these VMs are normal LAMP servers, the first is a project specific server, which has one large magento insall and the other one is marked as my random/various project server, the third is a MySQL only server which I do DB analysis on. All the code is then source controlled with either Git or SVN to a ‘real’ server.
There’s also a shared dev server where “stable” development code goes, this is where we try to keep things clean.
At Devotia, we ran almost our entire (dev) network on two ESXi servers (and later only one) which mounted their data from a local Debian storage server. The storage server had two primary services running, NFS (For ESXi and Linux clients), Samba (for Windows clients). We used four 1TB drives in a RAID 1+0 array which was handled by mdadm. Daily backup of the source code to two offsite locations as well as about every 6 months we did a complete backup of the whole network (all the VMs, source code, dev data etc.)