Add MySQL connection SSL support
When 'cinder_galera_use_ssl' is True, use an encrypted connection to the database using either a self-signed or user-provided CA certificate. A new non-voting test has been added to verify that the role remains functional when enabling SSL features. Partial-Bug: 1667789 Change-Id: Ifeda0acb4b70ba313e6572c806125d31ab3eb300 Depends-On: I95cc994df5118fce7ce588fc0bff979bc283a6f3
This commit is contained in:
parent
3312cd5ea2
commit
198acc08aa
@ -51,9 +51,11 @@ cinder_nova_catalog_admin_info: compute:nova:adminURL
|
||||
|
||||
cinder_fatal_deprecations: False
|
||||
|
||||
## DB
|
||||
## Database info
|
||||
cinder_galera_user: cinder
|
||||
cinder_galera_database: cinder
|
||||
cinder_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
|
||||
cinder_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
|
||||
|
||||
## RabbitMQ info
|
||||
|
||||
|
@ -103,7 +103,7 @@ enabled_backends={% for backend in cinder_backends|dictsort %}{{ backend.0 }}{%
|
||||
{% endif %}
|
||||
|
||||
[database]
|
||||
connection = mysql+pymysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_password }}@{{ cinder_galera_address }}/{{ cinder_galera_database }}?charset=utf8
|
||||
connection = mysql+pymysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_password }}@{{ cinder_galera_address }}/{{ cinder_galera_database }}?charset=utf8{% if cinder_galera_use_ssl | bool %}&ssl_ca={{ cinder_galera_ssl_ca_cert }}{% endif %}
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
ssl = {{ cinder_rabbitmq_use_ssl }}
|
||||
|
11
tox.ini
11
tox.ini
@ -116,6 +116,17 @@ commands =
|
||||
bash -c "{toxinidir}/tests/test-cinder-upgrades.sh"
|
||||
|
||||
|
||||
[testenv:ssl]
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
ANSIBLE_PARAMETERS=-vvv -e galera_use_ssl=True
|
||||
commands =
|
||||
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||
|
||||
|
||||
[testenv:linters]
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
|
21
zuul.d/jobs.yaml
Normal file
21
zuul.d/jobs.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
# Copyright 2017, 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.
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-cinder-ssl-nv
|
||||
parent: openstack-ansible-functional-ubuntu-xenial
|
||||
voting: false
|
||||
vars:
|
||||
tox_env: ssl
|
@ -22,6 +22,7 @@
|
||||
- openstack-ansible-functional-opensuse-423
|
||||
- openstack-ansible-functional-ubuntu-xenial
|
||||
- openstack-ansible-upgrade-ubuntu-xenial
|
||||
- openstack-ansible-cinder-ssl-nv
|
||||
experimental:
|
||||
jobs:
|
||||
- openstack-ansible-integrated-deploy-aio
|
||||
@ -32,3 +33,4 @@
|
||||
- openstack-ansible-functional-opensuse-423
|
||||
- openstack-ansible-functional-ubuntu-xenial
|
||||
- openstack-ansible-upgrade-ubuntu-xenial
|
||||
- openstack-ansible-cinder-ssl-nv
|
||||
|
Loading…
x
Reference in New Issue
Block a user