Skip to content
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

Merged
merged 1 commit into from
Apr 7, 2017
Merged

Optimize capistrano post-deploy tasks #1341

merged 1 commit into from
Apr 7, 2017

Conversation

pkarman
Copy link
Contributor

@pkarman pkarman commented Apr 7, 2017

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.
@@ -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'
Copy link
Contributor

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 ?

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sweet 👍 💯

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@amoose amoose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@pkarman pkarman merged commit ddf2946 into master Apr 7, 2017
@pkarman pkarman deleted the pek-rc-2017-04-19 branch April 7, 2017 19:48
pkarman added a commit that referenced this pull request Apr 11, 2017
**Why**: chmod necessary post-deploy but we can cut down on
already-fixed files. Restart passenger post-chmod so that web nodes
are synced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants