diff --git a/defaults/main.yml b/defaults/main.yml index f7f7bba..ed62eff 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -67,9 +67,11 @@ sahara_rabbitmq_telemetry_port: "{{ sahara_rabbitmq_port }}" sahara_rabbitmq_telemetry_servers: "{{ sahara_rabbitmq_servers }}" sahara_rabbitmq_telemetry_use_ssl: "{{ sahara_rabbitmq_use_ssl }}" -## DB info +## Database info sahara_galera_database: sahara sahara_galera_user: sahara +sahara_galera_use_ssl: "{{ galera_use_ssl | default(False) }}" +sahara_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}" sahara_role_name: admin sahara_api_bind_address: 0.0.0.0 diff --git a/templates/sahara.conf.j2 b/templates/sahara.conf.j2 index 78e8195..5823524 100644 --- a/templates/sahara.conf.j2 +++ b/templates/sahara.conf.j2 @@ -28,7 +28,7 @@ transport_url = rabbit://{% for host in sahara_rabbitmq_servers.split(',') %}{{ [database] -connection = mysql+pymysql://{{ sahara_galera_user }}:{{ sahara_container_mysql_password }}@{{ sahara_galera_address }}/{{ sahara_galera_database }}?charset=utf8 +connection = mysql+pymysql://{{ sahara_galera_user }}:{{ sahara_container_mysql_password }}@{{ sahara_galera_address }}/{{ sahara_galera_database }}?charset=utf8{% if sahara_galera_use_ssl | bool %}&ssl_ca={{ sahara_galera_ssl_ca_cert }}{% endif %} [keystone_authtoken] diff --git a/tox.ini b/tox.ini index 360c617..4c6e512 100644 --- a/tox.ini +++ b/tox.ini @@ -104,6 +104,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} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml new file mode 100644 index 0000000..3f55ebc --- /dev/null +++ b/zuul.d/jobs.yaml @@ -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-sahara-ssl-nv + parent: openstack-ansible-functional-ubuntu-xenial + voting: false + vars: + tox_env: ssl diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index b346c2a..5b8e91e 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -21,6 +21,7 @@ - openstack-ansible-functional-centos-7 - openstack-ansible-functional-opensuse-423 - openstack-ansible-functional-ubuntu-xenial + - openstack-ansible-sahara-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-sahara-ssl-nv