ansible-elixir-stack icon indicating copy to clipboard operation
ansible-elixir-stack copied to clipboard

Hot code-reloading deploys error out during upgrades

Open HashNuke opened this issue 10 years ago • 7 comments

An issue related to exrm or relx causes creating releases to error out. I've reported the issue here - https://github.com/bitwalker/exrm/issues/167

Been updating details from debugging sessions and identified the problem.

HashNuke avatar Jul 19 '15 13:07 HashNuke

i wonder if the solution to this is to simply run the app from another directory, as the exrm doc suggests. would you accept a PR that adds a /srv/app/{{ app_name}} directory and deploys the app there?

manukall avatar Aug 09 '15 11:08 manukall

@manukall Yes. that would be wonderful. Right now the ansible scripts just start the release in the place it's built. The setup needs to follow the exrm docs instead and start the release after copying it elsewhere. By deploying to another directory (like /home/{{ deployer_user} }/srv/{{ app_name }} is a good place because all apps are under the non-root deployer user.

HashNuke avatar Aug 09 '15 12:08 HashNuke

Haven't looked into this yet. I'll do it by this weekend.

HashNuke avatar Aug 19 '15 15:08 HashNuke

@HashNuke I've followed the docs. And I get an error that some how I couldn't get past :disappointed:

During this step

TASK: [HashNuke.elixir-stack | upgrade app] *********************************** 
<> ESTABLISH CONNECTION FOR USER: deployer

I get this error

stderr: fs: -c: line 0: syntax error near unexpected token `newline'
fs: -c: line 0: `rel/myapp/bin/myapp upgrade ==>'

I tried upgrading the exrm release manually and it works. Seems to be a problem with shell script? It would be great you could help :+1:

vysakh0 avatar Jan 20 '16 10:01 vysakh0

Hot-code reloading is broken AFAIK. I'll have to update it this weekend.

On Wed, Jan 20, 2016 at 4:04 PM, Vysakh Sreenivasan < [email protected]> wrote:

@HashNuke https://github.com/HashNuke During this step

TASK: [HashNuke.elixir-stack | upgrade app] *********************************** <> ESTABLISH CONNECTION FOR USER: deployer

I get this error

stderr: fs: -c: line 0: syntax error near unexpected token newline' fs: -c: line 0:rel/myapp/bin/myapp upgrade ==>'

I've followed the docs and the versions are different, some how I couldn't get past this. I tried upgrading the exrm release manually and it works. Seems to be a problem with shell script? It would be great you I could help [image: :+1:]

— Reply to this email directly or view it on GitHub https://github.com/HashNuke/ansible-elixir-stack/issues/4#issuecomment-173165089 .

HashNuke avatar Jan 21 '16 02:01 HashNuke

I would like to experiment with hot upgrade, so a fix would be welcome.

pinx avatar Mar 16 '16 23:03 pinx

@pinx being worked upon in another branch. Here's the status https://github.com/HashNuke/ansible-elixir-stack/issues/23. Hopefully will be over by this weekend.

HashNuke avatar Mar 17 '16 00:03 HashNuke