Created
July 12, 2015 02:10
-
-
Save mpahrens/88e8812a1d7b3dfc9a13 to your computer and use it in GitHub Desktop.
Release steps for Blockytalky elxir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The TL;DR of the release is to make a compiled binary (that runs really fast) with erlang and elixir bundled, to just drop on a raspberry pi and run. | |
This has the following steps: | |
0) get the arm-friendly erlang (it is in the repo in a tarball) | |
1) Compile the fancy js and scss into plain js and css | |
2) Bundle the static assets into tarballs | |
3) Update version number or clean for rerelease | |
4) compile and make a release bundle and tarball | |
5) update the github | |
6) deploy on blockytalky (rpi) | |
0) | |
In your dev environment, make sure you have the erlang.tar.gz uncompressed somewhere in your filesystem. Change the location of it in: | |
`blockytalky/rel/relx.config` from /vagrant/erlang and /vagrant/erlang/lib to wherever you put this erlang directory. this is the version of erlang and the version of erts that will be bundled. If we wanted to make a release build that was x86 friendly, we could do that at some point. | |
1) | |
if you do not have brunch installed (which brunch) run: | |
`npm install -g brunch` | |
in the blockytalky directory, run: | |
brunch build --production | |
2) | |
in the blockytalky directory, run: | |
MIX_ENV=prod mix phoenix.digest | |
3) | |
if you are "rebuilding" a release, (you are not changing the version number), make sure to run: | |
`MIX_ENV=prod mix release.clean` It may fail the first time (bug in 0.18.4 of exrm) so run it again | |
else if you are making a new release with a new version. update the version number in blockytalky/mix.exs. | |
4) | |
in the blockytalky directory, run: | |
MIX_ENV=prod mix release | |
if you want to see what is going on, run instead: | |
MIX_ENV=prod mix release --verbosity=verbose | |
This uses the exrm project to build. read the docs there for help: | |
http://www.phoenixframework.org/v0.14.0/docs/advanced-deployment | |
https://exrm.readme.io/docs/getting-started | |
note: cross-compiling (x86 to arm) the way we want it is only supported in v0.18.4 and onwards | |
5) | |
commit this to develop. | |
Make a release branch if there is anything in master you do not want in develop (config changes, etc.) then commit to master with the tag v#.#.# matching the release number in mix.exs | |
6) | |
if the rpi is autorunning from the git cloned directory. just pull the latest master | |
otherwise, if you have it running the binary from elseware or you are setting it up for the first time. Make sure that the start command of your boot script runs the script corresponding to: | |
(sudo) rel/blockytalky/bin/blockytalky start | |
and stop corresponds to: | |
(sudo) rel/blockytalky/bin/blockytalky stop | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment