charm-manila-generic/src/templates/mitaka/manila.conf

101 lines
4.3 KiB
Plaintext

{# if the driver is not going to handle the share servers then we only
need a very simple config section
#}
{% if not options.driver_handles_share_servers -%}
[{{ options.share_backend_name }}]
# Set usage of Generic driver which uses cinder as backend.
share_driver = manila.share.drivers.generic.GenericShareDriver
# Generic driver supports both driver modes - with and without handling
# of share servers. So, we need to define explicitly which one we are
# enabling using this driver.
driver_handles_share_servers = False
# Custom name for share backend.
share_backend_name = {{ options.share_backend_name }}
# Generic driver seems to insist on 'service_instance_user' even if it isn't using it
service_instance_user = {{ options.driver_service_instance_user }}
{% else %}
{# Otherwise we need to do a full specification for the config.
Mitaka needs nova, neutron and cinder sections to enable management of the
shares
#}
# Only needed for the generic drivers as of Mitaka
[nova]
username = {{ manila_plugin.authentication_data.username }}
password = {{ manila_plugin.authentication_data.password }}
project_domain_id = {{ manila_plugin.authentication_data.project_domain_id }}
project_name = {{ manila_plugin.authentication_data.project_name }}
user_domain_id = {{ manila_plugin.authentication_data.user_domain_id }}
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
auth_url = {{ manila_plugin.authentication_data.auth_url }}
auth_type = {{ manila_plugin.authentication_data.auth_type }}
[neutron]
username = {{ manila_plugin.authentication_data.username }}
password = {{ manila_plugin.authentication_data.password }}
project_domain_id = {{ manila_plugin.authentication_data.project_domain_id }}
project_name = {{ manila_plugin.authentication_data.project_name }}
user_domain_id = {{ manila_plugin.authentication_data.user_domain_id }}
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
auth_url = {{ manila_plugin.authentication_data.auth_url }}
auth_type = {{ manila_plugin.authentication_data.auth_type }}
[cinder]
username = {{ manila_plugin.authentication_data.username }}
password = {{ manila_plugin.authentication_data.password }}
project_domain_id = {{ manila_plugin.authentication_data.project_domain_id }}
project_name = {{ manila_plugin.authentication_data.project_name }}
user_domain_id = {{ manila_plugin.authentication_data.user_domain_id }}
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
auth_url = {{ manila_plugin.authentication_data.auth_url }}
auth_type = {{ manila_plugin.authentication_data.auth_type }}
[{{ options.share_backend_name}}]
# Set usage of Generic driver which uses cinder as backend.
share_driver = manila.share.drivers.generic.GenericShareDriver
# Generic driver supports both driver modes - with and without handling
# of share servers. So, we need to define explicitly which one we are
# enabling using this driver.
driver_handles_share_servers = True
# The flavor that Manila will use to launch the instance.
service_instance_flavor_id = {{ options.driver_service_instance_flavor_id }}
# Generic driver uses a glance image for building service VMs in nova.
# The following options specify the image to use.
# We use the latest build of [1].
# [1] https://github.com/openstack/manila-image-elements
service_instance_user = {{ options.driver_service_instance_user }}
service_image_name = {{ options.driver_service_image_name }}
connect_share_server_to_tenant_network = {{ options.driver_connect_share_server_to_tenant_network }}
# These will be used for keypair creation and inserted into
# service VMs.
# TODO: this presents a problem with HA and failover - as the keys
# will no longer be the same -- need to be able to set these via
# a config option.
{# Expression is True if the generic driver should use a password #}
{% if options.computed_use_password %}
service_instance_password = {{ options.driver_service_instance_password }}
{% else -%}
# No generic password section
{% endif %}
{# Expression is True if the generic driver should use ssh #}
{% if options.computed_use_ssh %}
path_to_private_key = /etc/manila/ssh_image_key
path_to_public_key = /etc/manila/ssh_image_key.pub
manila_service_keypair_name = {{ options.driver_keypair_name }}
{% else %}
# No ssh section
{% endif %}
# Custom name for share backend.
share_backend_name = {{ options.share_backend_name }}
{% endif %}