diff options
Diffstat (limited to 'manifests/profile/base/cinder')
-rw-r--r-- | manifests/profile/base/cinder/api.pp | 19 | ||||
-rw-r--r-- | manifests/profile/base/cinder/backup.pp | 36 | ||||
-rw-r--r-- | manifests/profile/base/cinder/backup/ceph.pp | 36 | ||||
-rw-r--r-- | manifests/profile/base/cinder/backup/swift.pp | 36 | ||||
-rw-r--r-- | manifests/profile/base/cinder/scheduler.pp | 1 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume.pp | 9 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume/dellsc.pp | 1 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume/eqlx.pp | 1 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume/iscsi.pp | 22 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume/netapp.pp | 1 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume/nfs.pp | 11 | ||||
-rw-r--r-- | manifests/profile/base/cinder/volume/rbd.pp | 11 |
12 files changed, 148 insertions, 36 deletions
diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp index a2da25f..370b402 100644 --- a/manifests/profile/base/cinder/api.pp +++ b/manifests/profile/base/cinder/api.pp @@ -18,9 +18,9 @@ # # === Parameters # -# [*sync_db*] -# (Optional) Whether to run db sync -# Defaults to true +# [*bootstrap_node*] +# (Optional) The hostname of the node responsible for bootstrapping tasks +# Defaults to hiera('bootstrap_nodeid') # # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates @@ -28,14 +28,17 @@ # Defaults to hiera('step') # class tripleo::profile::base::cinder::api ( - $sync_db = true, - $step = hiera('step'), + $bootstrap_node = hiera('bootstrap_nodeid', undef), + $step = hiera('step'), ) { - - class { '::tripleo::profile::base::cinder': - pacemaker_master => $sync_db, + if $::hostname == downcase($bootstrap_node) { + $sync_db = true + } else { + $sync_db = false } + include ::tripleo::profile::base::cinder + if $step >= 3 and $sync_db { include ::cinder::db::mysql } diff --git a/manifests/profile/base/cinder/backup.pp b/manifests/profile/base/cinder/backup.pp new file mode 100644 index 0000000..df015f7 --- /dev/null +++ b/manifests/profile/base/cinder/backup.pp @@ -0,0 +1,36 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::cinder::backup +# +# Cinder Backup profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::cinder::backup ( + $step = hiera('step'), +) { + + include ::tripleo::profile::base::cinder + + if $step >= 4 { + include ::cinder::backup + } + +} diff --git a/manifests/profile/base/cinder/backup/ceph.pp b/manifests/profile/base/cinder/backup/ceph.pp new file mode 100644 index 0000000..67a666e --- /dev/null +++ b/manifests/profile/base/cinder/backup/ceph.pp @@ -0,0 +1,36 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::cinder::backup::ceph +# +# Cinder Backup Ceph profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::cinder::backup::ceph ( + $step = hiera('step'), +) { + + include ::tripleo::profile::base::cinder::backup + + if $step >= 4 { + include ::cinder::backup::ceph + } + +} diff --git a/manifests/profile/base/cinder/backup/swift.pp b/manifests/profile/base/cinder/backup/swift.pp new file mode 100644 index 0000000..12561bf --- /dev/null +++ b/manifests/profile/base/cinder/backup/swift.pp @@ -0,0 +1,36 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::cinder::backup::swift +# +# Cinder Backup Ceph profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::cinder::backup::swift ( + $step = hiera('step'), +) { + + include ::tripleo::profile::base::cinder::backup + + if $step >= 4 { + include ::cinder::backup::swift + } + +} diff --git a/manifests/profile/base/cinder/scheduler.pp b/manifests/profile/base/cinder/scheduler.pp index 68f2813..4586929 100644 --- a/manifests/profile/base/cinder/scheduler.pp +++ b/manifests/profile/base/cinder/scheduler.pp @@ -26,7 +26,6 @@ class tripleo::profile::base::cinder::scheduler ( $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder if $step >= 4 { diff --git a/manifests/profile/base/cinder/volume.pp b/manifests/profile/base/cinder/volume.pp index 96cd06a..7d562ec 100644 --- a/manifests/profile/base/cinder/volume.pp +++ b/manifests/profile/base/cinder/volume.pp @@ -61,7 +61,6 @@ class tripleo::profile::base::cinder::volume ( $cinder_user_enabled_backends = hiera('cinder_user_enabled_backends', undef), $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder if $step >= 4 { @@ -109,7 +108,13 @@ class tripleo::profile::base::cinder::volume ( $cinder_rbd_backend_name = undef } - $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend_name, $cinder_rbd_backend_name, $cinder_eqlx_backend_name, $cinder_dellsc_backend_name, $cinder_netapp_backend_name, $cinder_nfs_backend_name, $cinder_user_enabled_backends]) + $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend_name, + $cinder_rbd_backend_name, + $cinder_eqlx_backend_name, + $cinder_dellsc_backend_name, + $cinder_netapp_backend_name, + $cinder_nfs_backend_name, + $cinder_user_enabled_backends]) class { '::cinder::backends' : enabled_backends => $cinder_enabled_backends, } diff --git a/manifests/profile/base/cinder/volume/dellsc.pp b/manifests/profile/base/cinder/volume/dellsc.pp index 6f7922d..534bcb7 100644 --- a/manifests/profile/base/cinder/volume/dellsc.pp +++ b/manifests/profile/base/cinder/volume/dellsc.pp @@ -31,7 +31,6 @@ class tripleo::profile::base::cinder::volume::dellsc ( $backend_name = hiera('cinder::backend::dellsc_iscsi::volume_backend_name', 'tripleo_dellsc'), $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder::volume if $step >= 4 { diff --git a/manifests/profile/base/cinder/volume/eqlx.pp b/manifests/profile/base/cinder/volume/eqlx.pp index a18270d..2399459 100644 --- a/manifests/profile/base/cinder/volume/eqlx.pp +++ b/manifests/profile/base/cinder/volume/eqlx.pp @@ -31,7 +31,6 @@ class tripleo::profile::base::cinder::volume::eqlx ( $backend_name = hiera('cinder::backend::eqlx::volume_backend_name', 'tripleo_eqlx'), $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder::volume if $step >= 4 { diff --git a/manifests/profile/base/cinder/volume/iscsi.pp b/manifests/profile/base/cinder/volume/iscsi.pp index d857caa..8baaf1c 100644 --- a/manifests/profile/base/cinder/volume/iscsi.pp +++ b/manifests/profile/base/cinder/volume/iscsi.pp @@ -21,6 +21,10 @@ # [*cinder_iscsi_address*] # The address where to bind the iscsi targets daemon # +# [*backend_name*] +# (Optional) Name given to the Cinder backend stanza +# Defaults to 'tripleo_iscsi' +# # [*cinder_iscsi_helper*] # (Optional) The iscsi helper to use # Defaults to 'tgtadm' @@ -29,10 +33,6 @@ # (Optional) The size (in MB) of the LVM loopback volume # Defaults to '10280' # -# [*backend_name*] -# (Optional) Name given to the Cinder backend stanza -# Defaults to 'tripleo_iscsi' -# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. @@ -40,12 +40,11 @@ # class tripleo::profile::base::cinder::volume::iscsi ( $cinder_iscsi_address, - $cinder_iscsi_helper = 'tgtadm', - $cinder_lvm_loop_device_size = '10280', - $backend_name = hiera('cinder::backend::iscsi::volume_backend_name', 'tripleo_iscsi'), - $step = hiera('step'), + $backend_name = hiera('cinder::backend::iscsi::volume_backend_name', 'tripleo_iscsi'), + $cinder_iscsi_helper = 'tgtadm', + $cinder_lvm_loop_device_size = '10280', + $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder::volume if $step >= 4 { @@ -53,8 +52,11 @@ class tripleo::profile::base::cinder::volume::iscsi ( size => join([$cinder_lvm_loop_device_size, 'M']), } + # NOTE(gfidente): never emit in hieradata: + # key: [ipv6] + # as it will cause hiera parsing errors cinder::backend::iscsi { $backend_name : - iscsi_ip_address => $cinder_iscsi_address, + iscsi_ip_address => normalize_ip_for_uri($cinder_iscsi_address), iscsi_helper => $cinder_iscsi_helper, } } diff --git a/manifests/profile/base/cinder/volume/netapp.pp b/manifests/profile/base/cinder/volume/netapp.pp index bae541f..fc652c9 100644 --- a/manifests/profile/base/cinder/volume/netapp.pp +++ b/manifests/profile/base/cinder/volume/netapp.pp @@ -31,7 +31,6 @@ class tripleo::profile::base::cinder::volume::netapp ( $backend_name = hiera('cinder::backend::netapp::volume_backend_name', 'tripleo_netapp'), $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder::volume if $step >= 4 { diff --git a/manifests/profile/base/cinder/volume/nfs.pp b/manifests/profile/base/cinder/volume/nfs.pp index a26c50e..7b1f1b9 100644 --- a/manifests/profile/base/cinder/volume/nfs.pp +++ b/manifests/profile/base/cinder/volume/nfs.pp @@ -18,10 +18,6 @@ # # === Parameters # -# [*cinder_nfs_mount_options*] -# (Optional) List of mount options for the NFS share -# Defaults to '' -# # [*cinder_nfs_servers*] # List of NFS shares to mount # @@ -29,18 +25,21 @@ # (Optional) Name given to the Cinder backend stanza # Defaults to 'tripleo_nfs' # +# [*cinder_nfs_mount_options*] +# (Optional) List of mount options for the NFS share +# Defaults to '' +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. # Defaults to hiera('step') # class tripleo::profile::base::cinder::volume::nfs ( - $cinder_nfs_mount_options = '', $cinder_nfs_servers, $backend_name = hiera('cinder::backend::nfs::volume_backend_name', 'tripleo_nfs'), + $cinder_nfs_mount_options = '', $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder::volume if $step >= 4 { diff --git a/manifests/profile/base/cinder/volume/rbd.pp b/manifests/profile/base/cinder/volume/rbd.pp index 6c8341a..1246de8 100644 --- a/manifests/profile/base/cinder/volume/rbd.pp +++ b/manifests/profile/base/cinder/volume/rbd.pp @@ -18,6 +18,10 @@ # # === Parameters # +# [*backend_name*] +# (Optional) Name given to the Cinder backend stanza +# Defaults to 'tripleo_ceph' +# # [*cinder_rbd_backend_host*] # (Optional) String to use as backend_host in the backend stanza # Defaults to 'cinder::host' @@ -34,24 +38,19 @@ # (Optional) The user name for the RBD client # Defaults to 'openstack' # -# [*backend_name*] -# (Optional) Name given to the Cinder backend stanza -# Defaults to 'tripleo_ceph' -# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. # Defaults to hiera('step') # class tripleo::profile::base::cinder::volume::rbd ( + $backend_name = hiera('cinder::backend::rbd::volume_backend_name', 'tripleo_ceph'), $cinder_rbd_backend_host = hiera('cinder::host', 'hostgroup'), $cinder_rbd_pool_name = 'volumes', $cinder_rbd_secret_uuid = hiera('ceph::profile::params::fsid', undef), $cinder_rbd_user_name = 'openstack', - $backend_name = hiera('cinder::backend::rbd::volume_backend_name', 'tripleo_ceph'), $step = hiera('step'), ) { - include ::tripleo::profile::base::cinder::volume if $step >= 4 { |