First checkin, this is beta 10
This commit is contained in:
commit
8d3097a6e2
|
@ -0,0 +1,202 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
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.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
fuel-plugin-example
|
||||
============
|
||||
|
||||
Plugin description
|
Binary file not shown.
|
@ -0,0 +1,22 @@
|
|||
# This file contains wizard components descriptions that are pretty similar to
|
||||
# the `environment_config.yaml`.
|
||||
# Please, take a look at following link for the details:
|
||||
# - https://blueprints.launchpad.net/fuel/+spec/component-registry
|
||||
# - https://specs.openstack.org/openstack/fuel-specs/specs/8.0/component-registry.html
|
||||
|
||||
- name: 'storage:block:backend:cinder'
|
||||
compatible:
|
||||
- name: storage:block:lvm
|
||||
- name: hypervisor:qemu
|
||||
- name: hypervisor:vmware
|
||||
- name: network:neutron:core:ml2
|
||||
- name: network:neutron:ml2:vlan
|
||||
- name: network:neutron:ml2:tun
|
||||
requires: []
|
||||
incompatible:
|
||||
- name: storage:block:ceph
|
||||
- name: storage:object:ceph
|
||||
- name: storage:ephemeral:ceph
|
||||
- name: storage:image:ceph
|
||||
label: "Nimble Storage"
|
||||
description: "This enables Nimble block storage backend for Cinder volumes"
|
|
@ -0,0 +1,37 @@
|
|||
notice('MODULAR: nimble-default-volume-type')
|
||||
|
||||
$config_file = '/etc/cinder/cinder.conf'
|
||||
$cinder_nimble = hiera_hash('cinder_nimble', {})
|
||||
|
||||
if ($cinder_nimble['nimble_grouping']) == true {
|
||||
$nimble_default_type_set = $cinder_nimble['nimble_group_default_backend']
|
||||
$nimble_default_type = $cinder_nimble['nimble_group_backend_type']
|
||||
}
|
||||
else {
|
||||
$nimble_default_type_set = $cinder_nimble['nimble1_default_backend'] or
|
||||
$cinder_nimble['nimble2_default_backend'] or
|
||||
$cinder_nimble['nimble3_default_backend'] or
|
||||
$cinder_nimble['nimble4_default_backend'] or
|
||||
$cinder_nimble['nimble5_default_backend']
|
||||
if ($cinder_nimble['nimble1_default_backend']) == true {
|
||||
$nimble_default_type = $cinder_nimble['nimble1_backend_type']
|
||||
}
|
||||
elsif ($cinder_nimble['nimble2_default_backend']) == true {
|
||||
$nimble_default_type = $cinder_nimble['nimble2_backend_type']
|
||||
}
|
||||
elsif ($cinder_nimble['nimble3_default_backend']) == true {
|
||||
$nimble_default_type = $cinder_nimble['nimble3_backend_type']
|
||||
}
|
||||
elsif ($cinder_nimble['nimble4_default_backend']) == true {
|
||||
$nimble_default_type = $cinder_nimble['nimble4_backend_type']
|
||||
}
|
||||
elsif ($cinder_nimble['nimble5_default_backend']) == true {
|
||||
$nimble_default_type = $cinder_nimble['nimble5_backend_type']
|
||||
}
|
||||
}
|
||||
|
||||
class { 'plugin_cinder_nimble::backend::set_default_type' :
|
||||
config_file => $config_file,
|
||||
nimble_default_type_set => $nimble_default_type_set,
|
||||
nimble_backend_type => $nimble_default_type,
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
notice('MODULAR: nimble-disable-default-volume-type')
|
||||
|
||||
$config_file = '/etc/cinder/cinder.conf'
|
||||
|
||||
class { 'plugin_cinder_nimble::backend::disable_default_type' :
|
||||
config_file => $config_file,
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
notice('MODULAR: nimble-extraspecs-encryption')
|
||||
include plugin_cinder_nimble::backend::set_extraspecs_encryption
|
|
@ -0,0 +1,2 @@
|
|||
notice('MODULAR: nimble-extraspecs-multi-init')
|
||||
include plugin_cinder_nimble::backend::set_extraspecs_multi_init
|
|
@ -0,0 +1,2 @@
|
|||
notice('MODULAR: nimble-extraspecs-perfpol')
|
||||
include plugin_cinder_nimble::backend::set_extraspecs_perfpol
|
|
@ -0,0 +1,91 @@
|
|||
# Since Fuel 8.0 has its own task to set Cinder volume-types. We add our modifications before this task is executed.
|
||||
|
||||
notice('MODULAR: nimble-hiera-override')
|
||||
|
||||
$cinder_nimble = hiera_hash('cinder_nimble', {})
|
||||
$nimble_group_backend_type = $cinder_nimble['nimble_group_backend_type']
|
||||
$nimble_group_backend_name = $cinder_nimble['nimble_group_backend_name']
|
||||
$no_backends = $cinder_nimble['no_backends']
|
||||
$nimble1_backend_type = $cinder_nimble['nimble1_backend_type']
|
||||
$nimble1_backend_name = $cinder_nimble['nimble1_backend_name']
|
||||
$nimble2_backend_type = $cinder_nimble['nimble2_backend_type']
|
||||
$nimble2_backend_name = $cinder_nimble['nimble2_backend_name']
|
||||
|
||||
$hiera_dir = '/etc/hiera/plugins'
|
||||
$plugin_yaml = 'cinder_nimble.yaml'
|
||||
$plugin_name = 'cinder_nimble'
|
||||
|
||||
# extraspecs
|
||||
$nimble_group_encryption = $cinder_nimble['nimble_group_encryption']
|
||||
$nimble_group_perfpol = $cinder_nimble['nimble_group_perfpol']
|
||||
$nimble_group_multi_init = $cinder_nimble['nimble_group_multi_init']
|
||||
$nimble1_encryption = $cinder_nimble['nimble1_encryption']
|
||||
$nimble1_perfpol = $cinder_nimble['nimble1_perfpol']
|
||||
$nimble1_multi_init = $cinder_nimble['nimble1_multi_init']
|
||||
$nimble2_encryption = $cinder_nimble['nimble2_encryption']
|
||||
$nimble2_perfpol = $cinder_nimble['nimble2_perfpol']
|
||||
$nimble2_multi_init = $cinder_nimble['nimble2_multi_init']
|
||||
|
||||
file { $hiera_dir:
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
# Create content based on grouping flag.
|
||||
# This is separated to keep the inline content and conditions tidy.
|
||||
if ($cinder_nimble['nimble_grouping']) == true {
|
||||
$content = inline_template('
|
||||
storage:
|
||||
volume_backend_names:
|
||||
<%= nimble_group_backend_type %>: <%= nimble_group_backend_name %>
|
||||
nimble_encryption:
|
||||
<%= nimble_group_backend_type %>: <%= nimble_group_encryption -%>
|
||||
<% if nimble_group_perfpol != "" %>
|
||||
nimble_perfpol:
|
||||
<%= nimble_group_backend_type %>: <%= nimble_group_perfpol -%>
|
||||
<% end %>
|
||||
nimble_multi_init:
|
||||
<%= nimble_group_backend_type %>: <%= nimble_group_multi_init %>
|
||||
')
|
||||
}
|
||||
else {
|
||||
$content = inline_template('
|
||||
storage:
|
||||
volume_backend_names:
|
||||
<%= nimble1_backend_type %>: <%= nimble1_backend_name -%>
|
||||
<% if no_backends != "1" %>
|
||||
<%= nimble2_backend_type %>: <%= nimble2_backend_name -%>
|
||||
<% end %>
|
||||
nimble_encryption:
|
||||
<%= nimble1_backend_type %>: <%= nimble1_encryption -%>
|
||||
<% if no_backends != "1" %>
|
||||
<%= nimble2_backend_type %>: <%= nimble2_encryption -%>
|
||||
<% end -%>
|
||||
<% if nimble1_perfpol != "" or nimble2_perfpol != "" %>
|
||||
nimble_perfpol:
|
||||
<% if nimble1_perfpol != "" -%>
|
||||
<%= nimble1_backend_type %>: <%= nimble1_perfpol -%>
|
||||
<% end %>
|
||||
<% if no_backends != "1" and nimble2_perfpol != "" -%>
|
||||
<%= nimble2_backend_type %>: <%= nimble2_perfpol -%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
nimble_multi_init:
|
||||
<%= nimble1_backend_type %>: <%= nimble1_multi_init -%>
|
||||
<% if no_backends != "1" %>
|
||||
<%= nimble2_backend_type %>: <%= nimble2_multi_init -%>
|
||||
<% end %>
|
||||
')
|
||||
}
|
||||
|
||||
file { "${hiera_dir}/${plugin_yaml}":
|
||||
ensure => file,
|
||||
content => $content,
|
||||
}
|
||||
|
||||
# Workaround for bug 1598163
|
||||
exec { 'patch_puppet_bug_1598163':
|
||||
path => '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
|
||||
cwd => '/etc/puppet/modules/osnailyfacter/manifests/globals',
|
||||
command => "sed -i \"s/hiera('storage/hiera_hash('storage/\" globals.pp",
|
||||
onlyif => "grep \"hiera('storage\" globals.pp"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
notice('MODULAR: fuel-plugin-cinder-nimble')
|
||||
|
||||
class { 'plugin_cinder_nimble': }
|
|
@ -0,0 +1,39 @@
|
|||
class plugin_cinder_nimble::backend::disable_default_type (
|
||||
$config_file,
|
||||
) {
|
||||
|
||||
include plugin_cinder_nimble::params
|
||||
include cinder::params
|
||||
|
||||
$cinder_nimble = hiera_hash('cinder_nimble', {})
|
||||
|
||||
if ($cinder_nimble['nimble_grouping']) == true {
|
||||
$nimble_default_type_set = $cinder_nimble['nimble_group_default_backend']
|
||||
}
|
||||
else {
|
||||
$nimble_default_type_set = $cinder_nimble['nimble1_default_backend'] or
|
||||
$cinder_nimble['nimble2_default_backend'] or
|
||||
$cinder_nimble['nimble3_default_backend'] or
|
||||
$cinder_nimble['nimble4_default_backend'] or
|
||||
$cinder_nimble['nimble5_default_backend']
|
||||
}
|
||||
|
||||
if ($nimble_default_type_set) == true {
|
||||
ini_setting {"disable_default_type_${nimble_backend_type}":
|
||||
ensure => absent,
|
||||
section => 'DEFAULT',
|
||||
path => $config_file,
|
||||
setting => 'default_volume_type',
|
||||
}
|
||||
|
||||
Cinder_config<||> ~> Service['cinder-api']
|
||||
|
||||
service { 'cinder-api':
|
||||
ensure => stopped,
|
||||
name => $::cinder::params::api_service,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
define plugin_cinder_nimble::backend::enable_backend (
|
||||
$config_file = $plugin_cinder_nimble::params::config_file
|
||||
) {
|
||||
|
||||
include plugin_cinder_nimble::params
|
||||
|
||||
ini_subsetting {"enable_${name}_backend":
|
||||
ensure => present,
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
path => $config_file,
|
||||
setting => 'enabled_backends',
|
||||
subsetting => $name,
|
||||
subsetting_separator => ',',
|
||||
use_exact_match => true,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
class plugin_cinder_nimble::backend::nimble (
|
||||
$cinder_nimble = $plugin_cinder_nimble::params::cinder_nimble
|
||||
) {
|
||||
|
||||
include plugin_cinder_nimble::params
|
||||
include cinder::params
|
||||
|
||||
# Get the group backend name as configured by the user
|
||||
$nimble_group_backend_name = $cinder_nimble['nimble_group_backend_name']
|
||||
|
||||
# Sets correct driver depending on backend protocol
|
||||
if ($cinder_nimble['nimble1_backend_protocol']) == 'iSCSI' {
|
||||
if ! defined(Package['open-iscsi']) {
|
||||
# We need following packages to create a root volume during an instance spawning
|
||||
package { 'open-iscsi': }
|
||||
}
|
||||
$nimble1_cinder_driver = 'cinder.volume.drivers.nimble.NimbleISCSIDriver'
|
||||
}
|
||||
elsif ($cinder_nimble['nimble1_backend_protocol']) == 'FC' {
|
||||
$nimble1_cinder_driver = 'cinder.volume.drivers.nimble.NimbleFCDriver'
|
||||
}
|
||||
|
||||
# To be ensure that $ symbol is correctly escaped in cinder password
|
||||
$nimble1_password = regsubst($cinder_nimble['nimble1_password'],'\$','$$','G')
|
||||
|
||||
# Check whether grouping is enabled and adjust volume_backend_name accordingly
|
||||
if ($cinder_nimble['nimble_grouping']) == true {
|
||||
$nimble1_backend_name = "${nimble_group_backend_name}_1"
|
||||
$nimble1_volume_backend_name = "${nimble_group_backend_name}"
|
||||
}
|
||||
else {
|
||||
$nimble1_backend_name = "${cinder_nimble['nimble1_backend_name']}"
|
||||
$nimble1_volume_backend_name = "${cinder_nimble['nimble1_backend_name']}"
|
||||
}
|
||||
|
||||
Cinder_config <||> -> Plugin_cinder_nimble::Backend::Enable_backend[$nimble1_backend_name] ~> Service <||>
|
||||
Cinder_config <||> ~> Service <||>
|
||||
|
||||
cinder_config {
|
||||
"$nimble1_backend_name/volume_backend_name": value => $nimble1_volume_backend_name;
|
||||
"$nimble1_backend_name/volume_driver": value => $nimble1_cinder_driver;
|
||||
"$nimble1_backend_name/san_ip": value => $cinder_nimble['nimble1_san_ip'];
|
||||
"$nimble1_backend_name/san_login": value => $cinder_nimble['nimble1_login'];
|
||||
"$nimble1_backend_name/san_password": value => $nimble1_password;
|
||||
}
|
||||
|
||||
# Adds the backend in <enabled_backends> parameter
|
||||
plugin_cinder_nimble::backend::enable_backend { $nimble1_backend_name: }
|
||||
|
||||
if ($cinder_nimble['no_backends']) >= '2' {
|
||||
# Sets correct driver depending on backend protocol
|
||||
if ($cinder_nimble['nimble2_backend_protocol']) == 'iSCSI' {
|
||||
if ! defined(Package['open-iscsi']) {
|
||||
# We need following packages to create a root volume during an instance spawning
|
||||
package { 'open-iscsi': }
|
||||
}
|
||||
$nimble2_cinder_driver = 'cinder.volume.drivers.nimble.NimbleISCSIDriver'
|
||||
}
|
||||
elsif ($cinder_nimble['nimble2_backend_protocol']) == 'FC' {
|
||||
$nimble2_cinder_driver = 'cinder.volume.drivers.nimble.NimbleFCDriver'
|
||||
}
|
||||
|
||||
# To be ensure that $ symbol is correctly escaped in cinder password
|
||||
$nimble2_password = regsubst($cinder_nimble['nimble2_password'],'\$','$$','G')
|
||||
|
||||
# Check whether grouping is enabled and adjust volume_backend_name accordingly
|
||||
if ($cinder_nimble['nimble_grouping']) == true {
|
||||
$nimble2_backend_name = "${nimble_group_backend_name}_2"
|
||||
$nimble2_volume_backend_name = "${nimble_group_backend_name}"
|
||||
}
|
||||
else {
|
||||
$nimble2_backend_name = "${cinder_nimble['nimble2_backend_name']}"
|
||||
$nimble2_volume_backend_name = "${cinder_nimble['nimble2_backend_name']}"
|
||||
}
|
||||
|
||||
Cinder_config <||> -> Plugin_cinder_nimble::Backend::Enable_backend[$nimble2_backend_name] ~> Service <||>
|
||||
Cinder_config <||> ~> Service <||>
|
||||
|
||||
cinder_config {
|
||||
"$nimble2_backend_name/volume_backend_name": value => $nimble2_volume_backend_name;
|
||||
"$nimble2_backend_name/volume_driver": value => $nimble2_cinder_driver;
|
||||
"$nimble2_backend_name/san_ip": value => $cinder_nimble['nimble2_san_ip'];
|
||||
"$nimble2_backend_name/san_login": value => $cinder_nimble['nimble2_login'];
|
||||
"$nimble2_backend_name/san_password": value => $nimble2_password;
|
||||
}
|
||||
|
||||
# Adds the backend in <enabled_backends> parameter
|
||||
plugin_cinder_nimble::backend::enable_backend { $nimble2_backend_name: }
|
||||
}
|
||||
|
||||
service { $cinder::params::volume_service: }
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
class plugin_cinder_nimble::backend::set_default_type (
|
||||
$config_file,
|
||||
$nimble_default_type_set,
|
||||
$nimble_backend_type
|
||||
) {
|
||||
|
||||
include plugin_cinder_nimble::params
|
||||
include cinder::params
|
||||
|
||||
if ($nimble_default_type_set) == true {
|
||||
ini_subsetting {"set_default_type_${nimble_backend_type}":
|
||||
ensure => present,
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
path => $config_file,
|
||||
setting => 'default_volume_type',
|
||||
subsetting => $nimble_backend_type,
|
||||
}
|
||||
|
||||
Cinder_config<||> ~> Service['cinder-api']
|
||||
|
||||
service { 'cinder-api':
|
||||
ensure => running,
|
||||
name => $::cinder::params::api_service,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
class plugin_cinder_nimble::backend::set_extraspecs_encryption (
|
||||
) {
|
||||
$storage_hash = hiera_hash('storage', {})
|
||||
$nimble_encryption = $storage_hash['nimble_encryption']
|
||||
$available_backend_names = keys($nimble_encryption)
|
||||
::osnailyfacter::openstack::manage_cinder_types { $available_backend_names:
|
||||
ensure => 'present',
|
||||
volume_backend_names => $nimble_encryption,
|
||||
key => 'nimble:encryption'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
class plugin_cinder_nimble::backend::set_extraspecs_multi_init (
|
||||
) {
|
||||
$storage_hash = hiera_hash('storage', {})
|
||||
$nimble_multi_init = $storage_hash['nimble_multi_init']
|
||||
$available_backend_names = keys($nimble_multi_init)
|
||||
::osnailyfacter::openstack::manage_cinder_types { $available_backend_names:
|
||||
ensure => 'present',
|
||||
volume_backend_names => $nimble_multi_init,
|
||||
key => 'nimble:multi-initiator'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
class plugin_cinder_nimble::backend::set_extraspecs_perfpol (
|
||||
) {
|
||||
$storage_hash = hiera_hash('storage', {})
|
||||
$nimble_perfpol = $storage_hash['nimble_perfpol']
|
||||
if ! empty($nimble_perfpol) {
|
||||
$available_backend_names = keys($nimble_perfpol)
|
||||
::osnailyfacter::openstack::manage_cinder_types { $available_backend_names:
|
||||
ensure => 'present',
|
||||
volume_backend_names => $nimble_perfpol,
|
||||
key => 'nimble:perfpol-name'
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
class plugin_cinder_nimble (
|
||||
) inherits plugin_cinder_nimble::params {
|
||||
|
||||
class { $nimble_backend_class: }
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
class plugin_cinder_nimble::params (
|
||||
) {
|
||||
|
||||
$config_file = '/etc/cinder/cinder.conf'
|
||||
$cinder_nimble = hiera_hash('cinder_nimble', {})
|
||||
$nimble_backend_class = 'plugin_cinder_nimble::backend::nimble'
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
# The task modifies hiera data to add new cinder-types
|
||||
- id: nimble_hiera_override
|
||||
type: puppet
|
||||
version: 3.0.0
|
||||
groups: [primary-controller]
|
||||
requires: [hiera]
|
||||
required_for: [create-cinder-types]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/hiera_override.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
# Execute on controllers only if ceph used for volumes.
|
||||
# For LCM inherit condition from openstack-cinder
|
||||
# otherwise enabled_backends will be overwritten.
|
||||
# https://bugs.launchpad.net/puppet-cinder/+bug/1598094
|
||||
- id: nimble_cinder_controller
|
||||
type: puppet
|
||||
version: 3.0.0
|
||||
groups: [primary-controller, controller]
|
||||
requires: [openstack-cinder]
|
||||
required_for: [deploy_end]
|
||||
condition:
|
||||
yaql_exp: >
|
||||
$.storage.volumes_ceph and
|
||||
changedAny($.cinder_nimble, $.network_scheme, $.cinder, $.network_metadata.vips,
|
||||
$.get('cinder_volume_group'), $.storage, $.ceilometer, $.sahara,
|
||||
$.rabbit, $.get('region', 'RegionOne'), $.get('use_ssl'),
|
||||
('primary-controller' in $.roles), $.get('proxy_port'),
|
||||
$.get('kombu_compression'), $.get('keystone_endpoint'),
|
||||
$.get('glance_endpoint'), $.get('glance_api_servers'),
|
||||
$.get('use_syslog'), $.get('use_stderr'), $.get('verbose'), $.debug,
|
||||
$.network_metadata.nodes.values().where(
|
||||
$.node_roles.any($.matches('controller'))).network_roles.select(
|
||||
$.get('mgmt/messaging')),
|
||||
$.get('amqp_hosts'), $.get('syslog_log_facility_cinder'),
|
||||
$.get('cinder_rate_limits'),
|
||||
$.configuration.get('cinder_api_paste_ini'), $.configuration.get('cinder'))
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/site.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
# For LCM inherit condition from top-role-cinder
|
||||
# otherwise enabled_backends will be overwritten.
|
||||
# https://bugs.launchpad.net/puppet-cinder/+bug/1598094
|
||||
- id: nimble_cinder
|
||||
type: puppet
|
||||
version: 3.0.0
|
||||
groups: [cinder]
|
||||
requires: [top-role-cinder]
|
||||
required_for: [deploy_end]
|
||||
condition:
|
||||
yaql_exp: >
|
||||
changedAny($.cinder_nimble, $.cinder, $.get('cinder_volume_group'),
|
||||
$.network_metadata.nodes.get(concat("node-", $.uid)).network_roles.get('cinder/iscsi'),
|
||||
$.network_metadata.vips, $.debug, $.node_volumes, $.storage, $.rabbit, $.ceilometer,
|
||||
$.get('use_stderr'), $.get('use_syslog'), $.get('syslog_log_facility_cinder'),
|
||||
$.get('syslog_log_facility_ceph'), $.get('proxy_port'), $.get('kombu_compression'),
|
||||
$.get('use_ssl'), $.get('service_endpoint'), $.get('glance_api_servers'),
|
||||
$.get('amqp_hosts'),
|
||||
$.network_metadata.nodes.values().where(
|
||||
$.node_roles.any($.matches('controller'))).network_roles.select(
|
||||
$.get('mgmt/messaging')))
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/site.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
# Fix hot pluggability.
|
||||
# Override create-cinder-types task with
|
||||
# additional dependency on "cinder_nimble".
|
||||
- id: create-cinder-types
|
||||
type: puppet
|
||||
version: 3.0.0
|
||||
groups: [primary-controller]
|
||||
requires: [openstack-cinder]
|
||||
required_for: [deploy_end]
|
||||
condition:
|
||||
yaql_exp: "changedAny($.storage, $.cinder_nimble)"
|
||||
parameters:
|
||||
puppet_manifest: /etc/puppet/modules/openstack_tasks/examples/openstack-cinder/create_cinder_types.pp
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 1200
|
||||
|
||||
# Post Deployment tasks
|
||||
|
||||
# Set the default volume type to the nimble type in <default_volume_type> parameter
|
||||
- id: disable_default_type
|
||||
role: [primary-controller, controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [post_deployment_start]
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/disable_default_type.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
||||
- id: set_default_type
|
||||
role: [primary-controller, controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [disable_default_type]
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/default_type.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
||||
- id: configure_nimblestorage_extraspecs_encryption
|
||||
role: [primary-controller, controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [set_default_type]
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/extraspecs_encryption.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
||||
- id: configure_nimblestorage_extraspecs_perfpol
|
||||
role: [primary-controller, controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [set_default_type]
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/extraspecs_perfpol.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
||||
- id: configure_nimblestorage_extraspecs_multi_init
|
||||
role: [primary-controller, controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [set_default_type]
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/extraspecs_multi_init.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
|
@ -0,0 +1,527 @@
|
|||
attributes:
|
||||
metadata:
|
||||
# Settings group can be one of "general", "security", "compute", "network",
|
||||
# "storage", "logging", "openstack_services" and "other".
|
||||
group: 'storage'
|
||||
# Number of Backends. Is there a dynamic way to build UI without this?
|
||||
no_backends:
|
||||
type: 'select'
|
||||
weight: 11
|
||||
value: '1'
|
||||
label: 'Nimble backends'
|
||||
description: 'Number of Nimble backends'
|
||||
values:
|
||||
- data: '1'
|
||||
label: '1'
|
||||
- data: '2'
|
||||
label: '2'
|
||||
- data: '3'
|
||||
label: '3'
|
||||
# Grouping selection
|
||||
nimble_grouping:
|
||||
value: false
|
||||
label: 'Group all backends to the same volume type?'
|
||||
description: 'Specify if all Nimble storage backends needs to be grouped to a volume type'
|
||||
weight: 12
|
||||
type: 'checkbox'
|
||||
# Group Backend details
|
||||
nimble_group_backend_name:
|
||||
value: 'cinder_nimble'
|
||||
label: 'Group Backend Name'
|
||||
description: '"volume_backend_name: for Nimble storage backends group in cinder'
|
||||
weight: 13
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == false"
|
||||
action: 'hide'
|
||||
nimble_group_backend_type:
|
||||
value: 'cinder_nimble'
|
||||
label: 'Group Backend Type'
|
||||
description: 'Type for Nimble storage backends group in cinder'
|
||||
weight: 14
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == false"
|
||||
action: 'hide'
|
||||
nimble_group_default_backend:
|
||||
type: 'checkbox'
|
||||
value: false
|
||||
weight: 15
|
||||
label: 'Set as Default Type?'
|
||||
description: 'Set the Nimble backend group as the default type'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == false"
|
||||
action: 'hide'
|
||||
nimble_group_encryption:
|
||||
value: false
|
||||
label: 'Encryption enabled?'
|
||||
description: 'Specify if Nimble storage backends needs to be encypted'
|
||||
weight: 16
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == false"
|
||||
action: 'hide'
|
||||
nimble_group_multi_init:
|
||||
value: false
|
||||
label: 'Multi-Initiator enabled?'
|
||||
description: 'Specify if Nimble storage multi-initiator needs to be enabled'
|
||||
weight: 17
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == false"
|
||||
action: 'hide'
|
||||
nimble_group_perfpol:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 18
|
||||
label: "Performance policy name"
|
||||
description: "Performance policy name for Nimble Storage backends"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == false"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_group_perfpol.value == ''"
|
||||
message: "Performance policy cannot be unset by setting this field blank. Old value will be retained. Delete extra spec value manually if needed."
|
||||
action: 'none'
|
||||
# Individual Backend details
|
||||
nimble1_backend_divider:
|
||||
value: ''
|
||||
label: "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
description: ''
|
||||
weight: 19
|
||||
type: "hidden"
|
||||
nimble1_backend_label:
|
||||
value: ''
|
||||
label: 'Nimble Backend #1'
|
||||
description: 'Details for Nimble Backend #1'
|
||||
weight: 21
|
||||
type: "radio"
|
||||
nimble1_backend_name:
|
||||
value: 'cinder_nimble1'
|
||||
label: 'Backend Name'
|
||||
description: '"volume_backend_name" for Nimble storage backend in cinder'
|
||||
weight: 22
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble1_backend_type:
|
||||
value: 'cinder_nimble1'
|
||||
label: 'Backend Type'
|
||||
description: 'Type for Nimble storage backend in cinder'
|
||||
weight: 23
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble1_default_backend:
|
||||
type: 'checkbox'
|
||||
value: false
|
||||
weight: 24
|
||||
label: 'Set as Default Type?'
|
||||
description: 'Set the Nimble backend #1 as the default type'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble2_default_backend.value == true"
|
||||
action: 'disable'
|
||||
message: "Backend #2 is selected as default type."
|
||||
- condition: "settings:cinder_nimble.nimble3_default_backend.value == true"
|
||||
action: 'disable'
|
||||
message: "Backend #3 is selected as default type."
|
||||
nimble1_backend_protocol:
|
||||
value: 'iSCSI'
|
||||
values:
|
||||
- data: "iSCSI"
|
||||
label: "iSCSI"
|
||||
description: "Enables iSCSI protocol for block storage volumes"
|
||||
- data: "FC"
|
||||
label: "Fibre Channel"
|
||||
description: "Enables Fibre Channel protocol for block storage volumes"
|
||||
label: 'Storage Protocol to be used with Nimble Array Backend'
|
||||
description: ''
|
||||
weight: 25
|
||||
type: "radio"
|
||||
nimble1_san_ip:
|
||||
value: ""
|
||||
label: 'Nimble Storage Management IP (san_ip)'
|
||||
description: 'The hostname (or IP address) for Nimble Storage Management'
|
||||
weight: 26
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
||||
error: "Error: Enter in regular IP address dot notation"
|
||||
nimble1_login:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 27
|
||||
label: "User ID for Nimble Storage"
|
||||
description: "Nimble Storage username/ID (with admin privilages)"
|
||||
regex:
|
||||
source: '^(?!\s*$).+'
|
||||
error: "Error: Username/ID cannot be blank"
|
||||
nimble1_password:
|
||||
value: ""
|
||||
type: "password"
|
||||
weight: 28
|
||||
label: "Password for Nimble Storage"
|
||||
description: "Nimble Storage password for username/ID above"
|
||||
regex:
|
||||
source: '^(?!\s*$).+'
|
||||
error: "Error: Password cannot be blank"
|
||||
nimble1_encryption:
|
||||
value: false
|
||||
label: 'Encryption enabled?'
|
||||
description: 'Specify if Nimble storage backend needs to be encypted'
|
||||
weight: 29
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble1_multi_init:
|
||||
value: false
|
||||
label: 'Multi-Initiator enabled?'
|
||||
description: 'Specify if Nimble storage multi-initiator needs to be enabled'
|
||||
weight: 30
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble1_perfpol:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 31
|
||||
label: "Performance policy name"
|
||||
description: "Performance policy name for Nimble Storage backend"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble1_perfpol.value == ''"
|
||||
message: "Performance policy cannot be unset by setting this field blank. Old value will be retained. Delete extra spec value manually if needed."
|
||||
action: 'none'
|
||||
nimble2_backend_divider:
|
||||
value: ''
|
||||
label: "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
description: ''
|
||||
weight: 32
|
||||
type: "hidden"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
nimble2_backend_label:
|
||||
value: ''
|
||||
label: 'Nimble Backend #2'
|
||||
description: 'Details for Nimble Backend #2'
|
||||
weight: 34
|
||||
type: "radio"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
nimble2_backend_name:
|
||||
value: 'cinder_nimble2'
|
||||
label: 'Backend Name'
|
||||
description: '"volume_backend_name" for Nimble storage backend in cinder'
|
||||
weight: 35
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble2_backend_type:
|
||||
value: 'cinder_nimble2'
|
||||
label: 'Backend Type'
|
||||
description: 'Type for Nimble storage backend in cinder'
|
||||
weight: 36
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble2_default_backend:
|
||||
type: 'checkbox'
|
||||
value: false
|
||||
weight: 37
|
||||
label: 'Set as Default Type?'
|
||||
description: 'Set the Nimble backend #2 as the default type'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble1_default_backend.value == true"
|
||||
action: 'disable'
|
||||
message: "Backend #1 is selected as default type."
|
||||
- condition: "settings:cinder_nimble.nimble3_default_backend.value == true"
|
||||
action: 'disable'
|
||||
message: "Backend #3 is selected as default type."
|
||||
nimble2_backend_protocol:
|
||||
value: 'iSCSI'
|
||||
values:
|
||||
- data: "iSCSI"
|
||||
label: "iSCSI"
|
||||
description: "Enables iSCSI protocol for block storage volumes"
|
||||
- data: "FC"
|
||||
label: "Fibre Channel"
|
||||
description: "Enables Fibre Channel protocol for block storage volumes"
|
||||
label: 'Storage Protocol to be used with Nimble Array Backend'
|
||||
description: ''
|
||||
weight: 38
|
||||
type: "radio"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
nimble2_san_ip:
|
||||
value: ""
|
||||
label: 'Nimble Storage Management IP (san_ip)'
|
||||
description: 'The hostname (or IP address) for Nimble Storage Management'
|
||||
weight: 39
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
||||
error: "Error: Enter in regular IP address dot notation"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
nimble2_login:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 40
|
||||
label: "User ID for Nimble Storage"
|
||||
description: "Nimble Storage username/ID (with admin privilages)"
|
||||
regex:
|
||||
source: '^(?!\s*$).+'
|
||||
error: "Error: Username/ID cannot be blank"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
nimble2_password:
|
||||
value: ""
|
||||
type: "password"
|
||||
weight: 41
|
||||
label: "Password for Nimble Storage"
|
||||
description: "Nimble Storage password for username/ID above"
|
||||
regex:
|
||||
source: '^(?!\s*$).+'
|
||||
error: "Error: Password cannot be blank"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
nimble2_encryption:
|
||||
value: false
|
||||
label: 'Encryption enabled?'
|
||||
description: 'Specify if Nimble storage backend needs to be encypted'
|
||||
weight: 42
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble2_multi_init:
|
||||
value: false
|
||||
label: 'Multi-Initiator enabled?'
|
||||
description: 'Specify if Nimble storage multi-initiator needs to be enabled'
|
||||
weight: 43
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble2_perfpol:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 44
|
||||
label: "Performance policy name"
|
||||
description: "Performance policy name for Nimble storage backend"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble2_perfpol.value == ''"
|
||||
message: "Performance policy cannot be unset by setting this field blank. Old value will be retained. Delete extra spec value manually if needed."
|
||||
action: 'none'
|
||||
nimble3_backend_divider:
|
||||
value: ''
|
||||
label: "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
description: ''
|
||||
weight: 45
|
||||
type: "hidden"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
nimble3_backend_label:
|
||||
value: ''
|
||||
label: 'Nimble Backend #3'
|
||||
description: 'Details for Nimble Backend #3'
|
||||
weight: 47
|
||||
type: "radio"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
nimble3_backend_name:
|
||||
value: 'cinder_nimble3'
|
||||
label: 'Backend Name'
|
||||
description: '"volume_backend_name" for Nimble storage backend in cinder'
|
||||
weight: 48
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble3_backend_type:
|
||||
value: 'cinder_nimble3'
|
||||
label: 'Backend Type'
|
||||
description: 'Type for Nimble storage backend in cinder'
|
||||
weight: 49
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble3_default_backend:
|
||||
type: 'checkbox'
|
||||
value: false
|
||||
weight: 50
|
||||
label: 'Set as Default Type?'
|
||||
description: 'Set the Nimble backend #3 as the default type'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble1_default_backend.value == true"
|
||||
action: 'disable'
|
||||
message: "Backend #1 is selected as default type."
|
||||
- condition: "settings:cinder_nimble.nimble2_default_backend.value == true"
|
||||
action: 'disable'
|
||||
message: "Backend #2 is selected as default type."
|
||||
nimble3_backend_protocol:
|
||||
value: 'iSCSI'
|
||||
values:
|
||||
- data: "iSCSI"
|
||||
label: "iSCSI"
|
||||
description: "Enables iSCSI protocol for block storage volumes"
|
||||
- data: "FC"
|
||||
label: "Fibre Channel"
|
||||
description: "Enables Fibre Channel protocol for block storage volumes"
|
||||
label: 'Storage Protocol to be used with Nimble Array Backend'
|
||||
description: ''
|
||||
weight: 51
|
||||
type: "radio"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
nimble3_san_ip:
|
||||
value: ""
|
||||
label: 'Nimble Storage Management IP (san_ip)'
|
||||
description: 'The hostname (or IP address) for Nimble Storage Management'
|
||||
weight: 52
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
||||
error: "Error: Enter in regular IP address dot notation"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
nimble3_login:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 53
|
||||
label: "User ID for Nimble Storage"
|
||||
description: "Nimble Storage username/ID (with admin privilages)"
|
||||
regex:
|
||||
source: '^(?!\s*$).+'
|
||||
error: "Error: Username/ID cannot be blank"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
nimble3_password:
|
||||
value: ""
|
||||
type: "password"
|
||||
weight: 54
|
||||
label: "Password for Nimble Storage"
|
||||
description: "Nimble Storage password for username/ID above"
|
||||
regex:
|
||||
source: '^(?!\s*$).+'
|
||||
error: "Error: Password cannot be blank"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
nimble3_encryption:
|
||||
value: false
|
||||
label: 'Encryption enabled?'
|
||||
description: 'Specify if Nimble storage backend needs to be encypted'
|
||||
weight: 55
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble3_multi_init:
|
||||
value: false
|
||||
label: 'Multi-Initiator enabled?'
|
||||
description: 'Specify if Nimble storage multi-initiator needs to be enabled'
|
||||
weight: 56
|
||||
type: 'checkbox'
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
nimble3_perfpol:
|
||||
value: ""
|
||||
type: "text"
|
||||
weight: 57
|
||||
label: "Performance policy name"
|
||||
description: "Performance policy name for Nimble Storage backend"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble_grouping.value == true"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.nimble3_perfpol.value == ''"
|
||||
message: "Performance policy cannot be unset by setting this field blank. Old value will be retained. Delete extra spec value manually if needed."
|
||||
action: 'none'
|
||||
nimble4_backend_divider:
|
||||
value: ''
|
||||
label: "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
description: ''
|
||||
weight: 58
|
||||
type: "hidden"
|
||||
restrictions:
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '1'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '2'"
|
||||
action: 'hide'
|
||||
- condition: "settings:cinder_nimble.no_backends.value == '3'"
|
||||
action: 'hide'
|
|
@ -0,0 +1,36 @@
|
|||
# Plugin name
|
||||
name: cinder_nimble
|
||||
# Human-readable name for your plugin
|
||||
title: Cinder plugin for Nimble storage
|
||||
# Plugin version
|
||||
version: '1.0.0'
|
||||
# Description
|
||||
description: Enables Nimble storage as a backend for Cinder volumes
|
||||
# Required fuel version
|
||||
fuel_version: ['9.0']
|
||||
|
||||
# Specify license of your plugin
|
||||
licenses: ['Apache License Version 2.0']
|
||||
# Specify author or company name
|
||||
authors: ['Nimble']
|
||||
# A link to the plugin's page
|
||||
homepage: 'https://github.com/openstack/fuel-plugin-cinder-nimble'
|
||||
|
||||
# Specify a group which your plugin implements, possible options:
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor,
|
||||
# equipment
|
||||
groups: ['storage::cinder']
|
||||
# Change `false` to `true` if the plugin can be installed in the environment
|
||||
# after the deployment.
|
||||
is_hotpluggable: true
|
||||
|
||||
# The plugin is compatible with releases in the list
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: mitaka-9.0
|
||||
mode: ['ha']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
|
||||
# Version of plugin package
|
||||
package_version: '4.0.0'
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Add here any the actions which are required before plugin build
|
||||
# like packages building, packages downloading from mirrors and so on.
|
||||
# The script should return 0 if there were no errors.
|
|
@ -0,0 +1,26 @@
|
|||
# WARNING: `tasks.yaml` will be deprecated in further releases.
|
||||
# Please, use `deployment_tasks.yaml` to describe tasks instead.
|
||||
|
||||
# This tasks will be applied on controller nodes,
|
||||
# here you can also specify several roles, for example
|
||||
# ['cinder', 'compute'] will be applied only on
|
||||
# cinder and compute nodes
|
||||
- role: ['controller']
|
||||
stage: post_deployment
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: bash deploy.sh
|
||||
timeout: 42
|
||||
# Task is applied for all roles
|
||||
- role: '*'
|
||||
stage: pre_deployment
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: echo all > /tmp/plugin.all
|
||||
timeout: 42
|
||||
# "reboot" task reboots the nodes and waits until they get back online
|
||||
# - role: '*'
|
||||
# stage: pre_deployment
|
||||
# type: reboot
|
||||
# parameters:
|
||||
# timeout: 600
|
|
@ -0,0 +1,7 @@
|
|||
volumes_roles_mapping:
|
||||
# Default role mapping
|
||||
cinder_nimble:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
|
||||
# Set here new volumes for your role
|
||||
volumes: []
|
Loading…
Reference in New Issue