Erlang support #20

Closed
wants to merge 3 commits into
from

Projects

None yet

6 participants

@paulj

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

@trotter

You're my hero.

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

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?

paulj added some commits Apr 14, 2011
@paulj paulj Add erlang-nox to setup file abb59f4
@paulj paulj Change framework to otp_rebar.
Also includes details of deploying a non-trivial Erlang/OTP app, and supports multiple isolated Erlang installs.
e8c8c62
@paulj

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.

@tarcieri

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

@pbozeman

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.

Thanks!

@pbozeman pbozeman closed this May 3, 2011
@pbozeman

pulled. Thanks!

@ciberch

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment