Files
puppet-openstack/manifests/swift/storage-node.pp
Dan Bode 3c9c0e4d06 Fix puppet-lint failures
This commit does two things to resolve
puppet-lint failures:

1. Split device_endpoint into its own file

Previously, the device_endpoint class was
defined inside of the storage-node.pp class.

This resulted in puppet-lint failures.

This commit moves the define to its own
file in order to conform to module
standards.

2. Modify spacing of a line in openstack::provision

This second change is actually a limitation in puppet-lint,
I have file: https://github.com/rodjek/puppet-lint/issues/213
to track it.

Change-Id: If83eb7fb740c5632711da6ab0f91bf6220c5830e
2013-08-07 13:30:18 -07:00

54 lines
1.4 KiB
Puppet

class openstack::swift::storage-node (
$swift_zone,
$swift_hash_suffix = 'swift_secret',
$swift_local_net_ip = $::ipaddress_eth0,
$storage_type = 'loopback',
$storage_base_dir = '/srv/loopback-device',
$storage_mnt_base_dir = '/srv/node',
$storage_devices = ['1', '2'],
$storage_weight = 1,
$package_ensure = 'present',
$byte_size = '1024',
) {
class { 'swift':
swift_hash_suffix => $swift_hash_suffix,
package_ensure => $package_ensure,
}
case $storage_type {
'loopback': {
# create xfs partitions on a loopback device and mount them
swift::storage::loopback { $storage_devices:
base_dir => $storage_base_dir,
mnt_base_dir => $storage_mnt_base_dir,
require => Class['swift'],
}
}
# make xfs filesystem on physical disk and mount them
'disk': {
swift::storage::disk {$storage_devices:
mnt_base_dir => $storage_mnt_base_dir,
byte_size => $byte_size,
}
}
default: {
}
}
# install all swift storage servers together
class { 'swift::storage::all':
storage_local_net_ip => $swift_local_net_ip,
}
openstack::swift::device_endpoint { $storage_devices:
swift_local_net_ip => $swift_local_net_ip,
zone => $swift_zone,
weight => $storage_weight,
}
# collect resources for synchronizing the ring databases
Swift::Ringsync<<||>>
}