refstack-client/playbooks/tempestconf-refstack-devstack.yaml
Chandan Kumar e1744ea1e4 Generate tempest.conf automatically using refstack-client
Usage: $ refstack-client config --use-test-accounts <path to test
         accounts file>

If not accounts.yaml is passed then:
  $ refstack-client config
  It will generate accounts.yaml and tempest.conf in etc folder

* It adds support for the above command
* Added zuul based devstack job to run the same
* let setup_env handles the installation of tempestconf
* updated git url for tempest
* It also generates accounts.yaml if no account file is
  passed
* we can --overrides flag to overrides the tempest.conf
  value.
* volume-feature-enabled.api_v2=True is added as default
  in overrides as it is deprecated in Rocky cycle but needed
  for interop tests.

Depends-On: https://review.openstack.org/589260
Story: 2001696
Task: 19758

Change-Id: I9cabfc52672e7a8a54792ca9d867c62babf12cb7
2018-08-13 19:59:53 +05:30

41 lines
1.7 KiB
YAML

- hosts: all
roles:
- run-devstack
- hosts: tempest
vars:
set_auth_url: "OS_AUTH_URL=$SERVICE_PROTOCOL://$SERVICE_HOST/identity/v3"
devstack_base_dir: "/opt/stack"
aditional_tempestconf_params: "auth.tempest_roles Member"
tasks:
- name: Setup Tempest Run Directory
include_role:
name: setup-tempest-run-dir
- name: Setup Tempest Data Directory
include_role:
name: setup-tempest-data-dir
- name: ACL devstack files
include_role:
name: acl-devstack-files
- name: Generate configuration file for Tempest as admin
include_role:
name: generate-tempestconf-file
vars:
output_path: "/etc/openstack/tempest_admin.conf"
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
user: admin
- name: Generate accounts.yaml file for Demo
include_role:
name: generate-accounts-file
vars:
aditional_tempestconf_params: "auth.tempest_roles Member"
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
accounts_file_destination: "/etc/openstack"
tempest_config_file: "/etc/openstack/tempest_admin.conf"
- name: Generate tempest.conf using refstack-client and run tempest tests
include_role:
name: generate-tempestconf-refstack
vars:
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}; {{ set_auth_url }}"
user: demo