summaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/cinder/volume
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/cinder/volume')
-rw-r--r--manifests/profile/base/cinder/volume/dellsc.pp51
-rw-r--r--manifests/profile/base/cinder/volume/eqlx.pp51
-rw-r--r--manifests/profile/base/cinder/volume/iscsi.pp62
-rw-r--r--manifests/profile/base/cinder/volume/netapp.pp66
-rw-r--r--manifests/profile/base/cinder/volume/nfs.pp62
-rw-r--r--manifests/profile/base/cinder/volume/rbd.pp66
6 files changed, 358 insertions, 0 deletions
diff --git a/manifests/profile/base/cinder/volume/dellsc.pp b/manifests/profile/base/cinder/volume/dellsc.pp
new file mode 100644
index 0000000..6f7922d
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/dellsc.pp
@@ -0,0 +1,51 @@
+# 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::volume::dellsc
+#
+# Cinder Volume dellsc profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_dellsc'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+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 {
+ cinder::backend::dellsc_iscsi { $backend_name :
+ san_ip => hiera('cinder::backend::dellsc_iscsi::san_ip', undef),
+ san_login => hiera('cinder::backend::dellsc_iscsi::san_login', undef),
+ san_password => hiera('cinder::backend::dellsc_iscsi::san_password', undef),
+ dell_sc_ssn => hiera('cinder::backend::dellsc_iscsi::dell_sc_ssn', undef),
+ iscsi_ip_address => hiera('cinder::backend::dellsc_iscsi::iscsi_ip_address', undef),
+ iscsi_port => hiera('cinder::backend::dellsc_iscsi::iscsi_port', undef),
+ dell_sc_api_port => hiera('cinder::backend::dellsc_iscsi::dell_sc_api_port', undef),
+ dell_sc_server_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_server_folder', undef),
+ dell_sc_volume_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_volume_folder', undef),
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/eqlx.pp b/manifests/profile/base/cinder/volume/eqlx.pp
new file mode 100644
index 0000000..a18270d
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/eqlx.pp
@@ -0,0 +1,51 @@
+# 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::volume::eqlx
+#
+# Cinder Volume eqlx profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_eqlx'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+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 {
+ cinder::backend::eqlx { $backend_name :
+ san_ip => hiera('cinder::backend::eqlx::san_ip', undef),
+ san_login => hiera('cinder::backend::eqlx::san_login', undef),
+ san_password => hiera('cinder::backend::eqlx::san_password', undef),
+ san_thin_provision => hiera('cinder::backend::eqlx::san_thin_provision', undef),
+ eqlx_group_name => hiera('cinder::backend::eqlx::eqlx_group_name', undef),
+ eqlx_pool => hiera('cinder::backend::eqlx::eqlx_pool', undef),
+ eqlx_use_chap => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
+ eqlx_chap_login => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
+ eqlx_chap_password => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/iscsi.pp b/manifests/profile/base/cinder/volume/iscsi.pp
new file mode 100644
index 0000000..d857caa
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/iscsi.pp
@@ -0,0 +1,62 @@
+# 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::volume::iscsi
+#
+# Cinder Volume iscsi profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_iscsi_address*]
+# The address where to bind the iscsi targets daemon
+#
+# [*cinder_iscsi_helper*]
+# (Optional) The iscsi helper to use
+# Defaults to 'tgtadm'
+#
+# [*cinder_lvm_loop_device_size*]
+# (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.
+# Defaults to hiera('step')
+#
+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'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ class { '::cinder::setup_test_volume':
+ size => join([$cinder_lvm_loop_device_size, 'M']),
+ }
+
+ cinder::backend::iscsi { $backend_name :
+ iscsi_ip_address => $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
new file mode 100644
index 0000000..bae541f
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/netapp.pp
@@ -0,0 +1,66 @@
+# 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::volume::netapp
+#
+# Cinder Volume netapp profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_netapp'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+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 {
+ if hiera('cinder::backend::netapp::nfs_shares', undef) {
+ $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
+ }
+
+ cinder::backend::netapp { $backend_name :
+ netapp_login => hiera('cinder::backend::netapp::netapp_login', undef),
+ netapp_password => hiera('cinder::backend::netapp::netapp_password', undef),
+ netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
+ netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef),
+ netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
+ netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef),
+ netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
+ netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef),
+ netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef),
+ netapp_volume_list => hiera('cinder::backend::netapp::netapp_volume_list', undef),
+ netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef),
+ netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
+ nfs_shares => $cinder_netapp_nfs_shares,
+ nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef),
+ netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
+ netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
+ netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef),
+ netapp_storage_pools => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
+ netapp_eseries_host_type => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
+ netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/nfs.pp b/manifests/profile/base/cinder/volume/nfs.pp
new file mode 100644
index 0000000..a26c50e
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/nfs.pp
@@ -0,0 +1,62 @@
+# 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::volume::nfs
+#
+# Cinder Volume nfs profile for tripleo
+#
+# === 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
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_nfs'
+#
+# [*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'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ if str2bool($::selinux) {
+ selboolean { 'virt_use_nfs':
+ value => on,
+ persistent => true,
+ } -> Package['nfs-utils']
+ }
+
+ package {'nfs-utils': } ->
+ cinder::backend::nfs { $backend_name :
+ nfs_servers => $cinder_nfs_servers,
+ nfs_mount_options => $cinder_nfs_mount_options,
+ nfs_shares_config => '/etc/cinder/shares-nfs.conf',
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/rbd.pp b/manifests/profile/base/cinder/volume/rbd.pp
new file mode 100644
index 0000000..6c8341a
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/rbd.pp
@@ -0,0 +1,66 @@
+# 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::volume::rbd
+#
+# Cinder Volume rbd profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_rbd_backend_host*]
+# (Optional) String to use as backend_host in the backend stanza
+# Defaults to 'cinder::host'
+#
+# [*cinder_rbd_pool_name*]
+# (Optional) The name of the RBD pool to use
+# Defaults to 'volumes'
+#
+# [*cinder_rbd_secret_uuid*]
+# (Optional) UUID of the of the libvirt secret storing the Cephx key
+# Defaults to 'ceph::profile::params::fsid'
+#
+# [*cinder_rbd_user_name*]
+# (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 (
+ $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 {
+ cinder::backend::rbd { $backend_name :
+ backend_host => $cinder_rbd_backend_host,
+ rbd_pool => $cinder_rbd_pool_name,
+ rbd_user => $cinder_rbd_user_name,
+ rbd_secret_uuid => $cinder_rbd_secret_uuid,
+ }
+ }
+
+}