-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize capistrano post-deploy tasks #1341
Conversation
**Why**: chmod necessary post-deploy but we can cut down on already-fixed files. Restart passenger post-chmod so that web nodes are synced.
@@ -86,10 +86,17 @@ | |||
desc 'Modify permissions on /srv/idp' | |||
task :mod_perms do | |||
on roles(:web), in: :parallel do | |||
execute :sudo, :chown, '-R', 'ubuntu:nogroup', deploy_to | |||
execute :sudo, :chown, '-R', 'ubuntu:nogroup', deploy_to + '/current', '/srv/idp/shared' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience the chown
has occasionally timed out (too many files?) so adding more directories and files to this seems like it would make things worse? And potentially block things after it like passenger:restart
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reduces the effect of the chmod command to only the current directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and specifically, the shared) instead of all of the /srv/idp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh sweet 👍 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change makes fewer files because it is acting on /srv/idp/current /srv/idp/shared
rather than all of /srv/idp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACTUALLY PETER, I'm going to cut you off right there 🎙 ....
Peter doesn't always test his PRs, but when he does, he does it while promoting code to production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh. QA'd in qa
env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
**Why**: chmod necessary post-deploy but we can cut down on already-fixed files. Restart passenger post-chmod so that web nodes are synced.
Why: chmod necessary post-deploy but we can cut down on
already-fixed files. Restart passenger post-chmod so that web nodes
are synced.