Thursday, January 15, 2015

Omnibus for Offline Installs

Software repos are wonderful things, man.

Until your servers are offline, of course... that's no good.

Or if they're online, but not allowed to update but once a year.

Or worse yet, they only get whatever updates are considered mission-critical by IT, and there's no way in hell you're going to get the right versions of your dependencies installed at deploy time.

At the end of the day, trying to get anything installed at a customer site that has externally-hosted dependencies is almost guaranteed to be more of a pain than it's really worth.

So what can be done? Well, a few ideas come to mind...

  • Tar up your top-level dependencies, push it out at deploy time, and hope for the best. Then watch as all the installs fail because dpkg or rpm can't satisfy the dependencies of your dependencies
  • Script out something like  'apt-get --print-uris --yes install <stuff>' and wget the results so you can tar 'em up, push 'em, and install 'em. Then watch as your next deploy fails miserably because the customer did their quarterly security patches and broke your dependency chain all to pieces
  • Containerize all the things! This actually might work just dandy depending on what your software does. In some cases though, your software needs more intimacy with the hardware than a container can offer (mostly ultra-low-latency IO and the like). Plus it might mean introducing technologies that your customer is unwilling to accept on their systems...
  • Stick it all in a single package and jail it all in /opt. Winner!
Enter Omnibus. You get to include every dependency above libc in the correct order and specify how to build each one, jailing them in /opt/<name> (or wherever you want, really). Then you get a nice shiny package out of it (pretty much any platform you want) and can confidently install it nearly anywhere without having to worry about whether or not you can get to any external repos.

I'll see about putting together a Cody-fied (read: spoon-fed) how-to on getting started with Omnibus shortly.

In the meantime, if you're already using Omnibus and your builds are taking forever due to your software cache getting nuked every time you try to add a dependency, check this out.

No comments:

Post a Comment