diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml
index 8dd4f35115..4e48506be3 100644
--- a/ansible-role-requirements.yml
+++ b/ansible-role-requirements.yml
@@ -133,6 +133,10 @@
src: https://git.openstack.org/openstack/openstack-ansible-os_magnum
version: master
trackbranch: master
+- name: os_manila
+ scm: git
+ src: https://git.openstack.org/openstack/openstack-ansible-os_manila
+ version: master
- name: os_masakari
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_masakari
diff --git a/deploy-guide/source/configure.rst b/deploy-guide/source/configure.rst
index 7250ffe3c8..c606daf72d 100644
--- a/deploy-guide/source/configure.rst
+++ b/deploy-guide/source/configure.rst
@@ -150,6 +150,8 @@ OpenStack service roles
- :role_docs:`os_magnum`
+- :role_docs:`os_manila`
+
- :role_docs:`os_masakari`
- :role_docs:`os_neutron`
diff --git a/doc/source/admin/troubleshooting.rst b/doc/source/admin/troubleshooting.rst
index 95a4ee06fc..7b3b866c85 100644
--- a/doc/source/admin/troubleshooting.rst
+++ b/doc/source/admin/troubleshooting.rst
@@ -232,6 +232,13 @@ The following table lists the commands to restart an OpenStack service.
# service cinder-backup restart
# service cinder-scheduler restart
# service cinder-volume restart
+ * - Block Storage service
+ - .. code-block:: console
+
+ # service manila-api restart
+ # service manila-data restart
+ # service manila-share restart
+ # service manila-scheduler restart
* - Object Storage service
- .. code-block:: console
diff --git a/doc/source/contributor/role-maturity-matrix.html b/doc/source/contributor/role-maturity-matrix.html
index 6c427ec04d..b453fd994d 100644
--- a/doc/source/contributor/role-maturity-matrix.html
+++ b/doc/source/contributor/role-maturity-matrix.html
@@ -243,6 +243,15 @@
✔ |
✔ |
+
+ os_manila |
+ Stein |
+ Incubated |
+ ✔ |
+ ✘ |
+ ✘ |
+ ✘ |
+
os_masakari |
Stein |
diff --git a/doc/source/reference/architecture/storage-arch.rst b/doc/source/reference/architecture/storage-arch.rst
index 8429ab3070..3031ecb615 100644
--- a/doc/source/reference/architecture/storage-arch.rst
+++ b/doc/source/reference/architecture/storage-arch.rst
@@ -7,6 +7,7 @@ OpenStack has multiple storage realms to consider:
* Object Storage (swift)
* Image storage (glance)
* Ephemeral storage (nova)
+* Filesystem storage (manila)
Block Storage (cinder)
~~~~~~~~~~~~~~~~~~~~~~
@@ -163,3 +164,17 @@ the storage device, the Compute host, the hypervisor, and the instance.
+----+---------------------------------------------------------------------+
| 3 | The hypervisor presents the disk as a device to the instance. |
+----+---------------------------------------------------------------------+
+
+Filesystem storage (manila)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The shared filesystem service (manila) can be configured to provide file
+systems on a variety of storage back ends as supported by the
+`manila_store drivers`_.
+
+.. figure:: ../figures/manila-overview.png
+ :width: 600px
+
+ The diagram shows a basic overview of the manila service.
+
+.. _manila_store drivers: https://docs.openstack.org/manila/latest/configuration/shared-file-systems/drivers.html
diff --git a/doc/source/reference/figures/manila-overview.png b/doc/source/reference/figures/manila-overview.png
new file mode 100644
index 0000000000..ef42721d89
Binary files /dev/null and b/doc/source/reference/figures/manila-overview.png differ
diff --git a/etc/openstack_deploy/conf.d/manila.yml.aio b/etc/openstack_deploy/conf.d/manila.yml.aio
new file mode 100644
index 0000000000..c4ad902b6b
--- /dev/null
+++ b/etc/openstack_deploy/conf.d/manila.yml.aio
@@ -0,0 +1,7 @@
+manila-infra_hosts:
+ aio1:
+ ip: 172.29.236.100
+
+manila-data_hosts:
+ aio1:
+ ip: 172.29.236.100
diff --git a/etc/openstack_deploy/conf.d/manila.yml.example b/etc/openstack_deploy/conf.d/manila.yml.example
new file mode 100644
index 0000000000..efa07e13f7
--- /dev/null
+++ b/etc/openstack_deploy/conf.d/manila.yml.example
@@ -0,0 +1,16 @@
+# The infra nodes that will be running the manila services
+manila-infra_hosts:
+ infra1:
+ ip: 172.20.236.111
+ infra2:
+ ip: 172.20.236.112
+ infra3:
+ ip: 172.20.236.113
+
+manila-data_hosts:
+ data1:
+ ip: 172.20.236.121
+ data2:
+ ip: 172.20.236.122
+ data3:
+ ip: 172.20.236.123
diff --git a/etc/openstack_deploy/env.d/aio_metal.yml.example b/etc/openstack_deploy/env.d/aio_metal.yml.example
index dd0d0d07a5..44de09f29d 100644
--- a/etc/openstack_deploy/env.d/aio_metal.yml.example
+++ b/etc/openstack_deploy/env.d/aio_metal.yml.example
@@ -69,6 +69,12 @@ container_skel:
magnum_container:
properties:
is_metal: true
+ manila_container:
+ properties:
+ is_metal: true
+ manila_data_container:
+ properties:
+ is_metal: true
masakari_monitors_container:
properties:
is_metal: true
diff --git a/etc/openstack_deploy/openstack_user_config.yml.example b/etc/openstack_deploy/openstack_user_config.yml.example
index 9bab1abaa1..4af00b3cd0 100644
--- a/etc/openstack_deploy/openstack_user_config.yml.example
+++ b/etc/openstack_deploy/openstack_user_config.yml.example
@@ -716,6 +716,79 @@
# rbd_secret_uuid: "{{ cinder_ceph_client_uuid }}"
#
#
+# Example:
+#
+# Use the cephfs (NATIVE) backend with manila:
+#
+# container_vars:
+# manila_default_share_type: cephfs1
+# manila_backends:
+# cephfs1:
+# driver_handles_share_servers: False
+# share_backend_name: CEPHFS1
+# share_driver: manila.share.drivers.cephfs.driver.CephFSDriver
+# cephfs_conf_path: /etc/ceph/ceph.conf
+# cephfs_auth_id: manila
+# cephfs_cluster_name: ceph
+# cephfs_enable_snapshots: False
+# filter_function: "share.size >= 0"
+# goodness_function: "share.size >= 0"
+#
+#
+# Use the cephfs + NFS backend with manila:
+#
+# container_vars:
+# manila_default_share_type: cephfsnfs1
+# manila_backends:
+# cephfsnfs1:
+# driver_handles_share_servers: False
+# share_backend_name: CEPHFSNFS1
+# share_driver: manila.share.drivers.cephfs.driver.CephFSDriver
+# cephfs_ganesha_server_ip: 172.16.24.200
+# cephfs_protocol_helper_type: NFS
+# cephfs_conf_path: /etc/ceph/ceph.conf
+# cephfs_auth_id: manila
+# filter_function: "share.size >= 0"
+# goodness_function: "share.size >= 0"
+#
+#
+# Example:
+#
+# Use the lvm backend with manila:
+#
+# container_vars:
+# manila_default_share_type: nfs-share1
+# manila_backends:
+# nfs-share1:
+# share_backend_name: NFS_SHARE1
+# share_driver: manila.share.drivers.lvm.LVMShareDriver
+# driver_handles_share_servers: False
+# lvm_share_volume_group: manila-shares
+# lvm_share_export_ip: "10.1.1.1"
+# filter_function: "share.size >= 0"
+# goodness_function: "share.size >= 0"
+#
+#
+#
+# Example:
+#
+# Use the generic backend with manila:
+#
+# container_vars:
+# manila_default_share_type: generic
+# manila_backends:
+# generic:
+# share_backend_name: GENERIC
+# share_driver: manila.share.drivers.generic.GenericShareDriver
+# driver_handles_share_servers: True
+# service_instance_flavor_id: 100
+# service_image_name: manila-service-image
+# service_instance_user: manila
+# service_instance_password: manila
+# interface_driver: manila.network.linux.interface.BridgeInterfaceDriver
+# filter_function: "share.size >= 0"
+# goodness_function: "share.size >= 0"
+#
# --------
#
# Level: log_hosts (optional)
diff --git a/etc/openstack_deploy/user_secrets.yml b/etc/openstack_deploy/user_secrets.yml
index 5627756bb7..381332b674 100644
--- a/etc/openstack_deploy/user_secrets.yml
+++ b/etc/openstack_deploy/user_secrets.yml
@@ -274,3 +274,14 @@ congress_service_password:
## panko passwords
panko_container_db_password:
panko_service_password:
+
+## manila passwords
+manila_container_mysql_password:
+manila_oslomsg_rpc_password:
+manila_profiler_hmac_key:
+#NOTE: Please uncomment those
+# if you want to split rpc and notify users
+# Please also wire the appropriate userid in
+# your user variables.
+#manila_oslomsg_notify_password:
+manila_service_password:
diff --git a/inventory/env.d/manila.yml b/inventory/env.d/manila.yml
new file mode 100644
index 0000000000..8eb230eeca
--- /dev/null
+++ b/inventory/env.d/manila.yml
@@ -0,0 +1,57 @@
+# Copyright 2019, 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.
+
+component_skel:
+ manila_api:
+ belongs_to:
+ - manila_all
+ manila_scheduler:
+ belongs_to:
+ - manila_all
+ manila_data:
+ belongs_to:
+ - manila_all
+ manila_share:
+ belongs_to:
+ - manila_all
+
+container_skel:
+ manila_container:
+ belongs_to:
+ - manila-infra_containers
+ contains:
+ - manila_api
+ - manila_scheduler
+ manila_data_container:
+ belongs_to:
+ - manila-data_containers
+ contains:
+ - manila_data
+ - manila_share
+ properties:
+ is_metal: true
+
+physical_skel:
+ manila-data_containers:
+ belongs_to:
+ - all_containers
+ manila-data_hosts:
+ belongs_to:
+ - hosts
+ manila-infra_containers:
+ belongs_to:
+ - all_containers
+ manila-infra_hosts:
+ belongs_to:
+ - hosts
diff --git a/inventory/group_vars/haproxy/haproxy.yml b/inventory/group_vars/haproxy/haproxy.yml
index 972c6e0cad..b70405c5e2 100644
--- a/inventory/group_vars/haproxy/haproxy.yml
+++ b/inventory/group_vars/haproxy/haproxy.yml
@@ -266,6 +266,15 @@ haproxy_default_services:
haproxy_backend_options:
- "httpchk GET / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
haproxy_service_enabled: "{{ groups['magnum_all'] is defined and groups['magnum_all'] | length > 0 }}"
+ - service:
+ haproxy_service_name: manila
+ haproxy_backend_nodes: "{{ groups['manila_all'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 8786
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
+ haproxy_service_enabled: "{{ groups['manila_all'] is defined and groups['manila_all'] | length > 0 }}"
- service:
haproxy_service_name: masakari_api
haproxy_backend_nodes: "{{ groups['masakari_api'] | default([]) }}"
diff --git a/inventory/group_vars/horizon_all.yml b/inventory/group_vars/horizon_all.yml
index c5938cbdcc..18f7619d50 100644
--- a/inventory/group_vars/horizon_all.yml
+++ b/inventory/group_vars/horizon_all.yml
@@ -19,6 +19,7 @@ horizon_enable_cinder_backup: "{{ hostvars['localhost']['cinder_service_backup_p
horizon_enable_heat_ui: "{{ (groups['heat_all'] is defined) and (groups['heat_all'] | length > 0) }}"
horizon_enable_ironic_ui: "{{ (groups['ironic_all'] is defined) and (groups['ironic_all'] | length > 0) }}"
horizon_enable_magnum_ui: "{{ (groups['magnum_all'] is defined) and (groups['magnum_all'] | length > 0) }}"
+horizon_enable_manila_ui: "{{ (groups['manila_all'] is defined) and (groups['manila_all'] | length > 0) }}"
horizon_enable_masakari_ui: "{{ (groups['masakari_all'] is defined) and (groups['masakari_all'] | length > 0) }}"
horizon_enable_designate_ui: "{{ (groups['designate_all'] is defined) and (groups['designate_all'] | length > 0) }}"
horizon_enable_octavia_ui: "{{ (groups['octavia-infra_all'] is defined) and (groups['octavia-infra_all'] | length > 0) }}"
diff --git a/inventory/group_vars/manila_all.yml b/inventory/group_vars/manila_all.yml
new file mode 100644
index 0000000000..0ac500afb9
--- /dev/null
+++ b/inventory/group_vars/manila_all.yml
@@ -0,0 +1,33 @@
+---
+# Copyright 2019, 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.
+
+# Set the available protocol list
+manila_enabled_share_protocols:
+ - NFS
+ - CIFS
+ - CEPHFS
+
+_manila_default_share_type: "{{ (manila_backends | default({})).keys() }}"
+manila_default_share_type: "{{ ((_manila_default_share_type | length) > 0) | ternary(_manila_default_share_type[0], null) }}"
+
+# V1 api config
+manila_service_publicuri: "{{ openstack_service_publicuri_proto|default(manila_service_proto) }}://{{ external_lb_vip_address }}:{{ manila_service_port }}"
+manila_service_internaluri: "{{ openstack_service_internaluri_proto|default(manila_service_proto) }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"
+manila_service_adminuri: "{{ openstack_service_adminuri_proto|default(manila_service_proto) }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"
+
+# V2 api config
+manila_service_v2_publicuri: "{{ openstack_service_publicuri_proto|default(manila_service_proto) }}://{{ external_lb_vip_address }}:{{ manila_service_v2_port }}"
+manila_service_v2_internaluri: "{{ openstack_service_internaluri_proto|default(manila_service_proto) }}://{{ internal_lb_vip_address }}:{{ manila_service_v2_port }}"
+manila_service_v2_adminuri: "{{ openstack_service_adminuri_proto|default(manila_service_proto) }}://{{ internal_lb_vip_address }}:{{ manila_service_v2_port }}"
diff --git a/inventory/inventory.ini b/inventory/inventory.ini
index 41e843b15f..fdc1cc1cc8 100644
--- a/inventory/inventory.ini
+++ b/inventory/inventory.ini
@@ -135,6 +135,12 @@ ironic_server
[magnum_all]
+[manila_all:children]
+manila_api
+manila_scheduler
+manila_data
+manila_share
+
[masakari_all:children]
masakari_api
masakari_engine
diff --git a/playbooks/defaults/repo_packages/openstack_services.yml b/playbooks/defaults/repo_packages/openstack_services.yml
index 6a7f9460e3..174b074a56 100644
--- a/playbooks/defaults/repo_packages/openstack_services.yml
+++ b/playbooks/defaults/repo_packages/openstack_services.yml
@@ -147,6 +147,13 @@ keystone_git_project_group: keystone_all
keystone_git_track_branch: stable/stein
+## Manila service
+manila_git_repo: https://git.openstack.org/openstack/manila
+manila_git_install_branch: 54bce0a9ca07952cd97cd2bc8641f81ab2c49af5 # HEAD as of 22.03.2019
+manila_git_project_group: manila_all
+manila_git_track_branch: master
+
+
## Neutron service
neutron_git_repo: https://git.openstack.org/openstack/neutron
neutron_git_install_branch: 4da4d5e0f0c2eb49b8929119776d16504229a4c3 # HEAD as of 29.03.2019
diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml
new file mode 100644
index 0000000000..864b1a52c4
--- /dev/null
+++ b/playbooks/os-manila-install.yml
@@ -0,0 +1,89 @@
+---
+# Copyright 2018, 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.
+
+- name: Install manila services
+ hosts: "manila_all"
+ gather_facts: "{{ osa_gather_facts | default(True) }}"
+ user: root
+ environment: "{{ deployment_environment_variables | default({}) }}"
+ vars_files:
+ - "defaults/repo_packages/openstack_services.yml"
+ - "defaults/{{ install_method }}_install.yml"
+ tags:
+ - manila
+ pre_tasks:
+ # In order to ensure that any container, software or
+ # config file changes which causes a container/service
+ # restart do not cause an unexpected outage, we drain
+ # the load balancer back end for this container.
+ - include_tasks: common-tasks/haproxy-endpoint-manage.yml
+ vars:
+ haproxy_backend: manila_api-back
+ haproxy_state: disabled
+ when:
+ - "'manila_api' in group_names"
+ - "groups['manila_api'] | length > 1"
+
+ - name: Configure container (non-nfs)
+ include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
+ vars:
+ list_of_bind_mounts: "{{ manila_container_bind_mounts }}"
+ when:
+ - not is_metal
+ - manila_default_store == "file"
+ - (manila_nfs_client is not defined) or (manila_nfs_client | length == 0)
+
+ - name: Configure container (nfs)
+ include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
+ when:
+ - not is_metal
+ - (manila_default_store != "file") or (manila_nfs_client is defined)
+
+ - name: Configure log directories (on metal)
+ include_tasks: common-tasks/os-log-dir-setup.yml
+ vars:
+ log_dirs:
+ - src: "/openstack/log/{{ inventory_hostname }}-manila"
+ dest: "/var/log/manila"
+
+ - include_tasks: common-tasks/unbound-clients.yml
+ when:
+ - hostvars['localhost']['resolvconf_enabled'] | bool
+
+ roles:
+ - role: "os_manila"
+ when:
+ - inventory_hostname in groups['manila_api']
+ - role: "os_manila"
+ when:
+ - not inventory_hostname in groups['manila_api']
+
+ post_tasks:
+ - include_tasks: "common-tasks/rsyslog-client.yml"
+ vars:
+ rsyslog_client_log_rotate_file: manila_log_rotate
+ rsyslog_client_log_dir: "/var/log/manila"
+ rsyslog_client_config_name: "99-manila-rsyslog-client.conf"
+
+ # Now that container changes are done, we can set
+ # the load balancer back end for this container
+ # to available again.
+ - include_tasks: common-tasks/haproxy-endpoint-manage.yml
+ vars:
+ haproxy_backend: manila_api-back
+ haproxy_state: enabled
+ when:
+ - "'manila_api' in group_names"
+ - "groups['manila_api'] | length > 1"
diff --git a/playbooks/setup-openstack.yml b/playbooks/setup-openstack.yml
index dd859e4e17..db33e944bf 100644
--- a/playbooks/setup-openstack.yml
+++ b/playbooks/setup-openstack.yml
@@ -35,6 +35,7 @@
- import_playbook: os-tacker-install.yml
- import_playbook: os-blazar-install.yml
- import_playbook: os-masakari-install.yml
+- import_playbook: os-manila-install.yml
# This is not an OpenStack service, but integrates with Keystone and must be
# deployed afterward.
diff --git a/releasenotes/notes/add-horizon-manila-dashboard-support-4fcddedffb83bc28.yaml b/releasenotes/notes/add-horizon-manila-dashboard-support-4fcddedffb83bc28.yaml
new file mode 100644
index 0000000000..eaac26594b
--- /dev/null
+++ b/releasenotes/notes/add-horizon-manila-dashboard-support-4fcddedffb83bc28.yaml
@@ -0,0 +1,5 @@
+---
+features:
+ - The os_horizon role now has support for the horizon manila-ui dashboard. The
+ dashboard may be enabled by setting ``horizon_enable_manila_ui`` to ``True``
+ in ``/etc/openstack_deploy/user_variables.yml``.
diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml
index 731d3a5e3f..2649cf04bf 100644
--- a/tests/roles/bootstrap-host/defaults/main.yml
+++ b/tests/roles/bootstrap-host/defaults/main.yml
@@ -66,6 +66,11 @@ bootstrap_host_loopback_nova: yes
# Size of the Nova loopback disk in gigabytes (GB).
bootstrap_host_loopback_nova_size: 1024
#
+# Boolean option to deploy the loopback disk for Manila
+bootstrap_host_loopback_manila: yes
+# Size of the Manila loopback disk in gigabytes (GB).
+bootstrap_host_loopback_manila_size: 1024
+#
# Boolean option to deploy the loopback disk for machines
bootstrap_host_loopback_machines: yes
# Size of the machines loopback disk in gigabytes (GB).
diff --git a/tests/roles/bootstrap-host/tasks/main.yml b/tests/roles/bootstrap-host/tasks/main.yml
index 20dfaf7433..ee6781c5af 100644
--- a/tests/roles/bootstrap-host/tasks/main.yml
+++ b/tests/roles/bootstrap-host/tasks/main.yml
@@ -110,6 +110,13 @@
tags:
- prepare-loopback
+# Prepare the Manila data storage loopback disks
+- include: prepare_loopback_manila.yml
+ when:
+ - bootstrap_host_loopback_manila | bool
+ tags:
+ - prepare-loopback
+
# Prepare the Ceph cluster UUID and loopback disks
- include: prepare_ceph.yml
when:
diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml
index 44da9febce..6123e4e5ff 100644
--- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml
+++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml
@@ -166,6 +166,9 @@
- src: user_variables_barbican.yml.j2
dest: user_variables_barbican.yml
condition: "{{ 'barbican' in bootstrap_host_services }}"
+ - src: user_variables_manila.yml.j2
+ dest: user_variables_manila.yml
+ condition: "{{ 'manila' in bootstrap_host_services }}"
- name: Copy modified cinder-volume env.d file for ceph scenario
copy:
diff --git a/tests/roles/bootstrap-host/tasks/prepare_loopback_manila.yml b/tests/roles/bootstrap-host/tasks/prepare_loopback_manila.yml
new file mode 100644
index 0000000000..ed4fe4bfe6
--- /dev/null
+++ b/tests/roles/bootstrap-host/tasks/prepare_loopback_manila.yml
@@ -0,0 +1,77 @@
+---
+# Copyright 2015, 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.
+
+- name: Create sparse manila file
+ command: "truncate -s {{ bootstrap_host_loopback_manila_size }}G /openstack/manila.img"
+ args:
+ creates: /openstack/manila.img
+ register: manila_create
+ tags:
+ - manila-file-create
+
+- name: Run the systemd service role
+ include_role:
+ name: systemd_service
+ private: true
+ vars:
+ systemd_services:
+ - service_name: "loop-manila"
+ config_overrides:
+ Unit:
+ Description: no
+ After: systemd-udev-settle.service
+ Before: lvm2-activation-early.service
+ Wants: systemd-udev-settle.service
+ Service:
+ RemainAfterExit: yes
+ service_type: oneshot
+ execstarts:
+ - /bin/bash -c "/sbin/losetup $(/sbin/losetup -f) /openstack/manila.img"
+ - /sbin/pvscan
+ execstops:
+ - /bin/bash -c "losetup -d $(losetup -l | awk '/manila.img/ {print $1}')"
+ enabled: yes
+ state: started
+ systemd_tempd_prefix: openstack
+ tags:
+ - manila-config
+
+- name: Get loopback device
+ shell: "losetup -l | awk '/manila.img/ {print $1}'"
+ changed_when: false
+ register: manila_losetup
+ tags:
+ - skip_ansible_lint
+
+- name: Make LVM physical volume on the manila device
+ shell: "pvcreate {{ manila_losetup.stdout }} && touch /openstack/manila.pvcreate"
+ args:
+ creates: "/openstack/manila.pvcreate"
+ tags:
+ - skip_ansible_lint
+ - manila-lvm-pv
+
+- name: Run pvscan
+ command: "pvscan"
+ changed_when: false
+ tags:
+ - manila-lvm-pv
+
+- name: Add manila-shares volume group
+ lvg:
+ vg: manila-shares
+ pvs: "{{ manila_losetup.stdout }}"
+ tags:
+ - manila-lvm-vg
diff --git a/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2
new file mode 100644
index 0000000000..20b8cd99fd
--- /dev/null
+++ b/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2
@@ -0,0 +1,47 @@
+# 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: manila-tempest-plugin
+ repo: https://git.openstack.org/openstack/manila-tempest-plugin
+ branch: master
+
+tempest_test_whitelist:
+ - manila_tempest_tests.tests.scenario.test_share_basic_ops
+
+tempest_tempest_conf_overrides:
+ share:
+ image_with_share_tools: manila-service-image
+ image_password: manila
+ enable_protocols: nfs
+ enable_ip_rules_for_protocols: nfs
+ enable_ro_access_level_for_protocols: nfs
+ suppress_errors_in_cleanup: true
+ share_creation_retry_number: 3
+ run_ipv6_tests: False
+
+manila_backends:
+ nfs-share1:
+ share_backend_name: NFS_SHARE1
+ share_driver: manila.share.drivers.lvm.LVMShareDriver
+ driver_handles_share_servers: False
+ lvm_share_volume_group: manila-shares
+ lvm_share_export_ip: "172.29.244.100"
+ generic:
+ share_backend_name: GENERIC
+ share_driver: manila.share.drivers.generic.GenericShareDriver
+ driver_handles_share_servers: True
+ service_instance_flavor_id: 100
+ service_image_name: manila-service-image
+ service_instance_user: manila
+ service_instance_password: manila
+ interface_driver: manila.network.linux.interface.BridgeInterfaceDriver
diff --git a/tests/test_inventory.py b/tests/test_inventory.py
index b51d60a5fa..07fb04a1a3 100644
--- a/tests/test_inventory.py
+++ b/tests/test_inventory.py
@@ -278,6 +278,19 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'magnum-infra_hosts',
'magnum_all',
'magnum_container',
+ 'manila_all',
+ 'manila_api',
+ 'manila_container',
+ 'manila_data',
+ 'manila-data_all',
+ 'manila_data_container',
+ 'manila-data_containers',
+ 'manila-data_hosts',
+ 'manila-infra_all',
+ 'manila-infra_containers',
+ 'manila-infra_hosts',
+ 'manila_scheduler',
+ 'manila_share',
'masakari_all',
'masakari_api',
'masakari_api_container',