Support for deploying Erlang/OTP applications that have been packaged via Rebar.
Add erlang support.
You're my hero.
It looks like this may just work if you also add apt-get install erlang to setup/vcap_setup.
apt-get install erlang
Oops. Missed that bit. Presumably I'll want erlang-nox to prevent the X dependent component coming in.
Applied now in abb59f4 (edited: the original commit wasn't printing a message properly, so I updated it)
This is looking interesting.. :)
Awesome. But shouldn't the associated framework be "otp" instead of "erlang"? Or are you intending "erlang" to support vanilla Erlang programs that don't have a .app file?
I'll have to pull this and play around with it...
To be honest, I hadn't really thought about drawing that distinction.
The app file isn't particularly important, I'm mainly just using it as a signal to find the application, and also to work what to call -s on. Strictly speaking, I'm not even starting it in an OTP manner, since I'd need to use -exec 'application:start(name)' to do that.
Maybe I should look for .rel files, and use that to describe the startup sequence?
That would definitely make sense.
I mention this only because OTP is always explicitly called out as the framework for Erlang programs and the system itself is typically described as Erlang/OTP. Given that I think "otp" would make the most sense as the name of the framework associated with Erlang programs.
How well could this be used as a template for other frameworks? Does some kind of template exist for adding other languages/frameworks?
@financeCoding this commit shows a starting point, but unfortunately the CloudFoundry codebase has moved on quite a bit, and you'd need to trace through the various refactorings that have been done in order to make it work with a recent codebase.
Perhaps @ciberch might be able to point you in good direction for a more recent template?
Add erlang-nox to setup file
Change framework to otp_rebar.
Also includes details of deploying a non-trivial Erlang/OTP app, and supports multiple isolated Erlang installs.
I've refactored the support quite a bit now to be based on Erlang/OTP (using rebar) instead of just pure Erlang (which was probably making too many assumptions). I've also added a docs/erlang-otp.md describing how to deploy a non-trivial Erlang application (Sean Cribb's riak_id - https://github.com/seancribbs/riak_id).
Feedback on whether the revised approach seems feasible would be much appreciated.
Looks good to me... I might try pulling your changes and testing it out
We'll get reviewed and pulled shortly, pending any feedback. That being said, before we can pull it, we want to add the ability to enable/disable frameworks so that we don't disrupt the large production system at Cloud Foundry until this has been through our load/stress tests. We'll enable it in the Microcloud context out of the gate though.
@paulj thanks for this contribution I got mochiwebtest up and running on my vcap instance !