I think you will not find a silver bullet. Distributing Erlang is similar to distributing Ruby; however Ruby has the advantage of being included in many default OS installs.
I know ejabberd has pre-built binaries for many distros. You might investigate how they do it.
The correct solution probably depends on how many "multiple platforms" you are targeting. If it's "Ubuntu 8.04 plus Ubuntu 10.04" that is different from several Linux distros, plus OSX, plus FreeBSD. Typically only open source projects support those many platforms and ideally you can get patches from the community. For internal projects, I have seen teams standardize on a Linux build and use virtualization on Mac/Windows.
But back to your question:
Building from source is a reasonable option. You could build when you deploy, or pre-build for all platforms and then deploy the binaries. Both Erlang and CouchDB use Autoconf which means you can --prefix
them to a dedicated location (more-or-less standalone apps). It will take some trial and error but your build script can
- Platform-specific dependency setup:
gcc
, make
, autoconf
, everything you need. apt-get
on Ubuntu, yum
on RHEL, Macports, whatever you need to get a common platform on your development and deployment system
- Compile and install the rest using the tools from step 1. Use
configure --prefix=/opt/my_software
to keep it all in one place. (You can totally uninstall with rm -rf
.)
This is an medium-level challenge--mostly trial and error. If possible, work within a build framework such as Rake or Toby's suggestion passenger_stack
. Good luck!