If any of you are like me, you’ve read all of the Habitat marketing and have bought into this idea of decoupling your app from your Operating System. It’s a great goal and a lofty claim.
So I set out to test it.

Using Terraform, I built out a three node postgresql cluster on Ubuntu 16.04. The key here was I created a separate datastore, and mounted it under /hab, so I have my OS and everything underneath /hab is effectively isolated.

hab-sup(MR): Can't create directory /hab/svc/postgresql: hab-sup(ER)[components/sup/src/error.rs:460:46]: Package requires user hab to exist, but it doesn't
hab-sup(MR): If this service is running as non-root, you'll need to create /hab/svc/postgresql and give the current user write access to it

Once I mounted my /hab partition, created my systemd init script, linked /bin/hab to the right location, and created my hab user, I was off and cooking with gas having successfully changed out the OS underneath the application.