Added MOS 9.0 support

- Task-based deployment support.
  - Hot-plug and LCM support (Experimental).
  - Updated documentaion.
  - Cleaned up puppet.
  - Refactored deployment_tasks.yaml
  - Removed all stuff related to default MOS backends.
    9.0 has built-in multibackend, so just add new backend.

Change-Id: Ia885d1a931f2111bdd3e9e1dccec07d34e42d2f0
This commit is contained in:
Roman Sokolkov 2016-07-04 12:02:07 +03:00
parent 1ae5ca1e5d
commit babf22fb11
19 changed files with 116 additions and 155 deletions

View File

@ -4,7 +4,7 @@ Cinder NetApp plugin for Fuel
Overview
--------
The plugin can replace Cinder default backend by Cinder NetApp backend or work in parallel. ``LVM over iSCSI`` and ``Ceph`` are two choices, which can be used as a default backend for Cinder. The plugin does not overwrite ``enabled_backends`` option that allows to use it with other plugins for Cinder backends.
The plugin configures NetApp backend for Cinder using multibackend feature.
The plugin support following storage families:
@ -20,13 +20,21 @@ Requirements
| Requirement | Version/Comment |
|------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| Mirantis Openstack compatibility | 8.0 |
| Netapp filer or appliance is reachable via one of the Mirantis OpenStack networks | Data ONTAP or E-Series/EF-Series storage family with NTS\iSCSI enabled |
| Mirantis Openstack compatibility | 9.0 |
| Netapp filer or appliance is reachable via one of the Mirantis OpenStack networks | Data ONTAP or E-Series/EF-Series storage family with NFS\iSCSI enabled |
Release Notes
-------------
**5.0.0**
* Added MOS 9.0 support
* Removed code related to MOS backends
* Added MOS LCM support (Experimental)
**4.2.1**
* Documentation has been updated and fixed

View File

@ -2,5 +2,14 @@
label: 'Cinder NetApp'
description: 'Cinder with NetApp backend'
compatible:
- name: 'storage:block:backend:ceph'
- name: 'storage:block:backend:lvm'
- name: storage:block:lvm
- name: storage:block:ceph
- name: storage:object:ceph
- name: storage:ephemeral:ceph
- name: storage:image:ceph
- name: hypervisor:qemu
- name: network:neutron:core:ml2
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
incompatible:
- name: hypervisor:vmware

View File

@ -6,12 +6,12 @@ $cinder_netapp = hiera_hash('cinder_netapp', {})
Nova_config <||> ~> Service <||>
nova_config {
'libvirt/iscsi_use_multipath': value => $cinder_netapp['use_multipath_for_image_xfer'];
}
if ($cinder_netapp['netapp_storage_protocol']) == 'iscsi' and ($cinder_netapp['use_multipath_for_image_xfer']) {
package { 'multipath-tools': }
nova_config {
'libvirt/iscsi_use_multipath': value => true;
}
}
if ($cinder_netapp['netapp_storage_protocol']) == 'nfs' {

View File

@ -3,7 +3,6 @@
notice('MODULAR: netapp-hiera-override')
$cinder_netapp = hiera_hash('cinder_netapp', {})
$default_backend = $cinder_netapp['default_backend']
$hiera_dir = '/etc/hiera/plugins'
$plugin_yaml = 'cinder_netapp.yaml'

View File

@ -1,6 +1,3 @@
notice('MODULAR: fuel-plugin-cinder-netapp')
# 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_netapp': }
}
class { 'plugin_cinder_netapp': }

View File

@ -1,25 +0,0 @@
class plugin_cinder_netapp::backend::iscsi (
$volume_group = 'cinder',
$iscsi_helper = 'tgtadm',
$backend_type,
$backend_name,
) {
# Get IP address in storage subnet
$network_scheme = hiera_hash('network_scheme', {})
prepare_network_config($network_scheme)
$storage_address = get_network_role_property('cinder/iscsi', 'ipaddr')
# Creates separate section for <LVM over iSCSI> backend
cinder_config {
"$backend_name/volume_backend_name": value => $backend_type;
"$backend_name/volume_driver": value => 'cinder.volume.drivers.lvm.LVMVolumeDriver';
"$backend_name/iscsi_helper": value => $iscsi_helper;
"$backend_name/volume_group": value => $volume_group;
"$backend_name/iscsi_ip_address": value => $storage_address;
"$backend_name/backend_host": value => $storage_address;
}
# Adds the backend in <enabled_backends> parameter
plugin_cinder_netapp::backend::enable_backend { $backend_name: }
}

View File

@ -1,28 +0,0 @@
class plugin_cinder_netapp::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,
$backend_name,
) {
# Creates separate section for Ceph backend
cinder_config {
"$backend_name/volume_backend_name": value => $backend_type;
"$backend_name/volume_driver": value => 'cinder.volume.drivers.rbd.RBDDriver';
"$backend_name/rbd_ceph_conf": value => $rbd_ceph_conf;
"$backend_name/rbd_user": value => $rbd_user;
"$backend_name/rbd_pool": value => $rbd_pool;
"$backend_name/rbd_max_clone_depth": value => $rbd_max_clone_depth;
"$backend_name/rbd_flatten_volume_from_snapshot": value => $rbd_flatten_volume_from_snapshot;
"$backend_name/backend_host": value => "rbd:${rbd_pool}";
}
# Adds the backend in <enabled_backends> parameter
plugin_cinder_netapp::backend::enable_backend { $backend_name: }
}

View File

@ -1,20 +1,5 @@
class plugin_cinder_netapp (
$cinder_netapp = $plugin_cinder_netapp::params::cinder_netapp,
$backend_name = $plugin_cinder_netapp::params::backend_name,
$backend_type = $plugin_cinder_netapp::params::backend_type,
$backend_class = $plugin_cinder_netapp::params::backend_class,
$netapp_backend_class = $plugin_cinder_netapp::params::netapp_backend_class,
) inherits plugin_cinder_netapp::params {
if ($cinder_netapp['default_backend']) {
Class[$backend_class] -> Class[$netapp_backend_class]
class { $backend_class:
backend_type => $backend_type,
backend_name => $backend_name,
}
}
class { $netapp_backend_class: }
}

View File

@ -2,21 +2,6 @@ class plugin_cinder_netapp::params (
) {
$config_file = '/etc/cinder/cinder.conf'
$cinder_netapp = hiera_hash('cinder_netapp', {})
$storage_hash = hiera_hash('storage_hash', {})
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_netapp::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_netapp::backend::rbd'
}
$netapp_backend_class = 'plugin_cinder_netapp::backend::netapp'
}

View File

@ -1,7 +1,3 @@
storage_hash:
storage:
volume_backend_names:
netapp: cinder_netapp
<% if ! @default_backend -%>
volumes_lvm: false
volumes_ceph: false
<% end -%>

View File

@ -1,8 +1,8 @@
# The task modifies hiera data to have right set cinder-types
# The task modifies hiera data to add new cinder-types
- id: netapp_hiera_override
type: puppet
version: 2.0.0
groups: [primary-controller, controller, cinder]
version: 2.1.0
groups: [primary-controller]
requires: [hiera]
required_for: [create-cinder-types]
parameters:
@ -10,14 +10,58 @@
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 360
# The task is executed on controller nodes only in particular cases
# See site.pp for more details
# 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: netapp_cinder_controller
type: puppet
version: 2.1.0
groups: [primary-controller, controller]
requires: [openstack-cinder]
required_for: [deploy_end]
condition:
yaql_exp: >
$.storage.volumes_ceph and
changedAny($.cinder_netapp, $.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: netapp_cinder
type: puppet
version: 2.0.0
role: [primary-controller, controller, cinder]
requires: [post_deployment_start]
required_for: [post_deployment_end]
version: 2.1.0
groups: [cinder]
requires: [top-role-cinder]
required_for: [deploy_end]
condition:
yaql_exp: >
changedAny($.cinder_netapp, $.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
@ -25,23 +69,29 @@
- id: netapp_compute
type: puppet
version: 2.0.0
version: 2.1.0
groups: [compute]
requires: [top-role-compute]
required_for: [deploy_end]
condition:
yaql_exp: "changed($.cinder_netapp)"
parameters:
puppet_manifest: puppet/manifests/compute.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 360
- id: deleting_old_cinder_volume_services
type: shell
version: 2.0.0
role: [primary-controller]
requires: [post_deployment_start]
required_for: [post_deployment_end]
# Fix hot pluggability.
# Override create-cinder-types task with
# additional dependency on "cinder_netapp".
- id: create-cinder-types
type: puppet
version: 2.1.0
groups: [primary-controller]
requires: [openstack-cinder]
required_for: [deploy_end]
condition:
yaql_exp: "changedAny($.storage, $.cinder_netapp)"
parameters:
cmd: . /root/openrc && for host in $(cinder service-list | grep 'cinder-volume.*enabled.*down' | awk '{ print $4}'); do cinder-manage service remove cinder-volume $host; done
retries: 3
interval: 20
timeout: 180
puppet_manifest: /etc/puppet/modules/openstack_tasks/examples/openstack-cinder/create_cinder_types.pp
puppet_modules: /etc/puppet/modules
timeout: 1200

View File

@ -54,9 +54,9 @@ author = u'Mirantis Inc.'
# built documents.
#
# The short X.Y version.
version = '4.2-4.2.1-1'
version = '5.0'
# The full version, including alpha/beta/rc tags.
release = '4.2-4.2.1-1'
release = '5.0-5.0.0-1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -22,10 +22,8 @@ Features
* Clustered Data ONTAP as a backend for Cinder with NFS or iSCSI data-transfer protocols
* Data ONTAP 7-Mode as a backend for Cinder with NFS or iSCSI data-transfer protocols
* E-Series or EF-Series as a backend for Cinder with iSCSI data-transfer protocol
* Supports multi backend feature. The plugin does not overwrite ``enabled_backends`` option
thereby allowing use other plugins for Cinder.
* Allows using NetApp as a backend for Cinder along with MOS default backends - ``LVM over iSCSI`` or ``Ceph``
* Supports all configuration options of NetApp Cinder driver for Liberty
* Supports Cinder multibackend
* Supports all configuration options of NetApp Cinder driver for Mitaka
Requirements
@ -33,7 +31,7 @@ Requirements
======================= =================================
Requirement Version/Comment
======================= =================================
Fuel 8.0
Fuel 9.0
NetApp Storage System Clustered ONTAP Data
Data ONTAP 7-Mode
@ -53,19 +51,20 @@ Prerequisites
Release Notes
-------------
* Added true support of multi backends
* Legacy of CentOS support for iSCSI was removed
* Added comments to source code
* Documentation is updated\fixed
* Added MOS 9.0 support
* Removed code related to MOS backends
* Added MOS LCM support (Experimental)
Limitations
-----------
* Deployment fails if ``cinder`` role is not assigned to ``controller`` nodes
* Only one NetApp backend can be configured to work with Cinder
* Before creating Ubuntu repository's mirrors in Fuel, you have to manually add to /usr/share/fuel-mirror/ubuntu.yaml following packages:
* nfs-common
* open-iscsi
* multipath-tools
* MOS LCM support is in experimental mode
.. _the official NetApp ONTAP documentation: http://mysupport.netapp.com/documentation/productlibrary/index.html?productID=30092
.. _the official NetApp E-Series documentation: https://mysupport.netapp.com/info/web/ECMP1658252.html

View File

@ -18,12 +18,6 @@ Once the Fuel Cinder NetApp plugin has been installed, you can create OpenStack
.. image:: images/select-checkbox.png
:width: 40%
#. Configure the plugin.Select **MOS Backend Enabled** checkbox
if you would like Cinder NetApp driver to be used along with default beckend for MOS Cinder:
.. image:: images/default_backend.png
:width: 50%
#. Choose storage family and storage protocol. Several options are available.
- If you plan to use Clustered Data mode through NFS, click **Clustered Data ONTAP**
@ -98,7 +92,6 @@ Once the Fuel Cinder NetApp plugin has been installed, you can create OpenStack
:width: 100%
#. Using *Nodes* tab, `add nodes and assign roles to them`_.
Please, note that all controller nodes **MUST** be configured with Cinder role as well.
#. This step is needed only when local fuel mirrors are used
Following packages ``nfs-common``, ``open-iscsi``, ``multipath-tools`` aren't included by default when local mirror is created. To have these packages available during deploy you have to add them into ``/usr/share/fuel-mirror/ubuntu.yaml`` file in ``packages: &packages`` section.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -1,5 +1,5 @@
============================================
Guide to the Cinder NetApp plugin ver. 4.2.1
Guide to the Cinder NetApp plugin ver. 5.0.0
============================================
This document will guide you through the steps to install,

View File

@ -10,18 +10,18 @@ To install the Cinder Netapp plugin, follow these steps:
have the Fuel Master node, please see `the official
Mirantis OpenStack documentation`_::
[root@home ~]# scp cinder_netapp-4.2-4.2.1-1.noarch.rpm root@fuel-master:/tmp
[root@home ~]# scp cinder_netapp-5.0-5.0.0-1.noarch.rpm root@fuel-master:/tmp
#. Log into Fuel Master node and install the plugin using the `Fuel CLI`_::
[root@fuel-master ~]# fuel plugins --install cinder_netapp-4.2-4.2.1-1.noarch.rpm
[root@fuel-master ~]# fuel plugins --install cinder_netapp-5.0-5.0.0-1.noarch.rpm
#. Verify that the plugin is installed correctly::
[root@fuel-master ~]# fuel plugins
id | name | version | package_version
---|---------------|---------|----------------
1 | cinder_netapp | 4.2.1 | 4.0.0
1 | cinder_netapp | 5.0.0 | 4.0.0
.. _Fuel Plugins Catalog: https://www.mirantis.com/products/openstack-drivers-and-plugins/fuel-plugins/
.. _the official Mirantis OpenStack documentation: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide.html

View File

@ -1,13 +1,6 @@
attributes:
metadata:
group: 'storage'
default_backend:
value: false
label: 'MOS Backend Enabled'
description: 'If the option is checked, MOS default backend (LVM over iSCSI\Ceph) will be used along with NetApp'
weight: 10
type: 'checkbox'
# Storage Type
netapp_storage_family:
value: 'ontap_cluster'

View File

@ -3,11 +3,11 @@ name: cinder_netapp
# Human-readable name for your plugin
title: Cinder and NetApp integration
# Plugin version
version: '4.2.1'
version: '5.0.0'
# Description
description: Enables using NetApp as a Cinder backend
# Required fuel version
fuel_version: ['8.0']
fuel_version: ['9.0']
authors: ['Mirantis','Orange']
licenses: ['Apache License Version 2.0']
@ -19,7 +19,7 @@ is_hotpluggable: true
# The plugin is compatible with releases in the list
releases:
- os: ubuntu
version: liberty-8.0
version: mitaka-9.0
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu