Erlang support #20

wants to merge 3 commits into


None yet
6 participants

paulj commented Apr 15, 2011

Support for deploying Erlang/OTP applications that have been packaged via Rebar.

You're my hero.

It looks like this may just work if you also add apt-get install erlang to setup/vcap_setup.


paulj replied Apr 14, 2011

Oops. Missed that bit. Presumably I'll want erlang-nox to prevent the X dependent component coming in.


paulj replied Apr 14, 2011

Applied now in abb59f4 (edited: the original commit wasn't printing a message properly, so I updated it)

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...


paulj replied Apr 15, 2011

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?


paulj replied May 9, 2012

@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?

paulj added some commits Apr 14, 2011

Change framework to otp_rebar.
Also includes details of deploying a non-trivial Erlang/OTP app, and supports multiple isolated Erlang installs.

paulj commented Apr 16, 2011

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/ describing how to deploy a non-trivial Erlang application (Sean Cribb's riak_id -

Feedback on whether the revised approach seems feasible would be much appreciated.


tarcieri commented Apr 16, 2011

Looks good to me... I might try pulling your changes and testing it out


pbozeman commented Apr 17, 2011

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.


@pbozeman pbozeman closed this May 3, 2011


pbozeman commented May 3, 2011

pulled. Thanks!

ciberch commented Mar 28, 2012

@paulj thanks for this contribution I got mochiwebtest up and running on my vcap instance !

michaelnsj referenced this pull request in michaelnsj/vcap Feb 6, 2013

Merge pull request #20 from arkxu/java_start
should not remove pid it could be ps is not ready yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment