Ensure tempest runs independently in testing
In tempest role tests we install tempest on a container that already has other services installed on it. To ensure the tempest role is indepedent we should test it by deploying it in it's own container. We need to fix the dependencies for the tempest role by installing git on the tempest host. Change-Id: I0230f1a93d16243fc50df79b2d0780e744706c7b
This commit is contained in:
parent
a3b77be727
commit
76eee2fa7e
|
@ -19,6 +19,10 @@ is_metal: True
|
|||
## Verbosity Options
|
||||
debug: False
|
||||
|
||||
# Set the package install state for distribution packages
|
||||
# # Options are 'present' and 'latest'
|
||||
tempest_package_state: "latest"
|
||||
|
||||
tempest_git_repo: https://git.openstack.org/openstack/tempest
|
||||
tempest_git_install_branch: master
|
||||
tempest_requirements_git_repo: https://git.openstack.org/openstack/requirements
|
||||
|
|
|
@ -13,6 +13,18 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include: tempest_install.yml
|
||||
|
||||
- include: tempest_resources.yml
|
||||
|
|
|
@ -13,6 +13,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: tempest_install_apt.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
|
||||
- include: tempest_install_yum.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
dest: "/opt/developer-pip-constraints.txt"
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Update apt sources
|
||||
apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 600
|
||||
register: apt_update
|
||||
until: apt_update|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Install apt packages
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: "{{ tempest_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ tempest_distro_packages }}"
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Install yum packages
|
||||
yum:
|
||||
pkg: "{{ item }}"
|
||||
state: "{{ tempest_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ tempest_distro_packages }}"
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: "{{ ansible_host }}"
|
||||
container_name: "{{ inventory_hostname }}"
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
|
@ -2,10 +2,12 @@
|
|||
localhost ansible_connection=local ansible_become=True neutron_local_ip=10.100.101.1
|
||||
infra1 ansible_host=10.100.102.101 ansible_become=True ansible_user=root tunnel_address=10.100.101.101
|
||||
openstack1 ansible_host=10.100.102.102 ansible_become=True ansible_user=root tunnel_address=10.100.101.102 neutron_local_ip=10.100.101.102
|
||||
tempest1 ansible_host=10.100.102.103 ansible_become=True ansible_user=root
|
||||
|
||||
[all_containers]
|
||||
infra1
|
||||
openstack1
|
||||
tempest1
|
||||
|
||||
[rabbitmq_all]
|
||||
infra1
|
||||
|
@ -99,4 +101,7 @@ nova_console
|
|||
nova_scheduler
|
||||
|
||||
[tempest]
|
||||
openstack1
|
||||
tempest1
|
||||
|
||||
[utility_all]
|
||||
tempest1
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
- name: Playbook for functional testing of nova
|
||||
hosts: nova_api_os_compute
|
||||
hosts: utility_all[0]
|
||||
user: root
|
||||
gather_facts: false
|
||||
tasks:
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
- name: Playbook for functional testing of tempest
|
||||
hosts: keystone_all
|
||||
hosts: utility_all[0]
|
||||
user: root
|
||||
gather_facts: false
|
||||
tasks:
|
||||
|
|
|
@ -117,7 +117,7 @@ nova_service_user_domain_id: default
|
|||
nova_service_user_name: nova
|
||||
nova_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin"
|
||||
nova_venv_tag: "testing"
|
||||
openrc_os_auth_url: "http://127.0.0.1:5000/v3"
|
||||
openrc_os_auth_url: "http://10.100.102.102:5000/v3"
|
||||
openrc_os_domain_name: "Default"
|
||||
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
||||
# This ensures that libvirt-python is built from source. A pre-built wheel
|
||||
|
@ -135,7 +135,7 @@ tempest_venv_tag: "{{ tempest_git_install_branch }}"
|
|||
# it again here so we can refer to it in test-tempest-functional.yml
|
||||
tempest_venv_bin: "/opt/tempest_{{ tempest_venv_tag }}/bin"
|
||||
tempest_log_dir: "/var/log/"
|
||||
tempest_main_group: keystone_all
|
||||
tempest_main_group: utility_all
|
||||
tempest_service_available_aodh: False
|
||||
tempest_service_available_ceilometer: False
|
||||
tempest_service_available_cinder: False
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
tempest_distro_packages:
|
||||
- git
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
tempest_distro_packages:
|
||||
- git-core
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
tempest_distro_packages:
|
||||
- git-core
|
Loading…
Reference in New Issue