Add tempest to glance role

This version currently ignores tempest errors

Change-Id: I726a644d38d9828d66b954204669c91259bde781
This commit is contained in:
Flavio Percoco 2017-12-04 13:24:35 +01:00
parent dc91c62512
commit 911c31d610
4 changed files with 110 additions and 3 deletions

View File

@ -19,6 +19,8 @@ clouds_config: 'clouds-secret'
glance_config:
DEFAULT:
debug: true
verbose: true
public_bind_host: "0.0.0.0"
database:
connection: "mysql+pymysql://root:weakpassword@mariadb:3306/glance"

View File

@ -9,6 +9,6 @@
service_project: '{{glance_config.keystone_authtoken.project}}'
service_password: '{{glance_config.keystone_authtoken.password}}'
service_username: '{{glance_config.keystone_authtoken.username}}'
service_internal_url: '{{ "https" if tls_enabled or "http"}}://{{glance_address}}:{{glance_port}}'
service_public_url: '{{ "https" if tls_enabled or "http"}}://{{glance_address}}:{{glance_port}}'
service_admin_url: '{{ "https" if tls_enabled or "http"}}://{{glance_address}}:{{glance_port}}'
service_internal_url: '{{ "https" if tls_enabled else "http"}}://{{glance_address}}:{{glance_port}}'
service_public_url: '{{ "https" if tls_enabled else "http"}}://{{glance_address}}:{{glance_port}}'
service_admin_url: '{{ "https" if tls_enabled else "http"}}://{{glance_address}}:{{glance_port}}'

View File

@ -0,0 +1,38 @@
[DEFAULT]
debug = true
[auth]
# Roles to assign to all users created by tempest (list value)
tempest_roles = _member_
use_dynamic_credentials = true
# Roles to assign to all users created by tempest (list value)
#tempest_roles =
default_credentials_domain_name = Default
admin_username = admin
admin_project_name = admin
admin_password = weakpassword
admin_domain_name = Default
[identity]
admin_username = admin
admin_tenant_name = admin
admin_domain_name = Default
disable_ssl_certificate_validation = true
catalog_type = identity
uri = http://{{keystone_ip}}:5000/v3
uri_v3 = http://{{keystone_ip}}:5000/v3
auth_version = v3
region = RegionOne
admin_role = admin
default_domain_id = default
admin_password = weakpassword
[service_available]
cinder = false
neutron = false
glance = true
swift = false
nova = false

67
tests/tests.yml Normal file
View File

@ -0,0 +1,67 @@
---
- name: Get keystone cluster ip
shell:
cmd: |
kubectl get service keystone --namespace {{namespace}} --template={%raw%}{{.spec.clusterIP}}{%endraw%}
executable: /bin/bash
register: keystone_ip
- set_fact:
keystone_ip: "{{keystone_ip.stdout}}"
- name: Get glance cluster ip
shell:
cmd: |
kubectl get service glance --namespace {{namespace}} --template={%raw%}{{.spec.clusterIP}}{%endraw%}
executable: /bin/bash
register: glance_ip
- set_fact:
glance_ip: "{{glance_ip.stdout}}"
- name: Wait for glance to become available
wait_for:
host: "{{glance_ip}}"
port: "{{item}}"
delay: 2
timeout: 300
with_items:
- 9292
- name: Test glance jobs completion
shell:
cmd: |
set -ex
rst=$(kubectl --namespace {{namespace}} get jobs {{item}} --template={%raw%}"{{.status.succeeded}}"{%endraw%})
if [ "$rst" == "1" ]; then
exit 0
fi
exit 1
executable: /bin/bash
retries: 6
delay: 5
register: task_result
until: task_result.rc == 0
with_items:
- glance-createdb
- glance-db-sync
- name: Copy tempests config
become: true
template:
src: templates/tempest.conf
dest: /etc/tempest/tempest.conf
- name: Run tempest
shell:
cmd: |
set -x
set -e
tempest init tempest
cd tempest
tempest run -r image
executable: /bin/bash
ignore_errors: true
register: tempest_output