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
This commit is contained in:
Monty Taylor 2015-11-08 09:01:37 -05:00
parent c9a9d607c2
commit b49441ef1c
1 changed files with 6 additions and 2 deletions

View File

@ -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'],