This repository has been archived by the owner on Jan 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install Graphite, Carbon, Whisper, and (nearly) all dependencies into a virtualenv using the `stankevich/python` module. This retains the same sandboxing that `--install-option`/`--prefix` was doing, but with the added benefit of: - Allowing the version param to upgrade and downgrade the packages without writing the `pip` logic ourselves. - Isolating dependencies from the system's Python/pip paths. Absolute binary paths are used to reference the virtualenv without needing to `source bin/activate` each time. Cairo is shimmed into the virtualenv from the system package because of the reasons described in the class doc. I've rebased the dependencies against Graphite's `requirements.txt` to reference specific versions and dropped: - LDAP support: because it has compile dependencies and I'm not aware of anyone currently using this functionality from the module. - pysqlite2: because Python >=2.6 has this builtin. I'm using an earlier version of the `python` module because of the following bug which causes the virtualenv to be recreated on every run: - voxpupuli/puppet-python#46 Tests will be committed separately because they depend on refactoring currently in unmerged PR #16.
- Loading branch information
Showing
8 changed files
with
66 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
# == Class: graphite::deps | ||
# | ||
# Class to install all graphite dependency packages | ||
# Class to create a Python virtualenv and install all graphite dependencies | ||
# within that sandbox. | ||
# | ||
# With the exception of pycairo which can't be installed by pip. It is | ||
# installed as a system package and symlinked into the virtualenv. This is a | ||
# slightly hacky alternative to `--system-site-packages` which would mess | ||
# with Graphite's other dependencies. | ||
# | ||
class graphite::deps { | ||
$root_dir = $::graphite::root_dir | ||
|
||
ensure_packages([ | ||
'python-ldap', | ||
'python-cairo', | ||
'python-django', | ||
'python-twisted', | ||
'python-django-tagging', | ||
'python-simplejson', | ||
'python-memcache', | ||
'python-pysqlite2', | ||
'python-support', | ||
'python-pip', | ||
python::virtualenv { $root_dir: } -> | ||
python::pip { [ | ||
'gunicorn', | ||
]) | ||
'twisted==11.1.0', | ||
'django==1.4.10', | ||
'django-tagging==0.3.1', | ||
'python-memcached==1.47', | ||
'simplejson==2.1.6', | ||
]: | ||
virtualenv => $root_dir, | ||
} | ||
|
||
ensure_packages(['python-cairo']) | ||
|
||
file { "${root_dir}/lib/python2.7/site-packages/cairo": | ||
ensure => link, | ||
target => '/usr/lib/python2.7/dist-packages/cairo', | ||
require => [ | ||
Python::Virtualenv[$root_dir], | ||
Package['python-cairo'], | ||
], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters