venv: create venv & run pip in exec

Tempest deleted the venv management scripts [1] so now, puppet-tempest
is able to deploy the venv & run pip by itself.

[1] https://review.openstack.org/#/c/270564/

Closes-Bug: #1570268
Change-Id: Iacfe61a14d69a8738a4cc4e2cfe29f7d54e91941
This commit is contained in:
Emilien Macchi 2016-04-14 10:51:27 -04:00
parent af17899b0f
commit e70aa88930
3 changed files with 6 additions and 4 deletions

View File

@ -297,7 +297,7 @@ class tempest(
if $setup_venv {
# virtualenv will be installed along with tox
exec { 'setup-venv':
command => "/usr/bin/python ${tempest_clone_path}/tools/install_venv.py",
command => "/usr/bin/virtualenv ${tempest_clone_path}/.venv && ${tempest_clone_path}/.venv/bin/pip install -U -r requirements.txt",
cwd => $tempest_clone_path,
unless => "/usr/bin/test -d ${tempest_clone_path}/.venv",
require => [

View File

@ -10,7 +10,7 @@ class tempest::params {
'openssl-devel',
'libffi-devel',
'patch',
'gcc',
'gcc'
]
$python_aodh_tests = 'python-aodh-tests'
$python_ceilometer_tests = 'python-ceilometer-tests'
@ -41,6 +41,7 @@ class tempest::params {
'libffi-dev',
'patch',
'gcc',
'python-virtualenv',
]
$python_aodh_tests = false
$python_ceilometer_tests = false

View File

@ -317,7 +317,8 @@ describe 'tempest' do
'libssl-dev',
'libffi-dev',
'patch',
'gcc' ] }
'gcc',
'python-virtualenv' ] }
when 'RedHat'
{ :dev_packages => ['python-devel',
'libxslt-devel',
@ -325,7 +326,7 @@ describe 'tempest' do
'openssl-devel',
'libffi-devel',
'patch',
'gcc' ] }
'gcc'] }
end
end