Remove packstack jobs
Packstack jobs and related code are removed as the parent job got removed too. Change-Id: I3e36735cf14bfdcf5572d4e059d47a2e483b2ea0
This commit is contained in:
parent
65e2a5f174
commit
c34309e904
50
.zuul.yaml
50
.zuul.yaml
@ -19,10 +19,6 @@
|
|||||||
- python-tempestconf-tempest-devstack-admin-plugins
|
- python-tempestconf-tempest-devstack-admin-plugins
|
||||||
- python-tempestconf-tempest-devstack-enforce-scope-new-defaults-admin
|
- python-tempestconf-tempest-devstack-enforce-scope-new-defaults-admin
|
||||||
- python-tempestconf-tempest-devstack-enforce-scope-new-defaults-demo
|
- python-tempestconf-tempest-devstack-enforce-scope-new-defaults-demo
|
||||||
- python-tempestconf-tempest-packstack-admin:
|
|
||||||
voting: false
|
|
||||||
- python-tempestconf-tempest-packstack-demo:
|
|
||||||
voting: false
|
|
||||||
- refstack-client-devstack-master:
|
- refstack-client-devstack-master:
|
||||||
irrelevant-files: &irrelevant-files
|
irrelevant-files: &irrelevant-files
|
||||||
- config_tempest/tests/.*$
|
- config_tempest/tests/.*$
|
||||||
@ -112,30 +108,6 @@
|
|||||||
barbican: True
|
barbican: True
|
||||||
irrelevant-files: *irrelevant-files
|
irrelevant-files: *irrelevant-files
|
||||||
|
|
||||||
- job:
|
|
||||||
name: python-tempestconf-packstack-base
|
|
||||||
parent: packstack-centos9
|
|
||||||
description: Base job for python-tempestconf on packstack environment
|
|
||||||
required-projects:
|
|
||||||
- x/packstack
|
|
||||||
- openinfra/python-tempestconf
|
|
||||||
- openstack/tempest
|
|
||||||
- openstack/devstack
|
|
||||||
post-run: playbooks/upload-logs.yaml
|
|
||||||
roles:
|
|
||||||
- zuul: x/packstack
|
|
||||||
- zuul: openinfra/python-tempestconf
|
|
||||||
- zuul: openstack/tempest
|
|
||||||
- zuul: openstack/devstack
|
|
||||||
vars:
|
|
||||||
tempest_concurrency: 2
|
|
||||||
scenario: scenario000
|
|
||||||
zuul_copy_output:
|
|
||||||
/opt/stack/tempest/etc/tempest.conf: logs
|
|
||||||
/opt/stack/tempest/tempest.log: logs
|
|
||||||
/etc/openstack/accounts.yaml: logs
|
|
||||||
irrelevant-files: *irrelevant-files
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-devstack-enforce-scope-new-defaults-base
|
name: python-tempestconf-devstack-enforce-scope-new-defaults-base
|
||||||
parent: python-tempestconf-devstack-base
|
parent: python-tempestconf-devstack-base
|
||||||
@ -267,26 +239,6 @@
|
|||||||
vars:
|
vars:
|
||||||
branch: stable/2024.1
|
branch: stable/2024.1
|
||||||
|
|
||||||
- job:
|
|
||||||
name: python-tempestconf-tempest-packstack-admin
|
|
||||||
parent: python-tempestconf-packstack-base
|
|
||||||
description: |
|
|
||||||
Tempest job for python-tempestconf on a packstack environment as the admin user.
|
|
||||||
run: playbooks/python-tempestconf-tempest-packstack.yaml
|
|
||||||
vars:
|
|
||||||
user: admin
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: python-tempestconf-tempest-packstack-demo
|
|
||||||
parent: python-tempestconf-packstack-base
|
|
||||||
description: |
|
|
||||||
Tempest job for python-tempestconf on a packstack environment as the demo user.
|
|
||||||
run: playbooks/python-tempestconf-tempest-packstack.yaml
|
|
||||||
vars:
|
|
||||||
user: demo
|
|
||||||
test_demo: true
|
|
||||||
cloud_admin: packstack-admin
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-tempest-devstack-enforce-scope-new-defaults-admin
|
name: python-tempestconf-tempest-devstack-enforce-scope-new-defaults-admin
|
||||||
parent: python-tempestconf-devstack-enforce-scope-new-defaults-base
|
parent: python-tempestconf-devstack-enforce-scope-new-defaults-base
|
||||||
@ -317,5 +269,3 @@
|
|||||||
# is resolved
|
# is resolved
|
||||||
tempest_exclude_regex: 'tempest.api.compute.servers'
|
tempest_exclude_regex: 'tempest.api.compute.servers'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
tasks:
|
|
||||||
# Disable packstack logs copy once packstack deployment finishes
|
|
||||||
# packstack-integration-tempest role is inherited from
|
|
||||||
# x/packstack project
|
|
||||||
- name: Install packstack allinone
|
|
||||||
import_role:
|
|
||||||
name: packstack-integration-tempest
|
|
||||||
environment:
|
|
||||||
COPY_LOGS: false
|
|
||||||
|
|
||||||
- hosts: tempest
|
|
||||||
vars:
|
|
||||||
test_demo_user: "{{ test_demo is defined }}"
|
|
||||||
tasks:
|
|
||||||
# setup-tempest-user, setup-stack-user and setup-devstack-source-dirs
|
|
||||||
# are inherited from openstack/devstack
|
|
||||||
- name: Setup Stack user
|
|
||||||
include_role:
|
|
||||||
name: setup-stack-user
|
|
||||||
|
|
||||||
- name: Setup Tempest user
|
|
||||||
include_role:
|
|
||||||
name: setup-tempest-user
|
|
||||||
|
|
||||||
- name: Setup Tempest user
|
|
||||||
include_role:
|
|
||||||
name: setup-devstack-source-dirs
|
|
||||||
|
|
||||||
# setup-tempest-* and acl-devstack-files roles are inherited from
|
|
||||||
# openstack/tempest project
|
|
||||||
- name: Setup Tempest Run Directory
|
|
||||||
include_role:
|
|
||||||
name: setup-tempest-run-dir
|
|
||||||
|
|
||||||
- name: Setup Tempest Data Directory
|
|
||||||
include_role:
|
|
||||||
name: setup-tempest-data-dir
|
|
||||||
|
|
||||||
# NOTE: packstack jobs are failing on Run Tempest task
|
|
||||||
# it is because tox command is not found. Adding 'ensure-tox'
|
|
||||||
# role here to make sure that tox is installed and it
|
|
||||||
# will not break the tempest tests.
|
|
||||||
- name: Ensure tox is installed
|
|
||||||
include_role:
|
|
||||||
name: ensure-tox
|
|
||||||
vars:
|
|
||||||
ensure_global_symlinks: True
|
|
||||||
|
|
||||||
- name: ACL devstack files
|
|
||||||
include_role:
|
|
||||||
name: acl-devstack-files
|
|
||||||
|
|
||||||
- name: Prepare keystonerc credentials generated by packstack
|
|
||||||
include_role:
|
|
||||||
name: create-keystonerc-files
|
|
||||||
|
|
||||||
- name: Create clouds.yaml file
|
|
||||||
include_role:
|
|
||||||
name: create-clouds-yaml-file
|
|
||||||
vars:
|
|
||||||
cloudname: "packstack-admin"
|
|
||||||
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_admin"
|
|
||||||
|
|
||||||
- name: Generate configuration file for Tempest
|
|
||||||
include_role:
|
|
||||||
name: generate-tempestconf-file
|
|
||||||
vars:
|
|
||||||
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_{{ user }}"
|
|
||||||
|
|
||||||
# Let's create tempest.conf with admin permissions needed for
|
|
||||||
# tempest accounts file generation
|
|
||||||
- name: Generate configuration file for Tempest as admin
|
|
||||||
include_role:
|
|
||||||
name: generate-tempestconf-file
|
|
||||||
vars:
|
|
||||||
additional_tempestconf_params: "object-storage.operator_role Member"
|
|
||||||
output_path: "/etc/openstack/tempest_admin.conf"
|
|
||||||
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_admin"
|
|
||||||
test_demo_user: False
|
|
||||||
user: admin
|
|
||||||
when: test_demo is defined
|
|
||||||
|
|
||||||
- name: Generate accounts file for Tempest
|
|
||||||
include_role:
|
|
||||||
name: generate-accounts-file
|
|
||||||
vars:
|
|
||||||
accounts_file_destination: "/etc/openstack"
|
|
||||||
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_admin"
|
|
||||||
tempest_config_file: "/etc/openstack/tempest_admin.conf"
|
|
||||||
when: test_demo is defined
|
|
||||||
|
|
||||||
# run-tempest role is inherited from openstack/tempest project
|
|
||||||
- name: Run Tempest Tests
|
|
||||||
include_role:
|
|
||||||
name: run-tempest
|
|
@ -1,44 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
tasks:
|
|
||||||
# Copy openstack logs once tempest run finishes
|
|
||||||
- name: Copy openstack services logs once tempest run finish
|
|
||||||
shell:
|
|
||||||
cmd: |
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
source ./tools/copy-logs.sh
|
|
||||||
recover_default_logs
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '{{ ansible_user_dir }}/workspace/packstack'
|
|
||||||
environment: '{{ zuul }}'
|
|
||||||
|
|
||||||
- name: Create tempest directory in /tmp/logs
|
|
||||||
file:
|
|
||||||
path: /tmp/logs/tempest
|
|
||||||
state: directory
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Copying tempest logs and config to /tmp/logs/tempest
|
|
||||||
copy:
|
|
||||||
src: "{{ item }}"
|
|
||||||
dest: /tmp/logs/tempest
|
|
||||||
remote_src: true
|
|
||||||
with_items:
|
|
||||||
- /opt/stack/tempest/etc/tempest.conf
|
|
||||||
- /opt/stack/tempest/tempest.log
|
|
||||||
- /etc/openstack/accounts.yaml
|
|
||||||
ignore_errors: true
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Upload logs
|
|
||||||
synchronize:
|
|
||||||
src: '/tmp/logs'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=/logs/**
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
@ -1,42 +0,0 @@
|
|||||||
Creates clouds.yaml file
|
|
||||||
========================
|
|
||||||
|
|
||||||
Source credentials and create a clouds.yaml file. If the clouds.yaml
|
|
||||||
file in the defined location exists, it will be overwritten.
|
|
||||||
Note: If there is a file called openstack in the location, where
|
|
||||||
clouds_file_path points, it will be removed and directory called openstack
|
|
||||||
will be created.
|
|
||||||
|
|
||||||
**Role Variables**
|
|
||||||
|
|
||||||
.. zuul:rolevar:: clouds_file_path
|
|
||||||
:type: string
|
|
||||||
:default: /etc/openstack/clouds.yaml
|
|
||||||
|
|
||||||
A path to the clouds.yaml file.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: source_credentials_commands
|
|
||||||
:type: string
|
|
||||||
:default: None
|
|
||||||
:required: True
|
|
||||||
|
|
||||||
Commands divided by a semicolon which define obtaining credentials.
|
|
||||||
They need to be defined in the playbook the role is called from.
|
|
||||||
For example for devstack it's used ({{ devstack_base_dir}} is the location
|
|
||||||
where run-devstack role copies devstack source files):
|
|
||||||
|
|
||||||
`source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}`
|
|
||||||
|
|
||||||
and for packstack ({{ ansible_user_dir }} is the location where
|
|
||||||
packstack generates rc files):
|
|
||||||
|
|
||||||
`source {{ ansible_user_dir }}/keystonerc_{{ user }}`
|
|
||||||
|
|
||||||
.. zuul:rolevar:: cloudname
|
|
||||||
:type: string
|
|
||||||
:default: None
|
|
||||||
:required: True
|
|
||||||
|
|
||||||
A cloudname under which sourced credentials will be saved
|
|
||||||
in clouds.yaml file.
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
clouds_file_path: "/etc/openstack/clouds.yaml"
|
|
@ -1,55 +0,0 @@
|
|||||||
- name: get cloud variables
|
|
||||||
shell: |
|
|
||||||
for key in $( set | awk '{FS="="} /^OS_/ {print $1}' ); do unset $key ; done
|
|
||||||
{{ source_credentials_commands }}
|
|
||||||
echo -n "clouds: \
|
|
||||||
{ {{cloudname}}: \
|
|
||||||
{'auth': \
|
|
||||||
{ 'auth-url': '$OS_AUTH_URL', \
|
|
||||||
'username': '$OS_USERNAME', \
|
|
||||||
'password': '$OS_PASSWORD', \
|
|
||||||
$(if [ -n "$OS_USER_DOMAIN_NAME" ]; then echo "'user_domain_name': '${OS_USER_DOMAIN_NAME}',"; fi) \
|
|
||||||
$(if [ -n "$OS_PROJECT_DOMAIN_NAME" ]; then echo "'project_domain_name': '${OS_PROJECT_DOMAIN_NAME}',"; fi) \
|
|
||||||
'project-name': '${OS_PROJECT_NAME:-$OS_TENANT_NAME}' \
|
|
||||||
} $(if [ -n "$OS_IDENTITY_API_VERSION" ]; then echo ", 'identity_api_version': '${OS_IDENTITY_API_VERSION}'"; fi) } }"
|
|
||||||
register: cloud_details
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
|
|
||||||
- debug:
|
|
||||||
msg: "{{ cloud_details }}"
|
|
||||||
|
|
||||||
- name: Remove the file if it exists
|
|
||||||
become: yes
|
|
||||||
file:
|
|
||||||
path: "{{ clouds_file_path | dirname}}"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Create directory for clouds.yaml
|
|
||||||
become: yes
|
|
||||||
file:
|
|
||||||
path: "{{ clouds_file_path | dirname}}"
|
|
||||||
state: directory
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Create clouds.yaml
|
|
||||||
become: yes
|
|
||||||
copy:
|
|
||||||
content: ""
|
|
||||||
dest: "{{ clouds_file_path }}"
|
|
||||||
force: yes
|
|
||||||
mode: 0666
|
|
||||||
|
|
||||||
- name: Insert cloud parameters
|
|
||||||
become: yes
|
|
||||||
lineinfile:
|
|
||||||
path: "{{ clouds_file_path }}"
|
|
||||||
line: "{{ item }}"
|
|
||||||
with_items:
|
|
||||||
- "{{ cloud_details.stdout|from_yaml|to_nice_yaml(indent=4) }}"
|
|
||||||
|
|
||||||
- name: Cat the created clouds.yaml file
|
|
||||||
become: yes
|
|
||||||
shell: |
|
|
||||||
set -ex
|
|
||||||
cat {{ clouds_file_path }}
|
|
@ -1,60 +0,0 @@
|
|||||||
Create keystonerc files
|
|
||||||
=======================
|
|
||||||
|
|
||||||
Create keystonerc files for tempest, print them to the output and copy them
|
|
||||||
to the wanted destination.
|
|
||||||
|
|
||||||
**Role Variables**
|
|
||||||
|
|
||||||
.. zuul:rolevar:: admin_user
|
|
||||||
:type: dict
|
|
||||||
|
|
||||||
A dictionary of admin user credentials.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: username
|
|
||||||
:default: admin
|
|
||||||
|
|
||||||
.. zuul:rolevar:: password
|
|
||||||
:default: packstack
|
|
||||||
|
|
||||||
.. zuul:rolevar:: project_name
|
|
||||||
:default: admin
|
|
||||||
|
|
||||||
.. zuul:rolevar:: user_domain_name
|
|
||||||
:default: Default
|
|
||||||
|
|
||||||
.. zuul:rolevar:: project_domain_name
|
|
||||||
:default: Default
|
|
||||||
|
|
||||||
.. zuul:rolevar:: identity_api_version
|
|
||||||
:default: 3
|
|
||||||
|
|
||||||
.. zuul:rolevar:: keystonerc_destination
|
|
||||||
:default: {{ ansible_user_dir }}/keystonerc_admin
|
|
||||||
|
|
||||||
.. zuul:rolevar:: demo_user
|
|
||||||
:type: dict
|
|
||||||
|
|
||||||
A dictionary of demo user credentials.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: username
|
|
||||||
:default: demo
|
|
||||||
|
|
||||||
.. zuul:rolevar:: password
|
|
||||||
:default: packstack
|
|
||||||
|
|
||||||
.. zuul:rolevar:: project_name
|
|
||||||
:default: demo
|
|
||||||
|
|
||||||
.. zuul:rolevar:: user_domain_name
|
|
||||||
:default: Default
|
|
||||||
|
|
||||||
.. zuul:rolevar:: project_domain_name
|
|
||||||
:default: Default
|
|
||||||
|
|
||||||
.. zuul:rolevar:: identity_api_version
|
|
||||||
:default: 3
|
|
||||||
|
|
||||||
.. zuul:rolevar:: keystonerc_destination
|
|
||||||
:default: {{ ansible_user_dir }}/keystonerc_demo
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
admin_user:
|
|
||||||
username: admin
|
|
||||||
password: packstack
|
|
||||||
project_name: admin
|
|
||||||
user_domain_name: Default
|
|
||||||
project_domain_name: Default
|
|
||||||
identity_api_version: "3"
|
|
||||||
keystonerc_destination: "{{ ansible_user_dir }}/keystonerc_admin"
|
|
||||||
|
|
||||||
demo_user:
|
|
||||||
username: demo
|
|
||||||
password: packstack
|
|
||||||
project_name: demo
|
|
||||||
user_domain_name: Default
|
|
||||||
project_domain_name: Default
|
|
||||||
identity_api_version: "3"
|
|
||||||
keystonerc_destination: "{{ ansible_user_dir }}/keystonerc_demo"
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
- debug:
|
|
||||||
var: ansible_all_ipv4_addresses
|
|
||||||
|
|
||||||
- name: Create keystonerc_admin file
|
|
||||||
shell: |
|
|
||||||
echo """
|
|
||||||
unset OS_SERVICE_TOKEN
|
|
||||||
export OS_USERNAME={{ admin_user.username }}
|
|
||||||
export OS_PASSWORD={{ admin_user.password }}
|
|
||||||
export OS_AUTH_URL=http://{{ ansible_default_ipv4.address }}:5000/v3
|
|
||||||
|
|
||||||
export PS1='[\u@\h \W(keystone_admin)]\$ '
|
|
||||||
export OS_PROJECT_NAME={{ admin_user.project_name }}
|
|
||||||
export OS_USER_DOMAIN_NAME={{ admin_user.user_domain_name }}
|
|
||||||
export OS_PROJECT_DOMAIN_NAME={{ admin_user.project_domain_name }}
|
|
||||||
export OS_IDENTITY_API_VERSION={{ admin_user.identity_api_version }}
|
|
||||||
""" > {{ admin_user.keystonerc_destination }}
|
|
||||||
cat {{ admin_user.keystonerc_destination }}
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
|
|
||||||
- name: Create keystonerc_demo file
|
|
||||||
shell: |
|
|
||||||
echo """
|
|
||||||
unset OS_SERVICE_TOKEN
|
|
||||||
export OS_USERNAME={{ demo_user.username }}
|
|
||||||
export OS_PASSWORD={{demo_user.password }}
|
|
||||||
export OS_AUTH_URL=http://{{ ansible_default_ipv4.address }}:5000/v3
|
|
||||||
|
|
||||||
export PS1='[\u@\h \W(keystone_admin)]\$ '
|
|
||||||
export OS_PROJECT_NAME={{ demo_user.project_name }}
|
|
||||||
export OS_USER_DOMAIN_NAME={{ demo_user.user_domain_name }}
|
|
||||||
export OS_PROJECT_DOMAIN_NAME={{ demo_user.project_domain_name }}
|
|
||||||
export OS_IDENTITY_API_VERSION={{ demo_user.identity_api_version }}
|
|
||||||
""" > {{ demo_user.keystonerc_destination }}
|
|
||||||
cat {{ demo_user.keystonerc_destination }}
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
@ -1,70 +0,0 @@
|
|||||||
Generate accounts.yaml file for tempest
|
|
||||||
=======================================
|
|
||||||
|
|
||||||
Installs tempest cloned from git and generates accounts.yaml file.
|
|
||||||
accounts.yaml file will be saved inside the cloned folder in etc/ subfolder.
|
|
||||||
|
|
||||||
The tempest configuration file, which is needed to generate tempest
|
|
||||||
accounts.yaml file will be copied into etc/ as well, however it will be
|
|
||||||
renamed to tempest_admin.conf so that, it doesn't conflict with tempest.conf
|
|
||||||
which may be there.
|
|
||||||
|
|
||||||
|
|
||||||
**Role Variables**
|
|
||||||
|
|
||||||
.. zuul:rolevar:: tempest_account_concurrency
|
|
||||||
:default: 3
|
|
||||||
|
|
||||||
A number of parallel test processes.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: tempest_config_file
|
|
||||||
:type: string
|
|
||||||
:default: None
|
|
||||||
:required: True
|
|
||||||
|
|
||||||
A path to a tempest configuration file. It must contain credentials
|
|
||||||
which allows to create resources.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: source_credentials_commands
|
|
||||||
:type: string
|
|
||||||
:default: None
|
|
||||||
:required: True
|
|
||||||
|
|
||||||
Commands divided by a semicolon which define obtaining credentials for
|
|
||||||
a user who has permissions to create resources. They need to be defined
|
|
||||||
in the playbook the role is called from.
|
|
||||||
For example for devstack it's used ({{ devstack_base_dir}} is the location
|
|
||||||
where run-devstack role copies devstack source files):
|
|
||||||
|
|
||||||
`source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}`
|
|
||||||
|
|
||||||
and for packstack ({{ ansible_user_dir }} is the location where
|
|
||||||
packstack generates rc files):
|
|
||||||
|
|
||||||
`source {{ ansible_user_dir }}/keystonerc_{{ user }}`
|
|
||||||
|
|
||||||
.. zuul:rolevar:: virtualenvs
|
|
||||||
:type: dict
|
|
||||||
|
|
||||||
A dictionary of paths to virtual environments.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: tempest
|
|
||||||
:default: ~/.virtualenvs/.tempest
|
|
||||||
|
|
||||||
A path to the virtual environment of Tempest.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: tempest_src_relative_path
|
|
||||||
:type: string
|
|
||||||
|
|
||||||
A relative path to Tempest project which is by default cloned to the
|
|
||||||
Zuul home directory. Value of the variable is set in the role to that
|
|
||||||
default path. If needed, the variable can be overridden from the
|
|
||||||
playbook where the role is called from.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: accounts_file_destination
|
|
||||||
:type: string
|
|
||||||
:default: None
|
|
||||||
|
|
||||||
If the variable is defined, the newly generated accounts.yaml file
|
|
||||||
will be copied to the directory specified by the variable.
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
# Here, we set tempest_account_concurrency to 3 because with concurrency 2
|
|
||||||
# generate only 10 accounts, and sometimes the tests fail because the account
|
|
||||||
# is being used by another test, so it's a good idea to have
|
|
||||||
# tempest_account_concurrency alway bigger then tempest test concurrency
|
|
||||||
# (in our jobs is set to 2)
|
|
||||||
tempest_account_concurrency: 3
|
|
||||||
virtualenvs:
|
|
||||||
tempest: ~/.virtualenvs/.tempest
|
|
@ -1,84 +0,0 @@
|
|||||||
- block:
|
|
||||||
- name: Ensure python-virtualenv is present
|
|
||||||
include_role:
|
|
||||||
name: ensure-virtualenv
|
|
||||||
|
|
||||||
- name: Create tempest venv with latest pip, setuptools and pbr
|
|
||||||
pip:
|
|
||||||
virtualenv: "{{ virtualenvs.tempest }}"
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: latest
|
|
||||||
with_items:
|
|
||||||
- pip
|
|
||||||
- setuptools
|
|
||||||
- pbr
|
|
||||||
|
|
||||||
- name: Install tempest
|
|
||||||
pip:
|
|
||||||
name: "."
|
|
||||||
virtualenv: "{{ virtualenvs.tempest }}"
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
|
|
||||||
# Need to have these tasks until this bug:
|
|
||||||
# https://bugs.launchpad.net/tempest/+bug/1624066 is resolved
|
|
||||||
# (mkopec) The bug should be resolved, but it's probably not,
|
|
||||||
# so meanwhile let's have these tasks
|
|
||||||
- name: Backup etc/tempest.conf if exists
|
|
||||||
shell: |
|
|
||||||
mv ./etc/tempest.conf ./etc/tempest.conf.orig
|
|
||||||
ignore_errors: yes
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
|
|
||||||
- name: Copy the provided tempest.conf to etc/
|
|
||||||
become: yes
|
|
||||||
shell: |
|
|
||||||
set -ex
|
|
||||||
cp {{ tempest_config_file }} ./etc/tempest.conf
|
|
||||||
ls -all ./etc/
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
|
|
||||||
- name: Generate tempest accounts.yaml file
|
|
||||||
shell: |
|
|
||||||
set -ex
|
|
||||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
||||||
source {{ virtualenvs.tempest }}/bin/activate
|
|
||||||
{{ source_credentials_commands }}
|
|
||||||
printenv
|
|
||||||
tempest account-generator \
|
|
||||||
--config-file ./etc/tempest.conf \
|
|
||||||
--concurrency {{ tempest_account_concurrency }} \
|
|
||||||
etc/accounts.yaml
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
|
|
||||||
- name: Restore etc/tempest.conf
|
|
||||||
shell: |
|
|
||||||
mv ./etc/tempest.conf.orig ./etc/tempest.conf
|
|
||||||
ignore_errors: yes
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
|
|
||||||
- name: Cat generated accounts.yaml file
|
|
||||||
shell: |
|
|
||||||
cat ./etc/accounts.yaml
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
|
|
||||||
- name: Copy generated accounts.yaml file
|
|
||||||
become: yes
|
|
||||||
shell: |
|
|
||||||
cp ./etc/accounts.yaml {{ accounts_file_destination }}/accounts.yaml
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: "{{ tempest_src_relative_path }}"
|
|
||||||
when: accounts_file_destination is defined
|
|
||||||
|
|
||||||
vars:
|
|
||||||
tempest_src_relative_path: "{{ zuul.projects['opendev.org/openstack/tempest'].src_dir }}"
|
|
@ -41,11 +41,6 @@ is then copied to tempest directory.
|
|||||||
|
|
||||||
`source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}`
|
`source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}`
|
||||||
|
|
||||||
and for packstack ({{ ansible_user_dir }} is the location where
|
|
||||||
packstack generates rc files):
|
|
||||||
|
|
||||||
`source {{ ansible_user_dir }}/keystonerc_{{ user }}`
|
|
||||||
|
|
||||||
.. zuul:rolevar:: url_cirros_image
|
.. zuul:rolevar:: url_cirros_image
|
||||||
:type: string
|
:type: string
|
||||||
:default: http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
|
:default: http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
|
||||||
|
@ -44,14 +44,6 @@
|
|||||||
virtualenv_python: "{{ tempestconf_pip_virtualenv_python|default(omit) }}"
|
virtualenv_python: "{{ tempestconf_pip_virtualenv_python|default(omit) }}"
|
||||||
when: branch is not defined
|
when: branch is not defined
|
||||||
|
|
||||||
- name: "Cat keystonerc_ file (only in packstack case)"
|
|
||||||
shell: |
|
|
||||||
set -ex
|
|
||||||
cat {{ ansible_user_dir }}/keystonerc_{{ user }}
|
|
||||||
ignore_errors: True
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
|
|
||||||
- name: Generate tempest configuration script
|
- name: Generate tempest configuration script
|
||||||
template:
|
template:
|
||||||
src: generate-tempestconf.sh.j2
|
src: generate-tempestconf.sh.j2
|
||||||
|
Loading…
Reference in New Issue
Block a user