Add func_gnocchi scenario gate test
This gate test omits installation of MongoDB and uses gnocchi for all metric storage Change-Id: I15fff275b3e5eaecb36a0da01c5aafc824c5a288 Closes-Bug: #1628952
This commit is contained in:
parent
9a056e49a9
commit
5ebd74f40f
|
@ -62,6 +62,7 @@ releasenotes/build
|
|||
|
||||
# Test temp files
|
||||
tests/plugins
|
||||
tests/common
|
||||
tests/playbooks
|
||||
tests/*.retry
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ fi
|
|||
|
||||
# run through each tox env and execute the test
|
||||
for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
|
||||
if [ "${tox_env}" != "ansible-functional" ]; then
|
||||
if [ "${tox_env}" != "functional" ]; then
|
||||
tox -e ${tox_env}
|
||||
elif [ "${tox_env}" == "ansible-functional" ]; then
|
||||
elif [ "${tox_env}" == "functional" ]; then
|
||||
if ${FUNCTIONAL_TEST}; then
|
||||
tox -e ${tox_env}
|
||||
fi
|
||||
|
|
|
@ -50,4 +50,7 @@
|
|||
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
|
||||
scm: git
|
||||
version: master
|
||||
|
||||
- name: os_gnocchi
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-os_gnocchi
|
||||
scm: git
|
||||
version: master
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
# Copyright 2016, Comcast Corp
|
||||
#
|
||||
# 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.
|
||||
|
||||
ceilometer_service_publicuri: "http://{{ hostvars[groups['ceilometer_all'][0]]['ansible_host'] }}:8777"
|
||||
ceilometer_service_publicurl: "{{ ceilometer_service_publicuri }}"
|
||||
ceilometer_service_internaluri: "http://{{ hostvars[groups['ceilometer_all'][0]]['ansible_host'] }}:8777"
|
||||
ceilometer_service_internalurl: "{{ ceilometer_service_internaluri }}"
|
||||
ceilometer_service_adminuri: "http://{{ hostvars[groups['ceilometer_all'][0]]['ansible_host'] }}:8777"
|
||||
ceilometer_service_adminurl: "{{ ceilometer_service_adminuri }}"
|
||||
ceilometer_rabbitmq_userid: ceilometer
|
||||
ceilometer_rabbitmq_password: secrete
|
||||
ceilometer_rabbitmq_vhost: /ceilometer
|
||||
ceilometer_rabbitmq_servers: "{{ rabbitmq_servers }}"
|
||||
ceilometer_venv_tag: "testing"
|
||||
ceilometer_developer_mode: True
|
||||
ceilometer_git_install_branch: master
|
||||
ceilometer_requirements_git_install_branch: master
|
||||
ceilometer_service_password: secrete
|
||||
ceilometer_telemetry_secret: secrete
|
||||
ceilometer_gnocchi_enabled: True
|
||||
# This is only needed so ceilometer_connection_string can be constructed
|
||||
# however, that var should not be needed when using gnocchi for metrics storage
|
||||
ceilometer_container_db_password: "secrete"
|
||||
|
||||
gnocchi_developer_mode: true
|
||||
gnocchi_container_mysql_password: "secrete"
|
||||
gnocchi_keystone_auth: yes
|
||||
gnocchi_service_password: "secrete"
|
||||
gnocchi_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
||||
gnocchi_use_mod_wsgi: true
|
||||
gnocchi_ssl_external: false
|
||||
gnocchi_service_port: 8041
|
||||
gnocchi_venv_tag: untagged
|
||||
gnocchi_bin: "/openstack/venvs/gnocchi-{{ gnocchi_venv_tag }}/bin"
|
||||
|
||||
# Tempest testing relies on glance notifications
|
||||
glance_ceilometer_enabled: True
|
||||
glance_rabbitmq_telemetry_host_group: rabbitmq_all
|
||||
glance_rabbitmq_telemetry_userid: glance
|
||||
glance_rabbitmq_telemetry_password: "{{ rabbitmq_password }}"
|
||||
glance_rabbitmq_telemetry_port: "{{ rabbitmq_port }}"
|
||||
glance_rabbitmq_telemetry_vhost: "/glance"
|
||||
|
||||
# Used by the ceilometer role
|
||||
swift_system_user_name: swift
|
||||
swift_system_shell: /bin/false
|
||||
swift_system_comment: swift test user
|
||||
swift_system_home_folder: "/var/lib/{{ swift_system_user_name }}"
|
||||
|
||||
tempest_bin: "/opt/tempest_{{ tempest_venv_tag }}/bin"
|
||||
tempest_pip_packages:
|
||||
- tempest
|
||||
- junitxml
|
||||
- nose
|
||||
- pyOpenSSL # added from the os_tempest role defaults to support tempest plugin deps
|
||||
- python-ceilometerclient
|
||||
- python-cinderclient
|
||||
- python-glanceclient
|
||||
- python-heatclient
|
||||
- python-keystoneclient
|
||||
- python-memcached
|
||||
- python-neutronclient
|
||||
- python-novaclient
|
||||
- python-openstackclient
|
||||
- python-saharaclient
|
||||
- python-subunit
|
||||
- python-swiftclient
|
||||
|
||||
tempest_plugins:
|
||||
- name: tempest-ceilometer
|
||||
repo: https://git.openstack.org/openstack/ceilometer
|
||||
branch: master
|
|
@ -0,0 +1,58 @@
|
|||
[all]
|
||||
localhost ansible_become=True
|
||||
infra1 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
|
||||
ceilometer ansible_host=10.100.100.3 ansible_become=True ansible_user=root
|
||||
gnocchi ansible_host=10.100.100.4 ansible_become=True ansible_user=root
|
||||
|
||||
[all_containers]
|
||||
infra1
|
||||
ceilometer
|
||||
gnocchi
|
||||
|
||||
[rabbitmq_all]
|
||||
infra1
|
||||
|
||||
[galera_all]
|
||||
infra1
|
||||
|
||||
[memcached_all]
|
||||
infra1
|
||||
|
||||
[service_all:children]
|
||||
rabbitmq_all
|
||||
galera_all
|
||||
memcached_all
|
||||
|
||||
[utility_all]
|
||||
infra1
|
||||
|
||||
[keystone_all]
|
||||
infra1
|
||||
|
||||
[glance_all]
|
||||
infra1
|
||||
|
||||
[ceilometer_api]
|
||||
ceilometer
|
||||
|
||||
[ceilometer_collector]
|
||||
ceilometer
|
||||
|
||||
[ceilometer_agent_central]
|
||||
ceilometer
|
||||
|
||||
[ceilometer_agent_notification]
|
||||
ceilometer
|
||||
|
||||
[ceilometer_agent_compute]
|
||||
ceilometer
|
||||
|
||||
[ceilometer_all:children]
|
||||
ceilometer_api
|
||||
ceilometer_collector
|
||||
ceilometer_agent_central
|
||||
ceilometer_agent_notification
|
||||
ceilometer_agent_compute
|
||||
|
||||
[gnocchi_all]
|
||||
gnocchi
|
|
@ -44,10 +44,7 @@
|
|||
- name: Run tempest
|
||||
shell: |
|
||||
. {{ tempest_bin }}/activate
|
||||
{{ tempest_bin | dirname }}/run_tempest.sh --no-virtual-env ${RUN_TEMPEST_OPTS} ceilometer.tests.tempest.api.test_telemetry_notification_api
|
||||
environment:
|
||||
RUN_TEMPEST_OPTS: "--serial"
|
||||
{{ tempest_bin | dirname }}/run_tempest.sh --no-virtual-env --serial ceilometer.tests.tempest.api.test_telemetry_notification_api
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
- test-vars.yml
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
# Copyright 2016, Comcast Corp
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Setup the host
|
||||
- include: common/test-setup-host.yml
|
||||
|
||||
# Install RabbitMQ/MariaDB
|
||||
- include: common/test-install-infra.yml
|
||||
|
||||
# Install Keystone
|
||||
- include: common/test-install-keystone.yml
|
||||
|
||||
# Needed in order to run Ceilometer Tempest test
|
||||
- include: common/test-install-glance.yml
|
||||
|
||||
- include: test-install-gnocchi.yml
|
||||
|
||||
- include: test-install-ceilometer.yml
|
||||
|
||||
- include: common/test-install-tempest.yml
|
||||
|
||||
- include: test-functional-ceilometer.yml
|
|
@ -43,4 +43,3 @@
|
|||
- role: "os_ceilometer"
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
- test-vars.yml
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
# Copyright 2015, 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: Deploy gnocchi
|
||||
hosts: gnocchi_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Create DB for service
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "localhost"
|
||||
name: "gnocchi"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['gnocchi_all'][0]
|
||||
- name: Grant access to the DB for the service
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "localhost"
|
||||
name: "gnocchi"
|
||||
password: "{{ gnocchi_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "gnocchi.*:ALL"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['gnocchi_all'][0]
|
||||
roles:
|
||||
- role: "os_gnocchi"
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
- gnocchi-test-vars.yml
|
21
tox.ini
21
tox.ini
|
@ -137,10 +137,29 @@ commands =
|
|||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
-e @{toxinidir}/tests/test-vars.yml \
|
||||
-e "install_test_packages=True" \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
|
||||
[testenv:func_gnocchi]
|
||||
# Ignore_errors is set to true so that the logs are collected at the
|
||||
# end of the run. This will not produce a false positive. Any
|
||||
# exception will be mark the run as failed and exit 1 after all of
|
||||
# the commands have been iterated through.
|
||||
ignore_errors = True
|
||||
# NOTE(odyssey4me): this target does not use constraints because
|
||||
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command =
|
||||
{[testenv:func_base]install_command}
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/gnocchi_inventory \
|
||||
-e @{toxinidir}/tests/gnocchi-test-vars.yml \
|
||||
{toxinidir}/tests/test-gnocchi-storage.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
|
||||
|
||||
[testenv:linters]
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue