The NetApp E-Series module manages E-Series storage arrays using Puppet Network Device.
- SANtricity Web Service is used as a proxy between puppet and storage array
- Excon - ruby http client
node 'puppet.node.local' {
include netapp_e
$hostname = 'netapp.local'
netapp_e::config { $hostname:
username => $username,
password => $password,
url => $hostname,
port => '8080',
target => "${::settings::confdir}/device/${hostname}"
}
cron { "netappe-puppet-device-run":
command => "puppet device --deviceconfig ${::settings::confdir}/device/${hostname}",
minute => fqdn_rand(60),
}
}
node 'netapp.local' {
$status = present
$storage_system = 'second'
netapp_e_storage_system {$storage_system:
ensure => $status,
controllers => ['10.250.117.116', '10.250.117.117'],
password => 'Haslo1234',
}
netapp_e_storage_system {'third':
ensure => $status,
controllers => ['10.250.117.114', '10.250.117.115'],
}
if $::initialized_systems and ($storage_system in $::initialized_systems) {
netapp_e_storage_pool {'raid5pool-second':
ensure => $status,
storagesystem => $storage_system,
raidlevel => 'raid5',
diskids => [
'010000005000CCA0577B11A00000000000000000',
'010000005000CCA0577B13A40000000000000000',
'010000005000CCA0577B58700000000000000000',
],
}
netapp_e_storage_pool {'raid5pool-third':
ensure => $status,
storagesystem => 'third',
raidlevel => 'raid5',
diskids => [
'010000005000CCA05763E8A80000000000000000',
'010000005000CCA05764AEF00000000000000000',
'010000005000CCA05767B06C0000000000000000',
],
}
netapp_e_volume {'volume-standard-second':
ensure => $status,
storagesystem => $storage_system,
size => 1,
storagepool => 'raid5pool-second',
sizeunit => 'gb',
segsize => '512',
}
netapp_e_volume {'volume-standard-third':
ensure => $status,
storagesystem => 'third',
size => 1,
storagepool => 'raid5pool-third',
sizeunit => 'gb',
segsize => '512',
}
netapp_e_volume {'A-second':
ensure => $status,
storagesystem => $storage_system,
size => 1,
storagepool => 'raid5pool-second',
sizeunit => 'gb',
segsize => '512',
}
netapp_e_volume {'A-third':
ensure => $status,
storagesystem => 'third',
size => 1,
storagepool => 'raid5pool-third',
sizeunit => 'gb',
segsize => '512',
}
netapp_e_mirror_group {'new-mirror-group':
ensure => $status,
primaryarray => 'second',
secondaryarray => 'third',
syncinterval => 11,
syncthreshold => 16,
recoverythreshold => 22,
repothreshold => 43,
}
netapp_e_mirror_members {'new-mirror-members':
ensure => $status,
primaryvolume => 'volume-standard-second',
secondaryvolume => 'volume-standard-third',
mirror => 'new-mirror-group'
}
} else {
notice("Wait to initialize storage-system: ${storage_system}")
}
if $status == present {
Netapp_e_storage_system <| |> -> Netapp_e_storage_pool <| |> -> Netapp_e_volume <| |> ->
Netapp_e_mirror_group <| |> -> Netapp_e_mirror_members <| |>
}
elsif $status == absent {
Netapp_e_mirror_members <| |> -> Netapp_e_mirror_group <| |> -> Netapp_e_volume <| |> ->
Netapp_e_storage_pool <| |> -> Netapp_e_storage_system <| |>
}
}Manage Netapp E series storage system creation, modification and deletion.
nameStorage System ID.passwordStorage system password.controllers(array of string) Controllers IP addresses or host names.meta_tags(array of hashes) Optional meta tags to associate to this storage system.
Manage Netapp E series storage disk pool
nameThe user-label to assign to the new storage pool.diskidsArray of the identifiers of the disk drives to use for creating the storage pool.storagesystemStorage system ID.raidlevelThe RAID configuration for the new storage pool. Possible values: 'raidUnsupported', 'raidAll', 'raid0', 'raid1', 'raid3', 'raid5', 'raid6', 'raidDiskPool', '__UNDEFINED'erasedrives(boolean, default false) Security-enabled drives that were previously part of a secured storage pool must be erased before they can be re-used. Enable to automatically erase such drives.
Manage Netapp E series volume
nameThe user-label to assign to the new volume.thin(boolean, default false) If true thin volume will be created.storagesystemStorage system ID.storagepoolName of storage poll from which the volume will be allocated.sizeunitUnit for size. Possible values: 'bytes', 'b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb'sizeNumber of units to make the volume.segsize(only standard volume) The segment size of the volume.dataassurance(boolean) If true data assurance enabled.defaultmapping(boolean, thin volume) Create the default volume mapping.owningcontrollerid(thin volume) Set the initial owning controller.repositorysize(thin volume) Number of units to make the repository volume, which is the backing for the thin volume.maxrepositorysize(thin volume) Maximum size to which the thin volume repository can grow. Must be between 4GB & 256GB.growthalertthreshold(thin volume) The repository utilization warning threshold (in percent).expansionpolicy(thin volume) Thin Volume expansion policy. If automatic, the thin volume will be expanded automatically when capacity is exceeded, if manual, the volume must be expanded manually. Possible values: 'unknown', 'manual', 'automatic', '__UNDEFINED'cachereadahead(thin volume) If true automatic cache read-ahead enabled
Manage Netapp E series snapshot groups
nameThe name of the new snapshot group.storagesystemStorage system ID.storagepoolThe name of the storage pool to allocate the repository volume.volumeThen name of the volume for the new snapshot grouprepositorysizeThe percent size of the repository in relation to the size of the base volume.warnthresholdThe repository utilization warning threshold, as a percentage of the repository volume capacity.limitThe automatic deletion indicator. If non-zero, the oldest snapshot image will be automatically deleted when creating a new snapshot image to keep the total number of snapshot images limited to the number specified.policyThe behavior on when the data repository becomes full. Possible values: 'unknown', 'failbasewrites', 'purgepit', '__UNDEFINED'
Manage Netapp E series snapshot image
This type require :schedule meta-parameter to be set.
nameThe name of the puppet resource.storagesystemStorage system ID.groupName of snapshot group.
schedule { 'everyday':
period => daily,
repeat => 1,
}
netapp_e_snapshot_image {'daily-snapshot':
group => 'NewSnapshotGroup',
storagesystem => 'sys_id',
schedule => 'everyday',
require => Netapp_e_snapshot_group['NewSnapshotGroup']
}Manage Netapp E series snapshot volume
nameThe user-label to assign to the new snapshot volume.imageidThe identifier of the snapshot image used to create the new snapshot volume.storagesystemStorage system ID.storagepoolName of storage poll from which the volume will be allocated.fullthresholdThe repository utilization warning threshold percentage.viewmodeThe snapshot volume access mode. Possible values: 'modeUnknown', 'readWrite', 'readOnly', '__UNDEFINED'repositorysizeThe size of the view in relation to the size of the base volume.
netapp_e_snapshot_volume {'NewSnapshotVol':
storagesystem => 'sys_id',
imageid => '34000000600A098000607399006302C054DDC033',
storagepool => 'raid5pool',
viewmode => 'readWrite',
repositorysize => 10,
fullthreshold => 14,
require => Netapp_e_storage_pool['raid5pool']
}Manage Netapp E series volume copy
nameThe user-label to assign to the new volume copy.storagesystemStorage system ID.sourceName of the source volume for the copy job.targetName of the target volume for the copy job.copypriorityThe priority of the copy job (0 is the lowest priority, 4 is the highest priority). Possible values: 'priority0', 'priority1', 'priority2', 'priority3', 'priority4', '__UNDEFINED'targetwriteprotected(boolean) Specifies whether to block write I/O to the target volume while the copy job exists.disablesnapshot(boolean) Will disable the target snapshot after the copy completes and purge the associated group when the copy pair is deleted.
Manage Netapp E series hosts
nameThe user-label to assign to the new host.storagesystemStorage system ID.typeindexHostType index.groupidName of host group where host belongs.ports(array of hashes) Host addresses.
Manage Netapp E series host group
nameThe user-label to assign to the new host.storagesystemStorage system ID.hosts(array of string) IDs of hosts
Manage Netapp E series volume mappings
nameThe user-label to assign to the new volume mapping.storagesystemStorage system ID.sourceName of the source volume.targetThe host group or a host for the volume mapping.typeType of target. Possible values: host, hostgrouplunThe LUN for the volume mapping.
Manage Netapp E series mirror group
nameThe user-label to assign to the new mirror group.primaryarrayThe id of the secondary array.secondaryarrayThe id of the secondary array.interfacetypeThe intended protocol to use if both Fibre and iSCSI are available. Possible values: 'fibre', 'iscsi', 'fibreAndIscsi', 'none'syncintervalSync interval (minutes).recoverythresholdRecovery point warning threshold (minutes).repothresholdRepository utilization warning threshold.syncthresholdSync warning threshold (minutes).
Manage Netapp E series mirror group members
namePuppet resource name.primaryvolumeName of primary volume.secondaryvolumeName of secondary volume.mirrorName of mirror group.capacityPercentage of the capacity of the primary volume to use for the repository capacity.scanmedia(boolean)validateparity(boolean) Validate repository parity.
Rspec test can be run using command:
rspec spec/*
from the module root directory.
Acceptance test can be found in acceptancetests directory.
- Michał Skalski mskalski@mirantis.com
- Andrzej Skupień askupien@mirantis.com
- Denys Kravchenko dkravchenko@mirantis.com