Add MySQL connection SSL support
When 'heat_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. Change-Id: I8d582a5fe18b33592461f3ea23551c97720b8e7d Partial-Bug: 1667789
This commit is contained in:
parent
8fcd291977
commit
d9b4966128
@ -47,9 +47,11 @@ heat_fatal_deprecations: False
|
||||
heat_clients_endpoint: internalURL
|
||||
heat_clients_heat_endpoint: publicURL
|
||||
|
||||
## DB
|
||||
## Database info
|
||||
heat_galera_user: heat
|
||||
heat_galera_database: heat
|
||||
heat_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
|
||||
heat_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
|
||||
|
||||
## RabbitMQ info
|
||||
|
||||
|
@ -47,7 +47,7 @@ endpoint_type = {{ heat_clients_endpoint }}
|
||||
auth_uri = {{ keystone_service_internaluri }}
|
||||
|
||||
[database]
|
||||
connection = mysql+pymysql://{{ heat_galera_user }}:{{ heat_container_mysql_password }}@{{ heat_galera_address }}/{{ heat_galera_database }}?charset=utf8
|
||||
connection = mysql+pymysql://{{ heat_galera_user }}:{{ heat_container_mysql_password }}@{{ heat_galera_address }}/{{ heat_galera_database }}?charset=utf8{% if heat_galera_use_ssl | bool %}&ssl_ca={{ heat_galera_ssl_ca_cert }}{% endif %}
|
||||
|
||||
[ec2authtoken]
|
||||
auth_uri = {{ keystone_service_internalurl }}
|
||||
|
11
tox.ini
11
tox.ini
@ -103,6 +103,17 @@ commands =
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.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-heat-ssl-nv
|
||||
parent: openstack-ansible-functional-ubuntu-xenial
|
||||
voting: false
|
||||
vars:
|
||||
tox_env: ssl
|
@ -21,6 +21,7 @@
|
||||
- openstack-ansible-functional-centos-7
|
||||
- openstack-ansible-functional-opensuse-423
|
||||
- openstack-ansible-functional-ubuntu-xenial
|
||||
- openstack-ansible-heat-ssl-nv
|
||||
experimental:
|
||||
jobs:
|
||||
- openstack-ansible-integrated-deploy-aio
|
||||
@ -30,3 +31,4 @@
|
||||
- openstack-ansible-functional-centos-7
|
||||
- openstack-ansible-functional-opensuse-423
|
||||
- openstack-ansible-functional-ubuntu-xenial
|
||||
- openstack-ansible-heat-ssl-nv
|
||||
|
Loading…
Reference in New Issue
Block a user