diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-07-24 14:09:57 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-07-24 14:09:57 +0000 |
commit | d982240bde03ca8624f94dbc46ff772f48fa255a (patch) | |
tree | f0fd0a6e9c48e6ca19414ce399c5d194e6db11e2 | |
parent | e74b9fb33e2af161907eb92715af8091aa547fe3 (diff) | |
parent | c8c11a09f028ea763328d77ac334796caa4e4cbd (diff) |
Merge "NFS backend for Cinder"
-rw-r--r-- | compute.yaml | 4 | ||||
-rw-r--r-- | controller.yaml | 16 | ||||
-rw-r--r-- | overcloud-without-mergepy.yaml | 20 | ||||
-rw-r--r-- | puppet/compute-puppet.yaml | 6 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 29 | ||||
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 11 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 20 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 20 |
8 files changed, 124 insertions, 2 deletions
diff --git a/compute.yaml b/compute.yaml index d51aa358..933639ce 100644 --- a/compute.yaml +++ b/compute.yaml @@ -25,6 +25,10 @@ parameters: description: The password for the ceilometer service account. type: string hidden: true + CinderEnableNfsBackend: + default: false + description: Whether to enable or not the NFS backend for Cinder + type: boolean Debug: default: '' description: Set to True to enable debugging on all services. diff --git a/controller.yaml b/controller.yaml index ae60e910..7ee837f5 100644 --- a/controller.yaml +++ b/controller.yaml @@ -28,6 +28,10 @@ parameters: description: The password for the ceilometer service and db account. type: string hidden: true + CinderEnableNfsBackend: + default: false + description: Whether to enable or not the NFS backend for Cinder + type: boolean CinderEnableIscsiBackend: default: true description: Whether to enable or not the Iscsi backend for Cinder @@ -44,6 +48,18 @@ parameters: default: 5000 description: The size of the loopback file used by the cinder LVM driver. type: number + CinderNfsMountOptions: + default: '' + description: > + Mount options for NFS mounts used by Cinder NFS backend. Effective + when CinderEnableNfsBackend is true. + type: string + CinderNfsServers: + default: '' + description: > + NFS servers used by Cinder NFS backend. Effective when + CinderEnableNfsBackend is true. + type: comma_delimited_list CinderPassword: default: unset description: The password for the cinder service and db account, used by cinder-api. diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 937f812f..fd31c54d 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -42,6 +42,10 @@ parameters: default: '' description: The Ceph admin client key. Can be created with ceph-authtool --gen-print-key. type: string + CinderEnableNfsBackend: + default: false + description: Whether to enable or not the NFS backend for Cinder + type: boolean CinderEnableIscsiBackend: default: true description: Whether to enable or not the Iscsi backend for Cinder @@ -244,6 +248,18 @@ parameters: default: 5000 description: The size of the loopback file used by the cinder LVM driver. type: number + CinderNfsMountOptions: + default: '' + description: > + Mount options for NFS mounts used by Cinder NFS backend. Effective + when CinderEnableNfsBackend is true. + type: string + CinderNfsServers: + default: '' + description: > + NFS servers used by Cinder NFS backend. Effective when + CinderEnableNfsBackend is true. + type: comma_delimited_list CinderPassword: default: unset description: The password for the cinder service account, used by cinder-api. @@ -702,8 +718,11 @@ resources: CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret} CeilometerPassword: {get_param: CeilometerPassword} CinderLVMLoopDeviceSize: {get_param: CinderLVMLoopDeviceSize} + CinderNfsMountOptions: {get_param: CinderNfsMountOptions} + CinderNfsServers: {get_param: CinderNfsServers} CinderPassword: {get_param: CinderPassword} CinderISCSIHelper: {get_param: CinderISCSIHelper} + CinderEnableNfsBackend: {get_param: CinderEnableNfsBackend} CinderEnableIscsiBackend: {get_param: CinderEnableIscsiBackend} CinderEnableRbdBackend: {get_param: CinderEnableRbdBackend} CloudName: {get_param: CloudName} @@ -809,6 +828,7 @@ resources: CeilometerComputeAgent: {get_param: CeilometerComputeAgent} CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret} CeilometerPassword: {get_param: CeilometerPassword} + CinderEnableNfsBackend: {get_param: CinderEnableNfsBackend} Debug: {get_param: Debug} ExtraConfig: {get_param: ExtraConfig} Flavor: {get_param: OvercloudComputeFlavor} diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index c0d0e98f..e85a96aa 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -25,6 +25,10 @@ parameters: description: The password for the ceilometer service account. type: string hidden: true + CinderEnableNfsBackend: + default: false + description: Whether to enable or not the NFS backend for Cinder + type: boolean Debug: default: '' description: Set to True to enable debugging on all services. @@ -328,6 +332,7 @@ resources: compute: raw_data: {get_file: hieradata/compute.yaml} mapped_data: + cinder_enable_nfs_backend: {get_input: cinder_enable_nfs_backend} nova::debug: {get_input: debug} nova::rabbit_userid: {get_input: rabbit_username} nova::rabbit_password: {get_input: rabbit_password} @@ -389,6 +394,7 @@ resources: config: {get_resource: NovaComputeConfig} server: {get_resource: NovaCompute} input_values: + cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend} debug: {get_param: Debug} nova_compute_driver: {get_param: NovaComputeDriver} nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType} diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 1271ca97..f0d2492c 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -28,6 +28,10 @@ parameters: description: The password for the ceilometer service and db account. type: string hidden: true + CinderEnableNfsBackend: + default: false + description: Whether to enable or not the NFS backend for Cinder + type: boolean CinderEnableIscsiBackend: default: true description: Whether to enable or not the Iscsi backend for Cinder @@ -44,6 +48,18 @@ parameters: default: 5000 description: The size of the loopback file used by the cinder LVM driver. type: number + CinderNfsMountOptions: + default: '' + description: > + Mount options for NFS mounts used by Cinder NFS backend. Effective + when CinderEnableNfsBackend is true. + type: string + CinderNfsServers: + default: '' + description: > + NFS servers used by Cinder NFS backend. Effective when + CinderEnableNfsBackend is true. + type: comma_delimited_list CinderPassword: default: unset description: The password for the cinder service and db account, used by cinder-api. @@ -602,7 +618,17 @@ resources: admin_token: {get_param: AdminToken} neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP} debug: {get_param: Debug} + cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend} cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend} + cinder_nfs_mount_options: {get_param: CinderNfsMountOptions} + cinder_nfs_servers: + str_replace: + template: "['SERVERS']" + params: + SERVERS: + list_join: + - "','" + - {get_param: CinderNfsServers} cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize} cinder_password: {get_param: CinderPassword} cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend} @@ -890,7 +916,10 @@ resources: tripleo::ringbuilder::build_ring: True # Cinder + cinder_enable_nfs_backend: {get_input: cinder_enable_nfs_backend} cinder_enable_rbd_backend: {get_input: cinder_enable_rbd_backend} + cinder_nfs_mount_options: {get_input: cinder_nfs_mount_options} + cinder_nfs_servers: {get_input: cinder_nfs_servers} cinder_lvm_loop_device_size: {get_input: cinder_lvm_loop_device_size} cinder_iscsi_helper: {get_input: cinder_iscsi_helper} cinder_iscsi_ip_address: {get_input: cinder_iscsi_network} diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index d36cf0b0..e6fa9471 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -53,6 +53,17 @@ if $nova_enable_rbd_backend { } } +if hiera('cinder_enable_nfs_backend', false) { + if ($::selinux != "false") { + selboolean { 'virt_use_nfs': + value => on, + persistent => true, + } -> Package['nfs-utils'] + } + + package {'nfs-utils': } -> Service['nova-compute'] +} + include ::nova::compute::libvirt include ::nova::network::neutron include ::neutron diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 46f2641b..27b7328d 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -365,7 +365,25 @@ if hiera('step') >= 3 { } } - $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_netapp_backend]) + if hiera('cinder_enable_nfs_backend', false) { + $cinder_nfs_backend = 'tripleo_nfs' + + if ($::selinux != "false") { + selboolean { 'virt_use_nfs': + value => on, + persistent => true, + } -> Package['nfs-utils'] + } + + package {'nfs-utils': } -> + cinder::backend::nfs { $cinder_nfs_backend : + nfs_servers => hiera('cinder_nfs_servers'), + nfs_mount_options => hiera('cinder_nfs_mount_options'), + nfs_shares_config => '/etc/cinder/shares-nfs.conf', + } + } + + $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_netapp_backend, $cinder_nfs_backend]) class { '::cinder::backends' : enabled_backends => $cinder_enabled_backends, } diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 5bd16e4c..5f5b06dd 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -724,7 +724,25 @@ if hiera('step') >= 3 { } } - $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_netapp_backend]) + if hiera('cinder_enable_nfs_backend', false) { + $cinder_nfs_backend = 'tripleo_nfs' + + if ($::selinux != "false") { + selboolean { 'virt_use_nfs': + value => on, + persistent => true, + } -> Package['nfs-utils'] + } + + package {'nfs-utils': } -> + cinder::backend::nfs { $cinder_nfs_backend: + nfs_servers => hiera('cinder_nfs_servers'), + nfs_mount_options => hiera('cinder_nfs_mount_options'), + nfs_shares_config => '/etc/cinder/shares-nfs.conf', + } + } + + $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_netapp_backend, $cinder_nfs_backend]) class { '::cinder::backends' : enabled_backends => $cinder_enabled_backends, } |