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

deploy to a different dir to fix hot upgrades

Open manukall opened this issue 10 years ago • 11 comments

this still uses /srv/apps as directory for the running app.mostly because i already started when i saw your comment. i've seen this pattern often before though and the directory is owned by the deployer user.

upgrading the role requires manually stopping your app once, though. (stop app, run ansible setup). after that, everything work's automatically again.

manukall avatar Aug 10 '15 11:08 manukall

@manukall Thank you. I'll make some more changes tomorrow and merge these.

HashNuke avatar Aug 10 '15 12:08 HashNuke

@HashNuke any news on this? i also have a PR that enables gzip compression, but i realized that my branch for that also includes the changes here...

manukall avatar Aug 14 '15 09:08 manukall

@manukall I have some changes too. I'll merge this in and make my changes tomorrow.

HashNuke avatar Aug 14 '15 11:08 HashNuke

@HashNuke thanks! i noticed that the order of the steps in the "restart" branch could be changed to not have that much downtime now. maybe that would be a nice improvement.

manukall avatar Aug 14 '15 11:08 manukall

@manukall sure. That would be very helpful. I'll work on this PR and then you can brach out from latest master to work on that so that there are no conflicts.

HashNuke avatar Aug 14 '15 11:08 HashNuke

@manukall I've been working on the hot-reload-fix branch on some changes.

Right now using, $HOME/srv/{{ app_name }} for deployer user to serve apps (so when someone logs in as deployer they see the whole structure when they just ls. Yet test to test my changes. I'll do it today.

HashNuke avatar Sep 01 '15 01:09 HashNuke

cool. it looks as if you're keeping the deploy_path configurable. that's great, because then i might be able to switch back to your version. i'm already in production and don't want to change directories on my live server. also, i noticed you got rid of my hack for the app_version. i did that, because i have some output when my app starts. so you're version here won't work for me and possibly others. i also have some more changes that i might be able to create pull requests for later.

thanks again!

manukall avatar Sep 01 '15 07:09 manukall

@manukall Oh makes sense. I forgot to ask you about that. I'm sure there are others that output stuff too. I'll revert to the RELEASE_VERSION hack.

HashNuke avatar Sep 01 '15 07:09 HashNuke

@manukall reverted to your hack for app version. If you happen to make a deploy with the hot-reload-fix branch, do let me know how it goes.

HashNuke avatar Sep 01 '15 07:09 HashNuke

@HashNuke Has this been resolved?

rubytree avatar Jan 03 '16 19:01 rubytree

@rubytree Not yet. I'll do it this weekend for sure.

HashNuke avatar Jan 04 '16 05:01 HashNuke