Hacker News new | ask | show | jobs
by marksellers 3158 days ago
I've done development with all the databases, languages and packages installed on the host machine, as well as with vagrant. With the VM, I have to ssh in, or switch windows to run tests, whereas before I could just run the tests in vim. How do people achieve fluency with these?

I suppose I could install some more of my tools on the VM, but if you take that to its absurd conclusion, I'm just running a clone of my host on the VM.

It seems more useful, maybe, to just run databases and other services in the VM. Those are the more difficult bits to manage usually. A good programming language already has version and package management facilities.

Or perhaps am I missing something? Anyone have another workflow?

4 comments

Jetbrains IDE has a good SSH & Vagrant support so mostly I create tools/tasks that launch through ssh (or use the built-in ssh client but that's like any console except you can stay in the IDE), same for the database tool.
We don't use Vagrant, but we use VMs. The workflow is a little bit more convoluted than directly on the host, but we get the benefits of having a consistent way to create environments that are closer - if not identical - to what our customers have.

In essence, we do most of our development on Windows, but deploy our solution on Linux. For databases, our former development environment relied on Windows drivers that didn't have the same bugs than the Linux implementations. Hence, we caught these bugs much later in the development phase.

Another advantage is that we can deploy different releases of our solution simultaneously.

Of course, the cost to get there was to define a new pipeline to build artefacts that we ship on the boxes, but that was a little price to pay.

I have automated from-scratch builds for cluster setups, eg:

https://github.com/ianmiell/shutit-openshift-cluster

https://github.com/ianmiell/shutit-chef-env

I'll be blogging about some of these soon as well

I have never been able to find a performant way to mount host files on a VM, so I just use a headless Ubuntu running in VMware as my dev environment. File mounting in docker containers doesn't have the same speed penalty on a Linux host as it does on win/Mac. I use tmux and vim. I've been using this setup happily for years now.