Note: this is an evolutionary continuation from my previous question on a similar topic.
I have been searching for the 'best practices' regarding deploying and updating an Erlang/OTP release (a set of applications) for some time now, but I could not find any direct solutions descriptions, but some 'related information' only:
http://blog.equanimity.nl/blog/2013/06/04/continuous-integration-for-erlang-with-travis-ci/
https://www.youtube.com/watch?v=G0eBDWigORY
https://www.youtube.com/watch?v=0ZGHzI9F5YE
What I mean by a 'direct solution' is the answer to the following question:
Given a production Erlang/OTP cluster with an Erlang/OTP release running on several Erlang nodes that serve as a highly available (24/7) REST API, how one can regularly push new code to that production cluster? Is there any best practice for doing that which is as easy as git push heroku master
with Heroku? If not, what is the simplest way to continuously re-deploy and Erlang/OTP software in production?
I have read the 'Erlang/OTP in Action' book to understand how to deal with Erlang/OTP applications and releases and it seems to me that a simple software upgrade is not that easy. When using reltool
you have to generate an archive, move that archive to the production machine (scp
?), unpack it there, run the Erlang shell and load the new modules into the Erlang VM.
Also, the 'Learn You Some Erlang' book states the following:
"...if you can avoid the whole procedure (which will be called relup from now on) and do simple rolling upgrades by restarting VMs and booting new applications, I would recommend you do so."
and
"It is said that divisions of Ericsson that do use relups spend as much time testing them as they do testing their applications themselves."
Additionally, here is another recommendation to avoid hot swapping for releases for Erlang in production.
If that is true, then I do not see any usefulness of 'Erlang hot code upgrades', since I would have to restart the VM with each upgrade. And this leaves me without any knowledge of a robust and tested method of regular deployment of new code for Erlang/OTP in production.
P.S. A few notes on my software requirements.
- I am writing a set of API entry points without any sessions, so there is no need to maintain session during software updates.
- There is no need to distribute the Erlang/OTP release, I am working with an in-house custom product.