From e70aa88930f35be19b677a8ba5c8d495491aa21f Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 14 Apr 2016 10:51:27 -0400 Subject: [PATCH] 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 --- manifests/init.pp | 2 +- manifests/params.pp | 3 ++- spec/classes/tempest_spec.rb | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 94dd2a7d..cf42cab2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 => [ diff --git a/manifests/params.pp b/manifests/params.pp index 3969ce2c..b3acb841 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 diff --git a/spec/classes/tempest_spec.rb b/spec/classes/tempest_spec.rb index b5943610..d6bb78f3 100644 --- a/spec/classes/tempest_spec.rb +++ b/spec/classes/tempest_spec.rb @@ -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