chef/cookbooks/manila/templates/default/manila.conf.erb
[DEFAULT]
state_path = /var/lib/manila
os_region_name= <%= @keystone_settings['endpoint_region'] %>
my_ip=<%= node[:manila][:my_ip] %>
<% unless @default_share_type.nil? -%>
default_share_type=<%= @default_share_type %>
<% end -%>
rootwrap_config=/etc/manila/rootwrap.conf
auth_strategy = keystone
enabled_share_backends=<%= @shares.each_with_index.collect { |share, share_idx|
"backend-#{share['backend_driver']}-#{share_idx}"
}.join(',') %>
enabled_share_protocols = <%= @enabled_share_protocols.join(',') %>
osapi_share_listen=<%= @bind_host %>
osapi_share_listen_port=<%= @bind_port %>
osapi_share_workers=<%= [node["cpu"]["total"], 2, 4].sort[1] %>
max_header_line = <%= node[:manila][:max_header_line] %>
wsgi_keep_alive = false
ssl_ca_file=<%= node[:manila][:ssl][:ca_certs] if node[:manila][:api][:protocol] == 'https' && node[:manila][:ssl][:cert_required] %>
ssl_cert_file=<%= node[:manila][:ssl][:certfile] if node[:manila][:api][:protocol] == 'https' %>
ssl_key_file=<%= node[:manila][:ssl][:keyfile] if node[:manila][:api][:protocol] == 'https' %>
debug=<%= node[:manila][:debug] %>
verbose=<%= node[:manila][:verbose] %>
log_dir=/var/log/manila
use_syslog=<%= node[:manila][:use_syslog] ? "True" : "False" %>
use_stderr = false
transport_url = <%= @rabbit_settings[:url] %>
[cinder]
auth_url = <%= @keystone_settings['internal_auth_url'] %>
auth_type = password
default_domain_id = <%= @keystone_settings["admin_domain_id"] %>
default_domain_name = <%= @keystone_settings["admin_domain"] %>
insecure=<%= @cinder_insecure %>
password=<%= @cinder_admin_password %>
project_name=<%= @keystone_settings['service_tenant'] %>
username=<%= @cinder_admin_username %>
[database]
connection=<%= @sql_connection %>
[keystone_authtoken]
www_authenticate_uri = <%= @keystone_settings['public_auth_url'] %>
auth_url = <%= @keystone_settings['internal_auth_url'] %>
auth_version= <%= @keystone_settings['api_version_for_middleware'] %>
project_name = <%= @keystone_settings['service_tenant'] %>
username = <%= @keystone_settings['service_user'] %>
password = <%= @keystone_settings['service_password'] %>
insecure = <%= @keystone_settings['insecure'] %>
region_name = <%= @keystone_settings['endpoint_region'] %>
project_domain_name = <%= @keystone_settings['admin_domain']%>
user_domain_name = <%= @keystone_settings['admin_domain'] %>
auth_type = password
service_token_roles_required = true
service_token_roles = admin
memcached_servers = <%= @memcached_servers.join(',') %>
memcache_security_strategy = ENCRYPT
memcache_secret_key = <%= node[:manila][:memcache_secret_key] %>
memcache_pool_socket_timeout = 1
[neutron]
url=<%= @neutron_protocol%>://<%= @neutron_server_host%>:<%= @neutron_server_port%>
region_name = <%= @keystone_settings['endpoint_region'] %>
auth_url = <%= @keystone_settings['internal_auth_url'] %>
auth_type = password
default_domain_id = <%= @keystone_settings["admin_domain_id"] %>
default_domain_name = <%= @keystone_settings["admin_domain"] %>
insecure=<%= @neutron_insecure %>
password=<%= @neutron_service_password %>
project_name=<%= @keystone_settings['service_tenant'] %>
username=<%= @neutron_service_user %>
[nova]
auth_url = <%= @keystone_settings['internal_auth_url'] %>
auth_type = password
default_domain_id = <%= @keystone_settings["admin_domain_id"] %>
default_domain_name = <%= @keystone_settings["admin_domain"] %>
insecure=<%= @nova_insecure %>
password=<%= @nova_admin_password %>
project_name=<%= @keystone_settings['service_tenant'] %>
username=<%= @nova_admin_username %>
[oslo_concurrency]
lock_path = /var/run/manila
[oslo_messaging_rabbit]
amqp_durable_queues = <%= @rabbit_settings[:durable_queues] %>
rabbit_ha_queues = <%= @rabbit_settings[:ha_queues] %>
ssl = <%= @rabbit_settings[:use_ssl] %>
<% if @rabbit_settings[:client_ca_certs] -%>
ssl_ca_file = <%= @rabbit_settings[:client_ca_certs] %>
<% end -%>
heartbeat_timeout_threshold = <%= @rabbit_settings[:heartbeat_timeout] %>
#############################################################################
#############################################################################
## BEGIN Manila backends (which are enabled with 'enabled_share_backends')
#############################################################################
#############################################################################
<%
@shares.each_with_index do |share, share_idx|
backend_id = "backend-#{share['backend_driver']}-#{share_idx}"
-%>
[<%= backend_id %>]
<% if share['backend_driver'] == 'generic' -%>
share_driver=manila.share.drivers.generic.GenericShareDriver
share_backend_name=<%= share['backend_name'] %>
driver_handles_share_servers=False
service_instance_user=<%= share['generic']['service_instance_user'] %>
<% unless share['generic']['service_instance_password'].empty? -%>
service_instance_password=<%= share['generic']['service_instance_password'] %>
<% end -%>
<% unless share['generic']['path_to_private_key'].empty? -%>
path_to_private_key=<%= share['generic']['path_to_private_key'] %>
<% end -%>
service_instance_name_or_id=<%= share['generic']['service_instance_name_or_id'] %>
service_net_name_or_ip=<%= share['generic']['service_net_name_or_ip'] %>
tenant_net_name_or_ip=<%= share['generic']['tenant_net_name_or_ip'] %>
<% if share['generic'].key?('share_volume_fstype') -%>
share_volume_fstype=<%= share['generic']['share_volume_fstype'] %>
<% end -%>
<% end -%> <%# generic driver %>
<% if share['backend_driver'] == 'netapp' -%>
share_driver=manila.share.drivers.netapp.common.NetAppDriver
share_backend_name=<%= share['backend_name'] %>
driver_handles_share_servers=False
netapp_storage_family=<%= share['netapp']['netapp_storage_family'] %>
netapp_server_hostname=<%= share['netapp']['netapp_server_hostname'] %>
<% if share['netapp'].key?('netapp_server_port') -%>
netapp_server_port=<%= share['netapp']['netapp_server_port'] %>
<% end -%>
netapp_login=<%= share['netapp']['netapp_login'] %>
netapp_password=<%= share['netapp']['netapp_password'] %>
netapp_vserver=<%= share['netapp']['netapp_vserver'] %>
netapp_transport_type=<%= share['netapp']['netapp_transport_type'] %>
<% if share['netapp'].key?('netapp_aggregate_name_search_pattern') -%>
netapp_aggregate_name_search_pattern=<%= share['netapp']['netapp_aggregate_name_search_pattern'] %>
<% end -%>
<% end -%> <%# netapp driver %>
<% if share['backend_driver'] == 'hitachi' -%>
share_backend_name=<%= share['backend_name'] %>
share_driver = manila.share.drivers.hitachi.hnas.HitachiHNASDriver
driver_handles_share_servers = False
hitachi_hnas_driver_helper = manila.share.drivers.hitachi.ssh.HNASSSHBackend
hitachi_hnas_cluster_admin_ip0 = <%= share['hitachi']['hitachi_hnas_cluster_admin_ip0'] %>
hitachi_hnas_evs_id = <%= share['hitachi']['hitachi_hnas_evs_id'] %>
hitachi_hnas_evs_ip = <%= share['hitachi']['hitachi_hnas_evs_ip'] %>
hitachi_hnas_file_system_name = <%= share['hitachi']['hitachi_hnas_file_system_name'] %>
hitachi_hnas_ip = <%= share['hitachi']['hitachi_hnas_ip'] %>
hitachi_hnas_password = <%= share['hitachi']['hitachi_hnas_password'] %>
hitachi_hnas_ssh_private_key = <%= share['hitachi']['hitachi_hnas_ssh_private_key'] %>
hitachi_hnas_stalled_job_timeout = <%= share['hitachi']['hitachi_hnas_stalled_job_timeout'] %>
hitachi_hnas_user = <%= share['hitachi']['hitachi_hnas_user'] %>
<% end -%> <%# hitachi driver %>
<% if share['backend_driver'] == 'cephfs' -%>
share_backend_name=<%= share['backend_name'] %>
share_driver = manila.share.drivers.cephfs.driver.CephFSDriver
driver_handles_share_servers = False
<% if share['use_crowbar'] -%>
cephfs_conf_path = /etc/ceph/ceph.conf
cephfs_auth_id = manila
cephfs_cluster_name = ceph
<% else -%>
cephfs_conf_path = <%= share['cephfs']['cephfs_conf_path'] %>
cephfs_auth_id = <%= share['cephfs']['cephfs_auth_id'] %>
cephfs_cluster_name = <%= share['cephfs']['cephfs_cluster_name'] %>
<% end -%>
cephfs_enable_snapshots = False
<% end -%> <%# cephfs driver %>
<% if share['backend_driver'] == 'manual' -%>
share_backend_name=<%= share['backend_name'] %>
share_driver=<%= share['manual']['driver'] %>
<%= share['manual']['config'] %>
<% end -%> <%# manual driver %>
<% end -%> <%# shares loop %>
#############################################################################
#############################################################################
## END Manila backends
#############################################################################
#############################################################################