Automated builds and deployment with exrm

I’m trying to find the best way to dynamically generate exrm releases in a clustered environment where hot code reloading is important. Here’s my plan so far:

  • Have a repo separate from my source code to keep the rel directory. This way there won’t be any bots committing to the source repo
  • When there’s a new commit on master, a build is triggered. A CI server pulls the latest source code, and then clones the rel repository into the source folder
  • A release is built, and because we have previous releases stored in version control, the proper appup files are generated
  • The release is commited to the rel repository
  • On each app server, the rel repo is cloned. If the app is not yet running, the most recent build is untarred into /tmp/app. If the app is already running, the most recent build is pulled into a subfolder in releases, and /tmp/app/bin/app upgrade "new-version" is run

Does this seem like a valid approach? Has anyone come up with anything better?

I haven’t seen any examples of a good automated release process that keeps code-reloading in mind


@pdilyard I am sorry no one responded to you, but your questions are really interesting. Did you find our your correct approach to the deployments? if so, I’d be delighted if you could share it.


At this point I’ve just started using It seems to be working ok for now, though I just don’t have enough time under my belt with it to know for sure.

I plan on making some changes to the Ansible role to customize it a little more (possibly use a build server instead of building on the target machine, and maybe committing the releases to make downgrading more possible).

I’ll post back here in a few weeks when we’ve experienced several more production releases.


Cool. Possibly good choice with ansible. I haven’t used it in Elixir but I know it from second life as a Ruby developer :wink:


You can try pinging @HashNuke directly. He should be able to answer your questions :slight_smile:


I’ve had a look at (but not yet used) edeliver. It seems promising, allowing you to build both standalone releases and upgrades between any two versions of your choice. It can also take care of deployment, both to test and prod environments.

We’ve been rolling our own releases so far at work, but will probably try out edeliver sometime soon.

1 Like

I’m using HashNuke’s role for staging environment and it works fine so far. When I was looking for elixir deployment solutions, I stumbled across another role which includes separate build server. It builds release on build server, pushes it to repository and then downloads it on production server. Unfortunately can’t find it now. I’ll get back to you as soon as I find it.

Edit: found it: but I haven’t tested it.

1 Like