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

COOK-2484: Create virtualenv and install requirements as uid/gid specified in application resource properties #22

merged 2 commits into from Mar 7, 2013
Jump to file or symbol
Failed to load files and symbols.
+3 −0
Diff settings


Just for now

Viewing a subset of changes. View all

COOK-2484: setting HOME env var to app shared directory when installi…

…ng requirements
  • Loading branch information...
Cameron Johnston
Cameron Johnston committed Feb 26, 2013
commit 5add1f4774da7cbc01b4316e4cd92703d6b5daf6
@@ -60,6 +60,9 @@
pip_cmd = ::File.join(new_resource.virtualenv, 'bin', 'pip')
execute "#{pip_cmd} install --source=#{Dir.tmpdir} -r #{new_resource.requirements}" do
cwd new_resource.release_path
# seems that if we don't set the HOME env var pip tries to log to /root/.pip, which fails due to permissions
# setting HOME also enables us to control pip behavior on per-project basis by dropping off a pip.conf file there
environment 'HOME' => ::File.join(new_resource.path,'shared')
user new_resource.owner
ProTip! Use n and p to navigate between commits in a pull request.