1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
# ==define manila::backend::cephfs
#
# === Parameters
#
# [*driver_handles_share_servers*]
# (optional) Denotes whether the driver should handle the responsibility of
# managing share servers. This must be set to false if the driver is to
# operate without managing share servers.
# Defaults to: False
#
# [*share_backend_name*]
# (optional) Name of the backend in manila.conf that
# these settings will reside in
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this share backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $facts['os_service_default'].
#
# [*cephfs_conf_path*]
# (optional) Path to cephfs config.
# Defaults to: $state_path/ceph.conf
#
# [*cephfs_auth_id*]
# (optional) cephx user id for Manila
# Defaults to: manila
#
# [*cephfs_cluster_name*]
# (optional) Name of the cephfs cluster the driver will connect to.
# Defaults to: ceph
#
# [*cephfs_ganesha_server_ip*]
# (optional) IP of a server where Ganesha service runs on.
# Defaults to: $facts['os_service_default']
#
# [*cephfs_ganesha_export_ips*]
# (optional) List of IPs on which Ganesha provides NFS share service.
# Defaults to: $facts['os_service_default']
#
# [*cephfs_ganesha_server_is_remote*]
# (required) Whether the Ganesha service is remote or colocated on the
# same node where the Share service runs.
# Defaults to $facts['os_service_default']
#
# [*cephfs_ganesha_server_username*]
# (optional) The username to use when logging on the remote node
# hosting the Ganesha service
# Defaults to: $facts['os_service_default']
#
# [*cephfs_ganesha_server_password*]
# (optional) The password to use when logging on the remote node
# hosting the Ganesha service
# Defaults to: $facts['os_service_default']
#
# [*cephfs_ganesha_path_to_private_key*]
# (optional) The secret key to use when logging on the remote node
# hosting the Ganesha service (prevails on server_password)
# Defaults to: $facts['os_service_default']
#
# [*cephfs_nfs_cluster_id*]
# (optional) ID of the NFS cluster to use (when using ceph orchestrator
# deployed clustered NFS service)
# Defaults to: $facts['os_service_default']
#
# [*cephfs_volume_mode*]
# (optional) octal rwx permissions for CephFS backing volumes,
# snapshots, and groups of volumes and snapshots.
# Defaults to $facts['os_service_default']
#
# [*cephfs_protocol_helper_type*]
# (optional) Sets helper type for CephFS driver, can be CEPHFS or NFS
# Defaults to: CEPHFS
#
# [*cephfs_filesystem_name*]
# (optional) The name of the filesystem to use, if there are multiple
# filesystems in the cluster.
# Defaults to: $facts['os_service_default']
#
# [*reserved_share_percentage*]
# (optional) The percentage of backend capacity reserved.
# Defaults to: $facts['os_service_default']
#
# [*reserved_share_from_snapshot_percentage*]
# (optional) The percentage of backend capacity reserved. Used for shares
# created from the snapshot.
# Defaults to: $facts['os_service_default']
#
# [*reserved_share_extend_percentage*]
# (optional) The percentage of backend capacity reserved for share extend
# operation.
# Defaults to: $facts['os_service_default']
#
define manila::backend::cephfs (
$driver_handles_share_servers = false,
$share_backend_name = $name,
$backend_availability_zone = $facts['os_service_default'],
$cephfs_conf_path = '$state_path/ceph.conf',
$cephfs_auth_id = 'manila',
$cephfs_cluster_name = 'ceph',
$cephfs_ganesha_server_ip = $facts['os_service_default'],
$cephfs_ganesha_export_ips = $facts['os_service_default'],
$cephfs_ganesha_server_is_remote = $facts['os_service_default'],
$cephfs_ganesha_server_username = $facts['os_service_default'],
$cephfs_ganesha_server_password = $facts['os_service_default'],
$cephfs_ganesha_path_to_private_key = $facts['os_service_default'],
$cephfs_nfs_cluster_id = $facts['os_service_default'],
$cephfs_volume_mode = $facts['os_service_default'],
$cephfs_protocol_helper_type = 'CEPHFS',
$cephfs_filesystem_name = $facts['os_service_default'],
$reserved_share_percentage = $facts['os_service_default'],
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
$reserved_share_extend_percentage = $facts['os_service_default'],
) {
include manila::deps
$share_driver = 'manila.share.drivers.cephfs.driver.CephFSDriver'
manila_config {
"${name}/driver_handles_share_servers": value => $driver_handles_share_servers;
"${name}/share_backend_name": value => $share_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/share_driver": value => $share_driver;
"${name}/cephfs_conf_path": value => $cephfs_conf_path;
"${name}/cephfs_auth_id": value => $cephfs_auth_id;
"${name}/cephfs_cluster_name": value => $cephfs_cluster_name;
"${name}/cephfs_ganesha_server_ip": value => $cephfs_ganesha_server_ip;
"${name}/cephfs_ganesha_export_ips": value => join(any2array($cephfs_ganesha_export_ips), ',');
"${name}/cephfs_ganesha_server_is_remote": value => $cephfs_ganesha_server_is_remote;
"${name}/cephfs_ganesha_server_username": value => $cephfs_ganesha_server_username;
"${name}/cephfs_ganesha_server_password": value => $cephfs_ganesha_server_password, secret => true;
"${name}/cephfs_ganesha_path_to_private_key": value => $cephfs_ganesha_path_to_private_key;
"${name}/cephfs_nfs_cluster_id": value => $cephfs_nfs_cluster_id;
"${name}/cephfs_volume_mode": value => $cephfs_volume_mode;
"${name}/cephfs_protocol_helper_type": value => $cephfs_protocol_helper_type;
"${name}/cephfs_filesystem_name": value => $cephfs_filesystem_name;
"${name}/reserved_share_percentage": value => $reserved_share_percentage;
"${name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
"${name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
}
}
|