From 1cf17eaf91d54d20071e39d84c49551c6549e6f8 Mon Sep 17 00:00:00 2001 From: Frank-ZhangXin Date: Fri, 29 Jun 2018 15:49:55 -0500 Subject: [PATCH] Add aio host conf for barbican role Adding this example conf file would guide user to set correct host name in AIO case. An experimental test for barbican has been added which uses the barbican tempest plugin. Depends-On: https://review.openstack.org/596886 Depends-On: https://review.openstack.org/598210 Change-Id: I10a07d5e4b2b3fbf122a79f15e27a9ca34799221 (cherry picked from commit d65906c48654cfa103d52223a74be200d0b4e0a0) --- ansible-role-requirements.yml | 4 ++-- etc/openstack_deploy/conf.d/barbican.yml.aio | 4 ++++ tests/roles/bootstrap-host/defaults/main.yml | 3 +++ .../templates/user_variables_barbican.yml.j2 | 22 +++++++++++++++++++ tests/test_inventory.py | 1 + tests/vars/bootstrap-aio-vars.yml | 4 ++++ zuul.d/jobs.yaml | 7 ++++++ zuul.d/project-templates.yaml | 1 + 8 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 etc/openstack_deploy/conf.d/barbican.yml.aio create mode 100644 tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml index c184fcd188..496119a3d0 100644 --- a/ansible-role-requirements.yml +++ b/ansible-role-requirements.yml @@ -61,7 +61,7 @@ - name: os_barbican scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_barbican - version: c3ecdf093c9b21e1bbcafea3e2407cf1a62766bb + version: 0dbe12c8a4d5296c24edc1c85173fd1338db0cca - name: os_ceilometer scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_ceilometer @@ -105,7 +105,7 @@ - name: os_neutron scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_neutron - version: 337b86d0ad7efc52bdaa43ab6ca142193cfa7ad8 + version: 017f9dde6a3735f72de6484b47f49f4c95d0e200 - name: os_nova scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_nova diff --git a/etc/openstack_deploy/conf.d/barbican.yml.aio b/etc/openstack_deploy/conf.d/barbican.yml.aio new file mode 100644 index 0000000000..f720e79efd --- /dev/null +++ b/etc/openstack_deploy/conf.d/barbican.yml.aio @@ -0,0 +1,4 @@ +--- +key-manager_hosts: + aio1: + ip: 172.29.236.100 diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml index 9c6c962889..898d345a31 100644 --- a/tests/roles/bootstrap-host/defaults/main.yml +++ b/tests/roles/bootstrap-host/defaults/main.yml @@ -56,6 +56,9 @@ bootstrap_user_variables_extra_templates: octavia: - src: user_variables_octavia.yml.j2 dest: user_variables_octavia.yml + barbican: + - src: user_variables_barbican.yml.j2 + dest: user_variables_barbican.yml ## Loopback volumes # Sparse loopback disks are used for the containers if there is no secondary diff --git a/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 new file mode 100644 index 0000000000..b25fdbf3e6 --- /dev/null +++ b/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 @@ -0,0 +1,22 @@ +# 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. + +tempest_plugins: + - name: barbican-tempest-plugin + repo: https://git.openstack.org/openstack/barbican-tempest-plugin + branch: master + +tempest_test_whitelist: + - barbican_tempest_plugin.tests.api + +tempest_roles: + - key-manager:service-admin diff --git a/tests/test_inventory.py b/tests/test_inventory.py index 0d1641ecf4..3db6df21b5 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -253,6 +253,7 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'ironic-compute_hosts', 'key-manager_containers', 'key-manager_hosts', + 'key-manager_all', 'keystone', 'keystone_all', 'keystone_container', diff --git a/tests/vars/bootstrap-aio-vars.yml b/tests/vars/bootstrap-aio-vars.yml index b424677f5d..ff9e88f5e6 100644 --- a/tests/vars/bootstrap-aio-vars.yml +++ b/tests/vars/bootstrap-aio-vars.yml @@ -92,3 +92,7 @@ confd_overrides: - name: keystone.yml.aio - name: neutron.yml.aio - name: nova.yml.aio + barbican: + - name: haproxy.yml.aio + - name: keystone.yml.aio + - name: barbican.yml.aio diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 072d485ea1..aef25390f8 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -161,6 +161,13 @@ vars: install_method: distro +- job: + name: openstack-ansible-deploy-barbican-ubuntu-xenial + parent: openstack-ansible-deploy-aio_lxc-ubuntu-xenial + vars: + action: deploy + scenario: barbican + # centos - job: name: openstack-ansible-deploy-aio_lxc-centos-7 diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml index 8282021e07..fa38dc2693 100644 --- a/zuul.d/project-templates.yaml +++ b/zuul.d/project-templates.yaml @@ -27,6 +27,7 @@ - openstack-ansible-deploy-translations-ubuntu-xenial experimental: jobs: + - openstack-ansible-deploy-barbican-ubuntu-xenial - openstack-ansible-deploy-congress-ubuntu-xenial - openstack-ansible-deploy-octavia-ubuntu-xenial - openstack-ansible-deploy_with_ansible_devel-aio-ubuntu-xenial