bitwalker / exrm

Automatically generate a release for your Elixir project!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade releases and storage...

danturn opened this issue · comments

Hi, definitely a question and not an issue but:

We intend to generate releases on across a number of CI servers and push them to a prod server performing an exrm upgrade to the new version.

in order for the CI servers to generate the correct relup do they all need to be able to see all versions? i.e. do they all need to have every release in their rel/APPNAME/releases folder so they know how to upgrade?

just wondering how generally people do this. if you always build from one server or something or if there's another way to do it. ideally i would like to be able to create releases anywhere and deploy them as upgrades but i'm not sure how to do it

dan

@danturn You only need the version you are upgrading from, but not all previous versions. Typically people have a build server which stores the artifacts from previous releases, and makes them available when building the release. How you do that depends entirely on your build environment, but the gist is generally:

  • Store the tarballs somewhere
  • At build-time, make sure the tarballs are available to the build process
  • Extract the latest tarball to the rel/<app> directory either via a plugin and the before_release callback (my recommendation), or your overall build script.
  • After a successful release, store the generated tarball

That's it. How you choose to store the tarballs or extract them at build-time is more or less up to you.