Fully root pip path
On initial pip run the bootstrapping fails because pip is not yet in puppets path (earlier puppet tasks install pip). We can deal with this by fully rooting the path to pip which should find the binary. Unfortunately we end up doing this with a exec only if condition to determine if we should run this under /usr/local/bin/pip or /usr/bin/pip as there doesn't seem to be a good way to check otherwise. Change-Id: Ib82f2571a50dad12ab64cfecffdf9d84fae2cf9a
This commit is contained in:
parent
39be1bf1f1
commit
41ef9726e7
|
@ -103,8 +103,9 @@ class openstack_health::api(
|
|||
ensure => present,
|
||||
}
|
||||
|
||||
exec { 'requirements':
|
||||
command => "pip install -U -r ${source_dir}/requirements.txt",
|
||||
exec { 'requirements-bin-pip':
|
||||
command => "/usr/bin/pip install -U -r ${source_dir}/requirements.txt",
|
||||
onlyif => 'test -f /usr/bin/pip',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
require => [
|
||||
Package['libmemcached-dev'],
|
||||
|
@ -115,8 +116,9 @@ class openstack_health::api(
|
|||
timeout => 1800,
|
||||
}
|
||||
|
||||
exec { 'elastic-recheck-install':
|
||||
command => "pip install -U ${elastic_recheck_dir}",
|
||||
exec { 'elastic-recheck-install-bin-pip':
|
||||
command => "/usr/bin/pip install -U ${elastic_recheck_dir}",
|
||||
onlyif => 'test -f /usr/bin/pip',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
require => [
|
||||
Package['libffi-dev'],
|
||||
|
@ -126,12 +128,47 @@ class openstack_health::api(
|
|||
timeout => 1800,
|
||||
}
|
||||
|
||||
exec { 'package-application':
|
||||
command => "pip install -U ${source_dir}",
|
||||
exec { 'package-application-bin-pip':
|
||||
command => "/usr/bin/pip install -U ${source_dir}",
|
||||
onlyif => 'test -f /usr/bin/pip',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
refreshonly => true,
|
||||
require => Exec['elastic-recheck-install'],
|
||||
subscribe => Exec['requirements'],
|
||||
require => Exec['elastic-recheck-install-bin-pip'],
|
||||
subscribe => Exec['requirements-bin-pip'],
|
||||
}
|
||||
|
||||
exec { 'requirements-local-bin-pip':
|
||||
command => "/usr/local/bin/pip install -U -r ${source_dir}/requirements.txt",
|
||||
onlyif => 'test -f /usr/local/bin/pip',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
require => [
|
||||
Package['libmemcached-dev'],
|
||||
Package['cython'],
|
||||
],
|
||||
subscribe => Vcsrepo[$source_dir],
|
||||
refreshonly => true,
|
||||
timeout => 1800,
|
||||
}
|
||||
|
||||
exec { 'elastic-recheck-install-local-bin-pip':
|
||||
command => "/usr/local/bin/pip install -U ${elastic_recheck_dir}",
|
||||
onlyif => 'test -f /usr/local/bin/pip',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
require => [
|
||||
Package['libffi-dev'],
|
||||
],
|
||||
subscribe => Vcsrepo[$elastic_recheck_dir],
|
||||
refreshonly => true,
|
||||
timeout => 1800,
|
||||
}
|
||||
|
||||
exec { 'package-application-local-bin-pip':
|
||||
command => "/usr/local/bin/pip install -U ${source_dir}",
|
||||
onlyif => 'test -f /usr/local/bin/pip',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
refreshonly => true,
|
||||
require => Exec['elastic-recheck-install-local-bin-pip'],
|
||||
subscribe => Exec['requirements-local-bin-pip'],
|
||||
}
|
||||
|
||||
file { '/etc/openstack-health.conf':
|
||||
|
|
Loading…
Reference in New Issue