Monty Taylor 0222d3040e Use pip install instead of setup.py install
The pip vs. easy_install interactions continually get the systems
into a weird state. pip install $path_to_repo, on the other hand,
works like a charm.

Left out two graphite installs because they are doing path manipulation
and I want to do further testing before touching that.

Change-Id: I373b29aca03f1ebd20e533ebaaf5de9ef2db017e
2013-10-27 18:38:38 -04:00

79 lines
1.7 KiB
Puppet

# == Class: jeepyb
#
class jeepyb (
$git_source_repo = 'https://git.openstack.org/openstack-infra/jeepyb',
) {
include mysql::python
if ! defined(Package['python-paramiko']) {
package { 'python-paramiko':
ensure => present,
}
}
if ! defined(Package['PyGithub']) {
package { 'PyGithub':
ensure => latest,
provider => pip,
require => Class['pip'],
}
}
if ! defined(Package['gerritlib']) {
package { 'gerritlib':
ensure => latest,
provider => pip,
require => Class['pip'],
}
}
if ! defined(Package['pkginfo']) {
package { 'pkginfo':
ensure => latest,
provider => pip,
require => Class['pip'],
}
}
package { 'gcc':
ensure => present,
}
# A lot of things need yaml, be conservative requiring this package to avoid
# conflicts with other modules.
case $::osfamily {
'Debian': {
if ! defined(Package['python-yaml']) {
package { 'python-yaml':
ensure => present,
}
}
}
'RedHat': {
if ! defined(Package['PyYAML']) {
package { 'PyYAML':
ensure => present,
}
}
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'jeepyb' module only supports osfamily Debian or RedHat.")
}
}
vcsrepo { '/opt/jeepyb':
ensure => latest,
provider => git,
revision => 'master',
source => $git_source_repo,
}
exec { 'install_jeepyb' :
command => 'pip install /opt/jeepyb',
path => '/usr/local/bin:/usr/bin:/bin/',
refreshonly => true,
require => Class['mysql::python'],
subscribe => Vcsrepo['/opt/jeepyb'],
}
}