Update tempest installation
- Adopt for the use of python3 on Ubuntu - Use the endpoint_type attribute - Install recent tempest version and make sure to install matching requirements Change-Id: Ib413971c15d11cbb46befda55ffc28f3c16f2a8a
This commit is contained in:
parent
5fc3d0635b
commit
7b94f94585
|
@ -45,9 +45,7 @@ admin_pass = get_password 'user', admin_user
|
||||||
admin_project = node['openstack']['identity']['admin_project']
|
admin_project = node['openstack']['identity']['admin_project']
|
||||||
admin_domain = node['openstack']['identity']['admin_domain_name']
|
admin_domain = node['openstack']['identity']['admin_domain_name']
|
||||||
admin_project_domain_name = node['openstack']['identity']['admin_project_domain']
|
admin_project_domain_name = node['openstack']['identity']['admin_project_domain']
|
||||||
# TODO(ramereth): commenting this out until
|
endpoint_type = node['openstack']['identity']['endpoint_type']
|
||||||
# https://github.com/fog/fog-openstack/pull/494 gets merged and released.
|
|
||||||
# endpoint_type = node['openstack']['identity']['endpoint_type']
|
|
||||||
|
|
||||||
connection_params = {
|
connection_params = {
|
||||||
openstack_auth_url: auth_url,
|
openstack_auth_url: auth_url,
|
||||||
|
@ -55,7 +53,7 @@ connection_params = {
|
||||||
openstack_api_key: admin_pass,
|
openstack_api_key: admin_pass,
|
||||||
openstack_project_name: admin_project,
|
openstack_project_name: admin_project,
|
||||||
openstack_domain_name: admin_domain,
|
openstack_domain_name: admin_domain,
|
||||||
# openstack_endpoint_type: endpoint_type,
|
openstack_endpoint_type: endpoint_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
%w(user1 user2).each_with_index do |user|
|
%w(user1 user2).each_with_index do |user|
|
||||||
|
@ -89,19 +87,33 @@ include_recipe 'openstack-common'
|
||||||
tempest_path = '/opt/tempest'
|
tempest_path = '/opt/tempest'
|
||||||
venv_path = '/opt/tempest-venv'
|
venv_path = '/opt/tempest-venv'
|
||||||
|
|
||||||
execute "virtualenv #{venv_path}" do
|
case node['platform']
|
||||||
|
when 'debian'
|
||||||
|
venv_cmd = 'virtualenv -p python3'
|
||||||
|
when 'fedora', 'rhel'
|
||||||
|
venv_cmd = 'virtualenv'
|
||||||
|
end
|
||||||
|
|
||||||
|
execute 'create virtualenv for tempest' do
|
||||||
|
command "#{venv_cmd} #{venv_path}" do
|
||||||
creates venv_path
|
creates venv_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Note(jh): Make sure to keep the constraint definition in sync with
|
||||||
|
# the tempest version
|
||||||
|
tempest_ver = '22.0.0'
|
||||||
|
constraint = '-c https://opendev.org/openstack/requirements/raw/'\
|
||||||
|
'branch/stable/train/upper-constraints.txt'
|
||||||
|
|
||||||
execute 'install tempest' do
|
execute 'install tempest' do
|
||||||
action :nothing
|
action :nothing
|
||||||
command "#{venv_path}/bin/pip install ."
|
command "#{venv_path}/bin/pip install #{constraint} tempest==#{tempest_ver}"
|
||||||
cwd tempest_path
|
cwd tempest_path
|
||||||
end
|
end
|
||||||
|
|
||||||
git tempest_path do
|
git tempest_path do
|
||||||
repository 'https://github.com/openstack/tempest'
|
repository 'https://opendev.org/openstack/tempest'
|
||||||
reference '17.2.0'
|
reference tempest_ver
|
||||||
depth 1
|
depth 1
|
||||||
action :sync
|
action :sync
|
||||||
notifies :run, 'execute[install tempest]', :immediately
|
notifies :run, 'execute[install tempest]', :immediately
|
||||||
|
|
Loading…
Reference in New Issue