This Ansible role installs and configures OpenStack manila.
To clone of view the source code for this repository, visit the role repository for os_manila.
# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
manila_package_state: "latest"
manila_pip_package_state: "latest"
# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
manila_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
# Set installation method.
manila_install_method: "source"
manila_git_repo: https://git.openstack.org/openstack/manila
manila_git_install_branch: master
manila_upper_constraints_url: "{{ requirements_git_url | default('https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=' ~ requirements_git_install_branch | default('master')) }}"
manila_git_constraints:
- "git+{{ manila_git_repo }}@{{ manila_git_install_branch }}#egg=manila"
- "--constraint {{ manila_upper_constraints_url }}"
manila_pip_install_args: "{{ pip_install_options | default('') }}"
# Name of the virtual env to deploy into
manila_venv_tag: "{{ venv_tag | default('untagged') }}"
manila_bin: "{{ _manila_bin }}"
# Enable/Disable Ceilometer
manila_ceilometer_enabled: False
manila_storage_availability_zone: nova
manila_default_availability_zone: "{{ manila_storage_availability_zone }}"
manila_management_address: 127.0.0.1
manila_uwsgi_bind_address: 0.0.0.0
manila_fatal_deprecations: False
## Database info
manila_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}"
manila_galera_address: "{{ galera_address | default('127.0.0.1') }}"
manila_galera_user: manila
manila_galera_database: manila
manila_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
manila_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
## Oslo Messaging
# RPC
manila_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
manila_oslomsg_rpc_setup_host: "{{ (manila_oslomsg_rpc_host_group in groups) | ternary(groups[manila_oslomsg_rpc_host_group][0], 'localhost') }}"
manila_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
manila_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}"
manila_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
manila_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
manila_oslomsg_rpc_userid: manila
manila_oslomsg_rpc_vhost: /manila
# Notify
manila_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
manila_oslomsg_notify_setup_host: "{{ (manila_oslomsg_notify_host_group in groups) | ternary(groups[manila_oslomsg_notify_host_group][0], 'localhost') }}"
manila_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
manila_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
manila_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
manila_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
manila_oslomsg_notify_userid: "{{ manila_oslomsg_rpc_userid }}"
manila_oslomsg_notify_password: "{{ manila_oslomsg_rpc_password }}"
manila_oslomsg_notify_vhost: "{{ manila_oslomsg_rpc_vhost }}"
## (Qdrouterd) integration
# TODO(evrardjp): Change structure when more backends will be supported
manila_oslomsg_amqp1_enabled: "{{ manila_oslomsg_rpc_transport == 'amqp' }}"
## Manila User / Group
manila_system_user_name: manila
manila_system_group_name: manila
manila_system_comment: manila system user
manila_system_shell: /bin/false
manila_system_home_folder: "/var/lib/{{ manila_system_user_name }}"
## Manually specified manila UID/GID
# Deployers can specify a UID for the manila user as well as the GID for the
# manila group if needed. This is commonly used in environments where shared
# storage is used, such as NFS or GlusterFS, and manila UID/GID values must be
# in sync between multiple servers.
#
# WARNING: Changing these values on an existing deployment can lead to
# failures, errors, and instability.
#
# manila_system_user_uid = <UID>
# manila_system_group_gid = <GID>
manila_lock_path: /var/lock/manila
## Manila Auth
manila_service_admin_tenant_name: "service"
manila_service_admin_username: "manila"
## Manila API's enabled
manila_enable_v2_api: true
## Manila API check cert validation
manila_service_internaluri_insecure: false
## Manila api service type and data
manila_service_name: manila
manila_service_project_domain_id: default
manila_service_user_domain_id: default
manila_service_user_name: manila
manila_service_project_name: service
manila_service_role_name: admin
manila_service_region: RegionOne
manila_service_description: "Openstack Shared File Systems"
manila_service_port: 8786
manila_service_proto: http
manila_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(manila_service_proto) }}"
manila_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(manila_service_proto) }}"
manila_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(manila_service_proto) }}"
manila_service_type: share
manila_service_publicuri: "{{ manila_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ manila_service_port }}"
manila_service_publicurl: "{{ manila_service_publicuri }}/v1/%(tenant_id)s"
manila_service_adminuri: "{{ manila_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"
manila_service_adminurl: "{{ manila_service_adminuri }}/v1/%(tenant_id)s"
manila_service_internaluri: "{{ manila_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"
manila_service_internalurl: "{{ manila_service_internaluri }}/v1/%(tenant_id)s"
manila_service_v2_name: manilav2
manila_service_v2_port: 8786
manila_service_v2_proto: http
manila_service_v2_type: sharev2
manila_service_v2_description: "Openstack Shared File Systems V2"
manila_service_v2_publicuri: "{{ manila_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ manila_service_port }}"
manila_service_v2_publicurl: "{{ manila_service_publicuri }}/v2/%(tenant_id)s"
manila_service_v2_adminuri: "{{ manila_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"
manila_service_v2_adminurl: "{{ manila_service_adminuri }}/v2/%(tenant_id)s"
manila_service_v2_internaluri: "{{ manila_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"
manila_service_v2_internalurl: "{{ manila_service_internaluri }}/v2/%(tenant_id)s"
manila_auth_strategy: keystone
## Keystone authentication middleware
manila_keystone_auth_plugin: "{{ manila_keystone_auth_type }}"
manila_keystone_auth_type: password
## In order to enable the manila data you MUST set ``manila_service_data_program_enabled`` to "true"
manila_service_data_program_enabled: false
## Cap the maximun number of threads / workers when a user value is unspecified.
manila_osapi_share_workers_max: 16
manila_osapi_share_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, manila_osapi_share_workers_max] | min }}"
## Manila RPC
manila_rpc_executor_thread_pool_size: 64
manila_rpc_response_timeout: 60
# osprofiler
manila_profiler_enabled: false
# manila_profiler_hmac_key is set in user_secrets.yml
manila_profiler_trace_sqlalchemy: false
manila_client_socket_timeout: 900
## Manila quota
manila_quota_shares: 50
manila_quota_snapshots: 50
manila_quota_gigabytes: 1000
manila_quota_snapshot_gigabytes: 1000
manila_quota_share_networks: 10
## General configuration
# manila_backends:
# lvm:
# share_backend_name: LVM
# share_driver: manila.share.drivers.lvm.LVMShareDriver
# driver_handles_share_servers: False
# lvm_share_volume_group: manila_shares
# lvm_share_export_ip: <server-ip>
# manila_backend_lvm_inuse: True if current host has an lvm backend
manila_backend_lvm_inuse: "{{ (manila_backends | default('') | to_json).find('lvm') != -1 }}"
# manila_backend_rbd_inuse: True if the current host has an rbd backend
manila_backend_rbd_inuse: "{{ (manila_backends | default('')|to_json).find('manila.share.drivers.cephfs') != -1 }}"
## Policy vars
# Provide a list of access controls to update the default policy.json with. These changes will be merged
# with the access controls in the default policy.json. E.g.
#manila_policy_overrides:
# "share:create": ""
# "share:delete": ""
manila_service_in_ldap: false
# Common pip packages
manila_pip_packages:
- manila
- python-manilaclient
- cryptography
- ecdsa
- httplib2
- keystonemiddleware
- osprofiler
- PyMySQL
- python-openstackclient
- python-memcached
- systemd-python
- uwsgi
manila_user_pip_packages: []
manila_optional_oslomsg_amqp1_pip_packages:
- oslo.messaging[amqp1]
manila_api_init_overrides: {}
manila_scheduler_init_overrides: {}
manila_share_init_overrides: {}
manila_data_init_overrides: {}
## Service Name-Group Mapping
manila_services:
manila_scheduler:
group: manila_scheduler
service_name: manila-scheduler
init_config_overrides: "{{ manila_scheduler_init_overrides }}"
start_order: 1
execstarts: "{{ manila_bin }}/manila-scheduler"
execreloads: "/bin/kill -HUP $MAINPID"
manila_share:
group: manila_share
service_name: manila-share
init_config_overrides: "{{ manila_share_init_overrides }}"
start_order: 2
execstarts: "{{ manila_bin }}/manila-share"
execreloads: "/bin/kill -HUP $MAINPID"
manila_data:
group: manila_share
service_name: manila-data
init_config_overrides: "{{ manila_data_init_overrides }}"
start_order: 3
execstarts: "{{ manila_bin }}/manila-data"
execreloads: "/bin/kill -HUP $MAINPID"
manila_api:
group: manila_api
service_name: manila-api
init_config_overrides: "{{ manila_api_init_overrides }}"
start_order: 4
execstarts: "{{ manila_uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/manila-api.ini"
execreloads: "{{ manila_uwsgi_bin }}/uwsgi --reload /var/run/manila_api/manila-api.pid"
wsgi_overrides: "{{ manila_api_uwsgi_ini_overrides }}"
wsgi_app: True
wsgi_name: manila-wsgi
uwsgi_port: "{{ manila_service_port }}"
uwsgi_bind_address: "{{ manila_uwsgi_bind_address }}"
#condition: "{{ manila_service_data_program_enabled | bool }}"
# Manila uWSGI settings
manila_wsgi_processes_max: 16
manila_wsgi_processes: "{{ [[ansible_processor_vcpus|default(1), 1] | max * 2, manila_wsgi_processes_max] | min }}"
manila_wsgi_threads: 1
manila_wsgi_buffer_size: 65535
# This variable is used by the repo_build process to determine
# which host group to check for members of before building the
# pip packages required by this role. The value is picked up
# by the py_pkgs lookup.
manila_role_project_group: manila_all
manila_default_share_type: nfs
manila_share_name_template: share-%s
## Tunable overrides
manila_policy_overrides: {}
manila_rootwrap_conf_overrides: {}
manila_api_paste_ini_overrides: {}
manila_manila_conf_overrides: {}
manila_api_uwsgi_ini_overrides: {}
## Set default manila path in service units. The default override sets the
## execution path for the manila service.
manila_environment_overrides:
Service:
Environment: "PATH={{ manila_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
This role needs pip >= 7.1 installed on the target host.
When the role performs a restart of the service, it will notify an Ansible
handler named Manage LB
, which is a noop within this role. In the
playbook, other roles may be loaded before and after this role which will
implement Ansible handler listeners for Manage LB
, allowing external roles
to manage the load balancer endpoints responsible for sending traffic to the
servers being restarted by marking them in maintenance or active mode,
draining sessions, etc. For an example implementation, please reference the
ansible-haproxy-endpoints role
used by the openstack-ansible project.
This role supports two tags: manila-install
and manila-config
The manila-install
tag can be used to install and upgrade.
The manila-config
tag can be used to maintain configuration of the
service.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.