Hacker News new | past | comments | ask | show | jobs | submit login

Some context. I started this current gig 18 months ago. I develop on Ruby on Rails (of course), and ultimately deploy it into the Rackspace Cloud. I also wanted to mess around with Opscode Chef. I had also watched friends and business partners struggle with MacPort for years, and watched them struggle with bundler and rvm more recently. I wanted to skip that.

I'm actually using VMWare Fusion. My employer had an extra copy. I run VirtualBox at home. The platforms are not exactly the same, but my beefier gaming box running (now older version) of VirtualBox seem slower. For the purpose of developing in a VM, I don't think it really matters between VirtualBox or VMWare technology-wise, as long as you have some sort of command-line tool to bring up new VMs.

I wrote some bash scripts to clone VMWare images, including filters to search name references and rename them to the image. You can use Vagrant to do the same with VirtualBox, and from the demos I've seen, it is a easy way to get into this setup on your MBP.

I built out a template with 256M + 10 GB slices, just like on Rackspace Cloud. On the i5 MBP, I allocated a single core to each slice. On my current i7/8GB setup, I'm allocating two cores. I've also had to beef up two of the slices from 256M to 512M and 1G so that I could run the full rspec against the apps. I have tried allocating all 8 hyperthreaded cores, but I guess VMWare Fusion isn't quite like Xen. I generally run no more than two slices at a time. VMWare Fusion makes it relatively easy to suspend VMs, and I don't jump around on a number of projects so I have not needed to hot-potato things much.

I had not had problems with VMWare with regards to idling. Both VMWare Fusion and VirtualBox are now using Xen-style paravirtualization, so when it is idle, it sits idle. When it does eat up computing cycles when idle, it has more to do with Rails (or Merb) polling inappropriately. With this setup, I've had problems on the i7 MBP kicking up the fan for no apparent reason and I suspect it is Chrome or Flash.

Wakeup/suspend by closing the lid works on the VMs. Linux doesn't even know the VMs have been suspended, so I don't mess with any kernel settings for that. On the downside, these VMs currently run on an independent wall clock which means resetting the clock if I want accurate timestamps on commit logs. There's probably a setting to fix that.

I'm using Gentoo for the distro, but that doesn't matter as much as using the distro you like or better yet, using the distro you are deploying against.

Editor-wise, I am shelling in with ssh and using vim + Rails.vim against screen. (I'm also using Terminal.app + Visor and iterm2 w/ visor mode). I have a customized /etc/hosts file with shortnames for the VMs so I can shell in fast on the occasions I do shell in. (I have flirted with shelling in and using Emacs -- it works wonderfully well, if I wanted to abandon VI modal editing).

Each slice is configured with two virtual ethernet devices, one going to physical ethernet device (bridged) and one going to the virtual LAN (no NAT). Since I sometimes go use free wifi and they require IP authentication, I don't see the point of exposing the internal slices to the world. Instead, I installed Nylon through MacPorts and have it turned on to accept SOCKS5 requests from anything inside the virtual LAN. On the VM side, I have proxychains set to talk to Nylon on the outside. This way, I only have to web-authenticate once on the free wifi and prepend my git pushes with proxychain. With the virtual LAN, the intent was so I can always shell into my vm on my laptop regardless of my external network connectivity.

One nice thing about this setup: at some point, when the Gems start accumulating and start bogging down load time for Ruby and Rails, I can drop it and clone a new VM.

Due to some circumstances, I'm going to be getting an i7 Air by the end of this month and I'll replicate the setup. I may use Homebrew or Gentoo Prefix on the host side, but I'll still continue to use some sort of virtualization of Linux. I'm skeptical about drinking the 'brew ...

I have a friend with a similar setup. The friend has to run Windows to do proper browser testing so he has different requirements. He also has FUSE running with a Samba shared folder so he can use TextMate on the host side and run things on the Linux side. I've only had a few occasions where I wished I could do that, virtual DropBox-style, but it hasn't reached the level of scratching-itch yet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: