Add installing tempestconf from the given source
Adds support for installing python-tempestconf from the given source. This will be especially handy in CI jobs (f.e. in Zuul) when python-tempestconf's new changes are needed to be verified against refstack-client and this role (as python-tempestconf is a dependency of refstack-client we don't want to accidentally break refstack-client by a new changes in the tempestconf) Change-Id: I4541050f550d377956db51acf2b29f3f691cd5b9
This commit is contained in:
parent
3d592d6a8b
commit
ca9d61a6d7
@ -26,6 +26,7 @@ deployment is working by passing refstack tests.
|
||||
| guideline | False | 2020.06 | String | Specific refstack guideline. |
|
||||
| private_key_path_src * | False | None | String | If defined, the key defined by the param is copied to the targeted machine to private_key_path location.|
|
||||
| refstack_client_source | False | ~/.refstack-client | String | Destination where refstack-client will be cloned only if the dir doesn't exist or it's empty, otherwise it will be used as is.|
|
||||
| tempestconf_source | False | None | String | A path to python-tempestconf's source. If not defined, refstack-client's default is applied. |
|
||||
| refstack_client_version | False | HEAD | String | Version of refstack-client cloned from git. |
|
||||
| server | False | https://refstack.openstack.org/api | String | Server url where the results will be uploaded to if upload_results is True. |
|
||||
| tempest_account_concurrency | False | 3 | Int | A concurrency accounts.yaml file is generated with by tempest. |
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
- hosts: tempest
|
||||
vars:
|
||||
refstack_client_source: "{{ zuul.projects['opendev.org/osf/refstack-client'].src_dir }}"
|
||||
devstack_base_dir: "/opt/stack"
|
||||
# TODO(mkopec) set_auth_url override is needed here until the role uses
|
||||
# python-tempestconf version which contains a fix for the SSL support:
|
||||
@ -28,6 +27,11 @@
|
||||
- name: Run ansible-role-refstack-client
|
||||
include_tasks: ../tasks/main.yaml
|
||||
vars:
|
||||
refstack_client_source: "{{ zuul.projects['opendev.org/osf/refstack-client'].src_dir }}"
|
||||
# the task which installs refstack-client changes dir to the refstack-client's
|
||||
# location, python-tempestconf is in the same org (osf) so it's cloned
|
||||
# just one level up by the zuul
|
||||
tempestconf_source: "../python-tempestconf"
|
||||
source_credentials: "{{ devstack_base_dir }}/devstack/openrc demo demo; {{ set_auth_url }}"
|
||||
source_admin_credentials: "{{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
|
||||
additional_tempestconf_params: "auth.tempest_roles Member object-storage.operator_role Member"
|
||||
|
@ -57,4 +57,4 @@
|
||||
|
||||
- name: Set path to newly generated accounts.yaml
|
||||
set_fact:
|
||||
path_to_accounts_file: "{{ refstack_client_source }}/etc/accounts.yaml"
|
||||
path_to_accounts_file: "./etc/accounts.yaml"
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Script to generate tempest.conf
|
||||
set -ex
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
||||
source {{ refstack_client_source }}/.venv/bin/activate
|
||||
source .venv/bin/activate
|
||||
source {{ source_credentials }}
|
||||
printenv
|
||||
discover-tempest-config \
|
||||
|
@ -15,4 +15,4 @@
|
||||
|
||||
- name: Set path to newly generated tempest.conf
|
||||
set_fact:
|
||||
path_to_tempest_config: "{{ refstack_client_source }}/etc/tempest.conf"
|
||||
path_to_tempest_config: "./etc/tempest.conf"
|
||||
|
@ -26,13 +26,14 @@
|
||||
when: python3_is_available.rc == 0
|
||||
|
||||
- name: Install refstack-client
|
||||
command: ./setup_env {{ python3_param | default('') }}
|
||||
shell: >
|
||||
./setup_env {{ python3_param | default('') }}
|
||||
{% if tempest_tag is defined %}
|
||||
-t {{ tempest_tag }}
|
||||
{% endif %}
|
||||
{% if tempestconf_source is defined %}
|
||||
-s {{ tempestconf_source }}
|
||||
{% endif %}
|
||||
args:
|
||||
chdir: "{{ refstack_client_source }}"
|
||||
when: tempest_tag is not defined
|
||||
|
||||
- name: Install refstack-client and clone Tempest from a specific tag
|
||||
command: ./setup_env -t {{ tempest_tag }} {{ python3_param | default('') }}
|
||||
args:
|
||||
chdir: "{{ refstack_client_source }}"
|
||||
when: tempest_tag is defined
|
||||
changed_when: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user