Version information
This version is compatible with:
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'dellemc-unity', '0.1.2'
Learn more about managing modules with a PuppetfileDocumentation
Puppet module for Unity system
Table of Contents
Overview
The dellemc-unity
module manages DellEMC Unity storage resources.
The Unity storage system by DellEMC delivers the ultimate in simplicity and value, enabling your organization to speed
deployment, streamline management and seamlessly tier storage to the cloud. The dellemc-unity
module allows you to
configure and deploy the Unity via Puppet code.
License
Setup
Requirements
- Puppet
3.8
or greater - Ruby
1.9
or greater - rubypython
0.6.4
or greater (The bridge between Ruby and Python) - Python
2.7
. - Storops, 0.5.1 or greater (Python storage management library for Unity and VNX.)
-
rubypython is a bridge between the Ruby and Python interpreters. It enables the interaction with Python based storops library, dramatically eases the effort to extend the
dellemc-unity
module. -
storops is a Python storage management library for VNX and Unity. It needs to be manually installed in Puppet agent/master.
pip install storops
Installation
Before proceeding, Ensure you have installed the required Ruby
and Puppet
.
- Install
rubypython
via gem
On Ubuntu/Debian, make sure the
libffi-dev
is installed, sinceffi
(one ofrubypython
's dependencies) is a native extension. To install it, usesudo apt-get install libffi-dev
For some puppet distros, a build-in
ruby
interpreter andgem
are shipped with puppet together, so make sure the rightgem
is used to install ruby related dependencies. In this case, you can use following command to installrubypython
:/opt/puppetlabs/puppet/bin/gem install rubypython
gem install rubypython
- Install
storops
from pypi
pip install storops
- Install
dellemc-unity
puppet module.
puppet module install dellemc-unity
or install from a local source tarball.
puppet module install ".\dellemc-unity-x.y.z.tar.gz"
Usage
- Define a managed Unity system
unity_system { 'FNM12345678901':
ip => '192.168.1.50',
user => 'admin',
password => 'password',
ensure => present,
}
The defined system Unity_system['FNM12345678901']
then can be passed to any Unity resources.
- Upload a license
unity_license{ '/path/to/the/license.lic':
unity_system => Unity_system['FNM12345678901'],
ensure => present,
}
Note: the path separator in the title
must be /
even using on Windows agent.
- Create a pool
unity_pool { 'puppet_pool':
unity_system => Unity_system['FNM12345678901'],
description => 'created by puppet module',
raid_groups => [{
disk_group => 'dg_15',
raid_type => 1,
stripe_width => 0,
disk_num => 5,
}],
ensure => present,
}
- Create a iSCSI portal on ethernet port
unity_iscsi_portal { '10.244.213.245':
unity_system => Unity_system['FNM12345678901'],
ethernet_port => 'spa_eth3',
netmask => '255.255.255.0',
vlan => 133,
gateway => '10.244.213.1',
ensure => present,
}
- Create a Host
unity_host { 'my_host':
unity_system => Unity_system['FNM12345678901'],
description => 'Created by puppet',
ip => '192.168.1.139',
os => 'Ubuntu16',
host_type => 1,
iqn => 'iqn.1993-08.org.debian:01:unity-puppet-host',
wwns => ['20:00:00:90:FA:53:4C:D1:10:00:00:90:FA:53:4C:D3',
'20:00:00:90:FA:53:4C:D1:10:00:00:90:FA:53:4C:D4'],
ensure => present,
}
- Create a io limit policy
# Create a Unity io limit policy (absolute limit)
unity_io_limit_policy { 'puppet_policy':
unity_system => Unity_system['FNM12345678901'],
policy_type => 1,
description => 'Created by puppet 12',
max_iops => 1000,
max_kbps => 20480,
burst_rate => 50,
burst_time => 10,
burst_frequency => 2,
}
The meaning for above burst settings is: 50% for 10 minute(s) resetting every 2 hour(s).
- Create a LUN
unity_lun { 'puppet_lun':
unity_system => Unity_system['FNM12345678901'],
pool => Unity_pool['puppet_pool'],
size => 15,
thin => true,
compression => false,
sp => 0,
description => "Created by puppet_unity.",
io_limit_policy => Unity_io_limit_policy['puppet_policy'],
hosts => [Unity_host['my_host']],
ensure => present,
}
- Define multiple Unity system in manifest file
Administrator can define multiple systems and manage the resources on systems via a single manifest file.
Please refer to the example file here: example_multiple_systems
Reference
Types
unity_system
: Define a Unity system.unity_license
: Upload a license to a defined Unity system.unity_pool
: Create, modify, expand or destroy a storage pool.unity_iscsi_portal
: Create, update, or destroy a iSCSI portal. Applicable for both IPv4 and IPv6.unity_host
: Create, update, or destroy a Unity host.unity_io_limit_policy
: Create, update, or destroy a Unity IO limit policy.unity_lun
: Create, update, or destroy a Unity LUN.
You can reference the examples for each resource type under the source code folder: examples
Parameters
Type: unity_system
name
Optional.
If not specified when declaring a resource,
its value will default to the title
of the resource.
ip
Required.
The management IP of Unity.
username
Required.
The username of Unity.
password
Required.
The password of Unity.
Type: unity_license
license_file
Optional.
The absolute path of the license file.
If not specified when declaring a resource,
its value will default to the title
of the resource.
unity_system
Required.
The Unity system reference.
ensure
Required.
present
will upload the license for the referenced Unity system.
Type: unity_pool
name
Optional.
The name of the pool.
If not specified when declaring a resource,
its value will default to the title
of the resource.
ensure
Required.
present
will create the pool if absent.
absent
will delete the pool if present
description
Optional.
The description of the pool.
raid_groups
Required.
a list of Hash
is required for the pool.
...
unity_pool { 'puppet_pool':
unity_system => Unity_system['FNM12345678901'],
description => 'created by puppet module',
raid_groups => [{
disk_group => 'dg_15',
raid_type => 1,
stripe_width => 0,
disk_num => 5,
}],
alert_threshold => 80,
is_snap_harvest_enabled => true,
is_harvest_enabled => true,
ensure => present,
}
...
Parameters in raid_groups
:
disk_group
: the id of disk group of the Unity system.
raid_type
: the raid type of pool.
Valid values are:
Value | Description |
---|---|
0 |
None |
1 |
RAID5 |
2 |
RAID0 |
3 |
RAID1 |
4 |
RAID3 |
7 |
RAID10 |
10 |
RAID6 |
48879 |
Automatic |
stripe_width
: RAID group stripe widths, including parity or mirror disks.
Value | Description |
---|---|
0 |
BestFit value is used in automatic selection of stripe configuration. |
2 |
A 2 disk group, usable in RAID10 1+1 configuration. |
4 |
A 4 disk group, usable in RAID10 2+2 configuration. |
5 |
A 5 disk group, usable in RAID5 4+1 configuration. |
6 |
A 6 disk group, usable in RAID6 4+2 and RAID10 3+3 configurations. |
8 |
A 8 disk group, usable in RAID6 6+2 and RAID10 4+4 configurations. |
9 |
A 9 disk group, usable in RAID5 8+1 configuration. |
10 |
A 10 disk group, usable in RAID6 8+2 and RAID10 5+5 configurations. |
12 |
A 12 disk group, usable in RAID6 10+2 and RAID10 6+6 configurations. |
13 |
A 13 disk group, usable in RAID5 12+1 configuration. |
14 |
A 14 disk group, usable in RAID6 12+2 configuration. |
15 |
raid strip width including parity disks, can be used in RAID6 14+2 configuration. |
disk_num
: Number of disks.
For pool expansion, user can either increase the disk_num
or add new raid group in raid_groups
.
alert_threshold
Optional.
Threshold at which the system will generate alerts about the free space in the pool, specified as a percentage.
is_harvest_enabled
Optional
Enable/disable pool harvesting.
is_snap_harvest_enabled
Optional
Enable/disable pool snapshot harvesting.
is_harvest_enabled
Optional
Enable/disable pool harvesting.
pool_harvest_high_threshold
Optional
Pool used space high threshold at which the system will automatically starts to delete snapshots in the pool.
pool_harvest_low_threshold
Optional
Pool used space low threshold under which the system will automatically stop deletion of snapshots in the pool.
snap_harvest_high_threshold
Optional
Snapshot used space high threshold at which the system automatically starts to delete snapshots in the pool.
snap_harvest_low_threshold
Optional
Snapshot used space low threshold below which the system will stop automatically deleting snapshots in the pool.
is_fast_cache_enabled
Optional
Enable/disable FAST Cache for this pool
is_fastvp_enabled
Optional
Enable/disable scheduled data relocations for this pool.
pool_type
Optional
Create traditional/dynamic pool
Valid values are:
Value | Description |
---|---|
1 |
traditional pool |
2 |
dynamic pool |
Type: unity_iscsi_portal
ip
Required
IP of the iSCSI portal
ethernet_port
Required
The ethernet port ID for the iSCSI portal.
such as spa_eth2
, spb_eth3
.
netmask
Required
The netmask for the iSCSI portal
It can be a address 255.255.255.0
or a length 24
.
vlan
Optional
The VLAN identifier for the iSCSI portal.
gateway
Optional
The gateway for the network. the gateway must be reachable during creation.
v6_prefix_len
Optional
IPv6 prefix length for the interface, if it uses an IPv6 address.
Type: unity_host
name
Optional.
If not specified when declaring a resource,
its value will default to the title
of the resource.
host_type
Optional.
Valid values are:
value | Description |
---|---|
0 |
Host configuration is unknown. |
1 |
A manually defined individual host system. |
2 |
All the hosts in a subnet. |
3 |
A netgroup, used for NFS access. Netgroups are defined by NIS, and only available when NIS is active. |
4 |
A RecoverPoint appliance host. |
5 |
An auto-managed host - the system or an external agent identifies and updates the information for this host. |
255 |
Host defined for Block Migration from VNX Platform system. |
Default to 1
description
Optional.
Description for the host.
os
Optional.
Operating system running on the host.
ip
Required.
IP address for the host.
iqn
Optional.
Initiator's IQN for the host.
wwns
Optional.
WWNs for the host.
Type: unity_io_limit_policy
name
Optional.
If not specified when declaring a resource,
its value will default to the title
of the resource.
policy_type
Optional.
Indicates whether the I/O limit policy is absolute or density-based.
Valid values are:
value | Description |
---|---|
1 |
Absolute Value |
2 |
Density-based Value |
Default to 1
.
description
Optional.
I/O limit rule description.
max_iops
Optional.
Read/write IOPS limit.
max_kbps
Optional.
Read/write KB/s limit.
max_iops_density
Optional.
Read/write density-based IOPS limit.
max_kbps_density
Optional. Read/write density-based KB/s limit.
burst_rate
optional. The percentage of read/write IOPS and/or KBPS over the limits a storage object is allowed to process during a spike in demand.
burst_time
optional. How long a storage object is allowed to process burst traffic.
burst_time must be 1
to 60
.
burst_frequency
optional.
How often a storage object is allowed to process burst traffic for the duration of burst time.
burst_frequency must be 1
to 24
.
Type: unity_lun
name
Optional.
If not specified when declaring a resource,
its value will default to the title
of the resource.
description
Optional.
LUN description.
thin
Optional.
Enable/disable thin provisioning.
Valid values are:
true
: Enable thin.false
: Disable thin.
Default to true
.
size
Required.
Specify LUN size in gigabyte.
pool
Required.
Set pool of the LUN.
compression
Optional.
Enable/disable LUN compression, only applicable for all-flash pool.
sp
Optional.
Storage Processor (SP) that owns the LUN.
Valid values are:
value | Description |
---|---|
0 |
SPA |
1 |
SPB |
io_limit_policy
Optional.
IO limit settings for the LUN.
hosts
Optional.
Hosts which contain this LUN.
Limitations
Development
Simply fork the repo and send PR for your code change(also provide testing result of your change), remember to give a title and description of your PR.
Contributors
peter.wang13 at emc.com
Contact
peter.wang13 at emc.com
Release Notes
- 0.1.0
- Initial release.
- 0.1.1
- Add license differential uploading.
- Pool expansion if new raid groups are added.
Types in this module release
Dependencies
- puppetlabs-stdlib (>= 1.0.0)
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.