
Ask HN: How do you keep your dev environment(s) portable? - relaunched
Recently, I had to move machines...and it was a nightmare. Moving my applications, dependencies, config files, plugins, etc.; it is insane. I&#x27;m still finding libraries that I need to replace to get things to move.<p>How do you all keep everything organized and portable? What are some easy ways to stay organized when moving from machine to machine?
======
moron4hire
This is a big part of why I insist on packing library dependencies in version
control with my projects that use them. I've found that it's better to have a
known good state than it is to be kept up to date with the latest versions of
libraries automatically. It's not that hard to upgrade an existing library. I
personally find it harder to find a library at all.

I keep a separate hard drive for project stuffs. It's not just for source code
or image files, I also install the software I use to work there. Tools, IDEs,
libraries, content packs, documentation, anything necessary for work, goes on
that hard drive.

That way, in the case of a full OS reinstall, I at least have the program
installation directories as a TODO list.

Also, all of my code is in Github somewhere. I don't have "my HDD only" code
anymore. I have one project called "snippets" where every tinkering starts
life, eventually to be carved off into its own repository if I like it and I
spend significant time on it.

I wish I had something like this for my photos. I was using Dropbox for
several years, then Google Drive because they offered a lot more space for a
lot less money. But I've found that they are only good at restoring small
changes. Completely restoring a system burns a lot of bandwidth, takes
forever, and I ran into some nasty merge conflicts that destroyed some of my
data. I've had both destroy so much data on so many occasions that I just
don't consider them to be backup services anymore, they are simple file
publishing services.

How do you backup 200GB of images without having to become a sysadmin in your
own home? I just want to shoot photos and write code.

------
mousetree
I typically use Vagrant to create virtual machines dedicated to a specific dev
environment. The Vagrant VM is usually provisioned by using Ansible.

When moving machines I just re-run 'vagrant up' which will create a new Ubuntu
VM and install all the software I need.

Here's an example of one of my VMs using Ansible:
[https://github.com/RealImpactAnalytics/vagrant-
dev](https://github.com/RealImpactAnalytics/vagrant-dev)

