Changes for Fuel 9.0

Change-Id: Iff229aca5c70a59e5e97839d8eeab08ad6b63d4f
This commit is contained in:
Ed Balduf 2016-08-05 14:29:07 -06:00
parent 04a325758f
commit 95a0728d67
12 changed files with 130 additions and 195 deletions

View File

@ -7,7 +7,7 @@ $plugin_yaml = 'cinder_solidfire.yaml'
$plugin_name = 'cinder_solidfire'
$content = inline_template('
storage_hash:
storage:
volume_backend_names:
solidfire: solidfire
')
@ -20,3 +20,11 @@ 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"
}

View File

@ -1,6 +1,3 @@
notice('MODULAR: fuel-plugin-solidfire-cinder')
# The manifest is executed on nodes with cinder role or on nodes with controller role when Ceph is used.
if ('cinder' in hiera('roles')) or (!empty(filter_nodes(hiera('nodes'), 'role', 'ceph-osd'))) {
class { 'plugin_cinder_solidfire': }
}
class { 'plugin_cinder_solidfire': }

View File

@ -1,45 +0,0 @@
#
# Copyright 2015 SolidFire, 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 plugin_cinder_solidfire::backend::iscsi (
$volume_group = 'cinder',
$iscsi_helper = $cinder::params::iscsi_helper,
$backend_type,
) inherits cinder::params {
$network_scheme = hiera_hash('network_scheme', {})
prepare_network_config($network_scheme)
$storage_address = get_network_role_property('cinder/iscsi', 'ipaddr')
cinder_config {
'cinder_iscsi/volume_backend_name': value => $backend_type;
'cinder_iscsi/volume_driver': value => 'cinder.volume.drivers.lvm.LVMVolumeDriver';
'cinder_iscsi/iscsi_helper': value => $iscsi_helper;
'cinder_iscsi/volume_group': value => $volume_group;
'cinder_iscsi/iscsi_ip_address': value => $storage_address;
'cinder_iscsi/backend_host': value => $storage_address;
}
ini_subsetting {'enable_cinder_iscsi_backend':
ensure => present,
section => 'DEFAULT',
key_val_separator => '=',
path => '/etc/cinder/cinder.conf',
setting => 'enabled_backends',
subsetting => "cinder_iscsi",
subsetting_separator => ',',
}
}

View File

@ -1,49 +0,0 @@
#
# Copyright 2015 SolidFire, 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 plugin_cinder_solidfire::backend::rbd (
$rbd_pool = 'volumes',
$rbd_user = 'volumes',
$rbd_ceph_conf = '/etc/ceph/ceph.conf',
$rbd_flatten_volume_from_snapshot = false,
$rbd_secret_uuid = 'a5d0dd94-57c4-ae55-ffe0-7e3732a24455',
$volume_tmp_dir = false,
$rbd_max_clone_depth = '5',
$glance_api_version = undef,
$backend_type,
) {
cinder_config {
'cinder_rbd/volume_backend_name': value => $backend_type;
'cinder_rbd/volume_driver': value => 'cinder.volume.drivers.rbd.RBDDriver';
'cinder_rbd/rbd_ceph_conf': value => $rbd_ceph_conf;
'cinder_rbd/rbd_user': value => $rbd_user;
'cinder_rbd/rbd_pool': value => $rbd_pool;
'cinder_rbd/rbd_max_clone_depth': value => $rbd_max_clone_depth;
'cinder_rbd/rbd_flatten_volume_from_snapshot': value => $rbd_flatten_volume_from_snapshot;
'cinder_rbd/backend_host': value => "rbd:${rbd_pool}";
}
ini_subsetting {'enable_cinder_rbd_backend':
ensure => present,
section => 'DEFAULT',
key_val_separator => '=',
path => '/etc/cinder/cinder.conf',
setting => 'enabled_backends',
subsetting => "cinder_iscsi",
subsetting_separator => ',',
}
}

View File

@ -0,0 +1,16 @@
define plugin_cinder_solidfire::enable_backend () {
notice("Enabling backend: ${backend_name}")
$config_file = '/etc/cinder/cinder.conf'
ini_subsetting {"enable_${name}_backend":
ensure => present,
section => 'DEFAULT',
key_val_separator => '=',
path => $config_file,
setting => 'enabled_backends',
subsetting => $name,
subsetting_separator => ',',
}
}

View File

@ -15,27 +15,7 @@
#
class plugin_cinder_solidfire {
$cinder_solidfire = hiera_hash('cinder_solidfire', {})
$storage_hash = hiera_hash('storage_hash', {})
$plugins = hiera('plugins', [] )
if ($storage_hash['volume_backend_names']['volumes_lvm']) {
$backend_type = $storage_hash['volume_backend_names']['volumes_lvm']
$backend_name = 'cinder_iscsi'
$volume_backend_name = 'volumes_lvm'
$backend_class = 'plugin_cinder_solidfire::backend::iscsi'
} elsif ($storage_hash['volume_backend_names']['volumes_ceph']) {
$backend_type = $storage_hash['volume_backend_names']['volumes_ceph']
$backend_name = 'cinder_rbd'
$volume_backend_name = 'volumes_ceph'
$backend_class = 'plugin_cinder_solidfire::backend::rbd'
}
if ( 'cinder_netapp' in $plugins ) {
plugin_cinder_solidfire::backend::solidfire { 'solidfire': backend_name => 'solidfire', }
} else {
class { $backend_class: backend_type => $backend_type, }
plugin_cinder_solidfire::backend::solidfire { 'solidfire': backend_name => 'solidfire', }
}
$cinder_solidfire = hiera_hash('cinder_solidfire', {})
plugin_cinder_solidfire::solidfire { 'solidfire': backend_name => 'solidfire', }
}

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
#
define plugin_cinder_solidfire::backend::solidfire (
define plugin_cinder_solidfire::solidfire (
$backend_name = $name,
$cinder_solidfire = $plugin_cinder_solidfire::cinder_solidfire,
) {
@ -20,17 +20,7 @@ define plugin_cinder_solidfire::backend::solidfire (
include cinder::params
include cinder::client
ini_subsetting {'enable_cinder_solidfire_backend':
ensure => present,
section => 'DEFAULT',
key_val_separator => '=',
path => '/etc/cinder/cinder.conf',
setting => 'enabled_backends',
subsetting => "${backend_name}",
subsetting_separator => ',',
}
notice("${backend_name}")
Cinder::Backend::Solidfire <||> -> Plugin_cinder_solidfire::Enable_backend[$backend_name] ~> Service <||>
cinder::backend::solidfire { $backend_name :
san_ip => $cinder_solidfire['solidfire_mvip'],
@ -40,19 +30,20 @@ define plugin_cinder_solidfire::backend::solidfire (
sf_emulate_512 => 'true',
sf_api_port => $cinder_solidfire['solidfire_api_port'],
sf_account_prefix => $cinder_solidfire['solidfire_account_prefix'],
extra_options => { "${backend_name}/sf_allow_template_caching" =>
{ value => $cinder_solidfire['solidfire_allow_template_caching'] },
"${backend_name}/sf_template_account_name" =>
{ value => $cinder_solidfire['solidfire_template_account'] },
"${backend_name}/host" =>
{ value => $backend_name },
sf_allow_template_caching => $cinder_solidfire['solidfire_allow_template_caching'],
sf_template_account_name => $cinder_solidfire['solidfire_template_account'],
sf_volume_prefix => $cinder_solidfire['solidfire_volume_prefix'],
extra_options => { "${backend_name}/host" =>
{ value => $backend_name },
},
}
Cinder_config <||> ~> service { "$::cinder::params::scheduler_service": } ~> service { "$::cinder::params::volume_service": }
plugin_cinder_solidfire::enable_backend { $backend_name: }
package { 'open-iscsi' :
ensure => 'installed',
}
service { $cinder::params::volume_service: }
}

View File

@ -1,21 +1,63 @@
- id: solidfire_hiera_override
type: puppet
version: 2.0.0
groups: [primary-controller, controller, cinder]
version: 3.0.0
groups: [primary-controller]
requires: [hiera]
required_for: [create-cinder-types]
parameters:
puppet_manifest: puppet/manifests/hiera_override.pp
puppet_modules: /etc/puppet/modules
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 360
- id: solidfire_cinder
- id: solidfire_cinder_controller
type: puppet
version: 2.0.0
role: [primary-controller, controller, cinder]
requires: [post_deployment_start]
required_for: [post_deployment_end]
version: 3.0.0
role: [primary-controller, controller]
requires: [openstack-cinder]
required_for: [deploy_end]
condition:
yaql_exp: >
$.storage.volumes_ceph and
changedAny($.cinder_solidfire, $.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: solidfire_cinder
type: puppet
version: 3.0.0
groups: [cinder]
requires: [top-role-cinder]
required_for: [deploy_end]
condition:
yaql_exp: >
changedAny($.cinder_solidfire, $.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -1,6 +1,6 @@
******************************************************************
Guide to the SolidFire Cinder Plugin version 02.000.0 for Fuel 8.x
******************************************************************
***************************************************************
Guide to the SolidFire Cinder Plugin version 3.0.0 for Fuel 9.x
***************************************************************
This document provides instructions for installing, configuring and using
SolidFire Cinder plugin for Fuel.
@ -55,7 +55,7 @@ Requirements
======================= ==================
Requirement Version/Comment
======================= ==================
Fuel 8.0
Fuel 9.0
============================================
@ -67,33 +67,16 @@ Prerequisites
* Cinder relies on the open-iscsi package to preform many functions such as image
to volume. This plugin requires (and installs) the open-iscsi package, so it must
be avaliable in one of the repositories avaliable Fuel.
be avaliable in one of the repositories avaliable to Fuel.
* See the `Mirantis, SolidFire joint reference architecture <https://content.mirantis.com/rs/451-RBY-185/images/SolidfireMirantisUnlockedReferenceArchitecture-4-25-2016.pdf>`_.
Limitations
-----------
* The SolidFire Cinder Fuel plugin no longer supports a single backend. The
option has been removed from the GUI and the plugin will always assume
multiple backends.
* Since Fuel does not natively support multiple backends in Cinder; therefore,
the plugin is designed to move the default storage selection (ceph or lvm)
from the default section of the config file into it's own stanza before it
can add the SolidFire config stanza.
* The SolidFire Cinder plugin has been designed to detect the NetApp plugin
and handle multiple backends in conjunction with NetApp correctly.
* All other storage plugins (other than NetApp) may conflict with the
SolidFire or NetApp plugin and whichever plugin runs last will configure the
enabled_backends, requiring hand editing.
* NOTE: When using this plugin with the NetApp plugin one MUST select
'Multibackend Enabled' on NetApp plugin for proper multi-backend
to be automatically enabled.
* The SolidFire Cinder Fuel plugin no longer supports a single backend in the
DEFAULT section. The option has been removed from the GUI for multiple
backends and the plugin will always assume multiple backends.
============================================
@ -125,7 +108,7 @@ SolidFire Cinder plugin installation
::
# scp fuel-plugin-solidfire-cinder-2.0-2.0.0-1.noarch.rpm \
# scp cinder_solidfire-3.0-3.0.0-1.noarch.rpm \
root@:<the_Fuel_Master_node_IP>:/tmp
#. Log into the Fuel Master node and install the plugin:
@ -133,28 +116,28 @@ SolidFire Cinder plugin installation
::
# cd /tmp
# fuel plugins --install /tmp/fuel-plugin-solidfire-cinder-2.0-2.0.0-1.noarch.rpm
# fuel plugins --install /tmp/cinder_solidfire-3.0-3.0.0-1.noarch.rpm
...
# fuel plugins list
id | name | version | package_version
---|------------------------------|---------|----------------
1 | fuel-plugin-solidfire-cinder | 2.0.0 | 4.0.0
id | name | version | package_version | releases
---+------------------+---------+-----------------+--------------------
1 | cinder_netapp | 5.0.0 | 4.0.0 | ubuntu (mitaka-9.0)
SolidFire Cinder plugin configuration
-------------------------------------
#. After plugin is installed, create a new OpenStack environment following
`the instructions <https://docs.mirantis.com/openstack/fuel/fuel-8.0/user-guide.html#create-a-new-openstack-environment>`_.
`the instructions <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/create-environment/start-create-env.html>`_.
#. Configure your environment following
`the official Mirantis OpenStack documentation <https://docs.mirantis.com/openstack/fuel/fuel-8.0/user-guide.html#configure-your-environment>`_.
`the official OpenStack documentation <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/configure-environment.html>`_.
#. Open the *Storage tab* of the Fuel web UI and scroll down the page to
'Fuel plugin to enable SolidFire in Cinder.'
'Fuel plugin for SolidFire in Cinder.'
#. Select the Fuel plugin checkbox to enable SolidFire Cinder plugin for Fuel:
.. image:: figures/cinder-solidfire-plugin-2.0.0.png
.. image:: figures/cinder-solidfire-plugin-3.0.0.png
:width: 100%
#. The default configuration is that the SolidFire configuration stanza is a self contained stanza
@ -181,9 +164,13 @@ SolidFire Cinder plugin configuration
such that each instance can quickly identify accounts that belong to that instance. NOTE: Accounts
on SolidFire are named using the Project/Tenant ID, optionally prefixed as defined here.
#. Once configuration is done, you can run
`network verification <https://docs.mirantis.com/openstack/fuel/fuel-8.0/user-guide.html#verify-networks>`_ check and `deploy the environment <https://docs.mirantis.com/openstack/fuel/fuel-8.0/user-guide.html#deploy-changes>`_.
#. 'SF volume prefix' will cause all volumes on teh SolidFire cluster to be prefixed with with the
configured characters. This is useful and recommended when multiple OpenStack instances are
utilizing the same SolidFire cluster. This field is pre-populated with the default value of 'UUID-'.
#. Once configuration is done, you can run
`network verification <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/configure-environment/verify-networks.html>`_
check and `deploy the environment <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/deploy-environment.html>`_.
User Guide
==========
@ -197,11 +184,10 @@ cinder-volume process log file with the 'solidfire' title.
Known issues
============
Due to Fuels lack of support for multiple cinder backends, only plugins
designed to reconfigure the base storage and detect other backend plugins
will work automatically. The SolidFire plugin will reconfigure the default
storage and detect the NetApp plugin. If you need to support other vendors,
hand editing of the cinder.conf is required.
For Mitaka (Fuel 9.0) the following change is required to be in place
https://review.openstack.org/#/c/347066/ in file
/etc/puppet/mitaka-9.0/modules/cinder/manifests/backend/solidfire.pp on the
fuel master.
Release Notes
=============
@ -210,10 +196,12 @@ Release Notes
* Version 1.1.0 supports Fuel 7.x.
* Version 01.001.1 adds automated install of the open-iscsi package which is required by SolidFire, but not installed
* Version 1.1.1 adds automated install of the open-iscsi package which is required by SolidFire, but not installed
by Fuel if Ceph is selected in the starting wizzard. Supports Fuel 7.x.
* Version 02.00.0 refactors the code to support Fuel 8.0
* Version 2.0.0 refactors the code to support Fuel 8.0
* Version 3.0.0 refactors the code to support Fuel 9.0
Troubleshooting
@ -224,5 +212,6 @@ All SolidFire messages are output into the Cinder-volume log file. Search for 's
Appendix
========
`The SolidFire driver documentation <http://docs.openstack.org/kilo/config-reference/content/solidfire-volume-driver.html>`_
`The SolidFire driver documentation
<http://docs.openstack.org/mitaka/config-reference/block-storage/drivers/solidfire-volume-driver.html>`_
contains complete information on all SolidFire driver options.

View File

@ -46,3 +46,9 @@ attributes:
description: 'Prefix to use for all SolidFire accounts related to this OpenStack.'
weight: 70
type: "text"
solidfire_volume_prefix:
value: 'UUID-'
label: 'SF volume prefix'
description: 'Prefix to use for all SolidFire volumes related to this OpenStaack Cloud.'
weight: 80
type: 'text'

View File

@ -1,8 +1,8 @@
name: cinder_solidfire
title: Fuel plugin for SolidFire in Cinder
version: '2.0.0'
version: '3.0.0'
description: Enables the SolidFire driver in Cinder
fuel_version: ['8.0']
fuel_version: ['9.0']
licenses: ['Apache License Version 2.0']
authors: ['Ed Balduf <ed.balduf@solidfire.com>']
homepage: 'https://github.com/stackforge/fuel-plugin-solidfire-cinder'
@ -12,7 +12,7 @@ is_hotpluggable: true
releases:
- os: ubuntu
version: liberty-8.0
version: mitaka-9.0
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu