From b49441ef1c4de527a77a42ad8d17139b0aae70ca Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 8 Nov 2015 09:01:37 -0500 Subject: [PATCH] Install pip data to a non-production location If we configure pip to install data to our real data location, then pip helpfully tries to back it up before doing an operation. Problem is, pip isn't actually installing data to that location, and we have a lot of data. Misdirect pip so that it thinks an empty dir is what it should manage. Change-Id: I28cf2b7ce69023b7d30b9faf2a88185905ecbfee --- manifests/init.pp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index a1432d7..6572157 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -46,8 +46,10 @@ class graphite( source => 'https://github.com/graphite-project/graphite-web.git', } + # Install data to /usr/local/share because it's example data and + # we don't want pip to know about our real data location exec { 'install_graphite_web' : - command => 'pip install --install-option="--install-scripts=/usr/local/bin" --install-option="--install-lib=/usr/local/lib/python2.7/dist-packages" --install-option="--install-data=/var/lib/graphite" /opt/graphite-web', + command => 'pip install --install-option="--install-scripts=/usr/local/bin" --install-option="--install-lib=/usr/local/lib/python2.7/dist-packages" --install-option="--install-data=/usr/local/share/graphite" /opt/graphite-web', path => '/usr/local/bin:/usr/bin:/bin', refreshonly => true, subscribe => Vcsrepo['/opt/graphite-web'], @@ -62,8 +64,10 @@ class graphite( source => 'https://github.com/graphite-project/carbon.git', } + # Install data to /usr/local/share because it's example data and + # we don't want pip to know about our real data location exec { 'install_carbon' : - command => 'pip install --install-option="--install-scripts=/usr/local/bin" --install-option="--install-lib=/usr/local/lib/python2.7/dist-packages" --install-option="--install-data=/var/lib/graphite" /opt/carbon', + command => 'pip install --install-option="--install-scripts=/usr/local/bin" --install-option="--install-lib=/usr/local/lib/python2.7/dist-packages" --install-option="--install-data=/usr/local/share/graphite" /opt/carbon', path => '/usr/local/bin:/usr/bin:/bin', refreshonly => true, subscribe => Vcsrepo['/opt/carbon'],