From a97cbbd56575c01b65351b12dcbd1bb90e660300 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 12 Aug 2019 18:29:46 +0300 Subject: [PATCH] Add manila CI This patch aims to fix and cleaup manila role and add CI into it. Changes it implements: * Fix endpoint creation * adds playbook.yml in examples to use integrated linters check * adds role CI tests using integrated repo * adds sqlite installation Depends-On: https://review.opendev.org/704163 Depends-On: https://review.opendev.org/702853 Depends-On: https://review.opendev.org/674653 Depends-On: https://review.opendev.org/703136 Change-Id: I0807180bd9b2ccbf2f1ebb6a72d74e9f0d126ba6 --- examples/playbook.yml | 6 ++++++ tasks/main.yml | 3 +++ tasks/manila_post_install.yml | 1 - templates/manila.conf.j2 | 2 ++ vars/debian.yml | 1 + vars/redhat.yml | 1 + vars/suse.yml | 1 + zuul.d/project.yaml | 11 +++++++++++ 8 files changed, 25 insertions(+), 1 deletion(-) diff --git a/examples/playbook.yml b/examples/playbook.yml index e69de29..e071037 100644 --- a/examples/playbook.yml +++ b/examples/playbook.yml @@ -0,0 +1,6 @@ +--- +- name: Install Manila Share service + hosts: localhost + user: root + roles: + - role: "os_manila" diff --git a/tasks/main.yml b/tasks/main.yml index b73d81c..ccb3d93 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -174,6 +174,9 @@ - name: "{{ manila_service_name }}" type: "{{ manila_service_type }}" description: "{{ manila_service_description }}" + - name: "{{ manila_service_v2_name }}" + type: "{{ manila_service_v2_type }}" + description: "{{ manila_service_v2_description }}" when: - groups['manila_api'] | length > 0 - manila_services['manila_api']['group'] in group_names diff --git a/tasks/manila_post_install.yml b/tasks/manila_post_install.yml index ac0d300..1fbe364 100644 --- a/tasks/manila_post_install.yml +++ b/tasks/manila_post_install.yml @@ -20,7 +20,6 @@ flat: yes changed_when: false with_items: "{{ manila_rootwrap_files }}" - when: item.condition | default(True) run_once: true - name: Copy manila configs diff --git a/templates/manila.conf.j2 b/templates/manila.conf.j2 index aa0cd22..7f8a87b 100644 --- a/templates/manila.conf.j2 +++ b/templates/manila.conf.j2 @@ -91,6 +91,7 @@ token_cache_time = 300 memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcached_encryption_key }} +{% if (manila_backends | to_json).find('manila.share.drivers.generic') != -1 %} [neutron] url = http://{{ internal_lb_vip_address }}:9696 auth_url = {{ keystone_service_adminurl }} @@ -121,3 +122,4 @@ region_name = {{ cinder_service_region | default(manila_service_region) }} project_name = {{ cinder_service_project_name | default("service") }} username = {{ cinder_service_user_name | default("cinder") }} password = {{ cinder_service_password }} +{% endif %} \ No newline at end of file diff --git a/vars/debian.yml b/vars/debian.yml index 4f0ac62..c055814 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -56,6 +56,7 @@ manila_share_distro_packages: manila_share_deps_distro_packages: - qemu-utils + - sqlite3 manila_lvm_share_distro_packages: - dmeventd diff --git a/vars/redhat.yml b/vars/redhat.yml index 75c3b82..59c9b00 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -43,6 +43,7 @@ manila_share_distro_packages: [] manila_share_deps_distro_packages: - "qemu-img{% if ansible_distribution_major_version|int <= 7 %}-ev{% endif %}" + - sqlite manila_lvm_share_distro_packages: - device-mapper-event diff --git a/vars/suse.yml b/vars/suse.yml index 1fb0d89..b262cdc 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -43,6 +43,7 @@ manila_share_distro_packages: [] manila_share_deps_distro_packages: - qemu-tools + - sqlite3 manila_lvm_share_distro_packages: - device-mapper diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index b5ca46f..fbbf951 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -16,4 +16,15 @@ templates: - check-requirements - publish-openstack-docs-pti + - openstack-ansible-linters-jobs - release-notes-jobs-python3 + check: + jobs: + - openstack-ansible-deploy-aio_metal-ubuntu-bionic + - openstack-ansible-deploy-aio_metal-centos-7 + - openstack-ansible-deploy-aio_lxc-ubuntu-bionic: + voting: false + gate: + jobs: + - openstack-ansible-deploy-aio_metal-ubuntu-bionic + - openstack-ansible-deploy-aio_metal-centos-7