Files
puppet-swift/manifests/init.pp
Daneyon Hansen f71d159c4d Improve Proxy Signing Directory Support
1. The signing_dir was being created on every swift node
when it's only needed on proxies:

  http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/installing-and-configuring-the-proxy-node.html

2. The signing_dir was not configurable, even though
the OpenStack doc's show multiple references
(/var/cache/swift and /home/swift/keystone-signing).

Change-Id: I3eb00046fc535a32d7a1800d15489e9fe071373b
2013-08-12 18:39:15 +00:00

73 lines
1.5 KiB
Puppet

# Install and configure base swift components
#
# == Parameters
# [*swift_hash_suffix*] string of text to be used
# as a salt when hashing to determine mappings in the ring.
# This file should be the same on every node in the cluster.
# [*package_ensure*] The ensure state for the swift package.
# Optional. Defaults to present.
#
# == Dependencies
#
# Class['ssh::server::install']
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
class swift(
$swift_hash_suffix,
$package_ensure = 'present'
) {
include swift::params
include ssh::server::install
Class['ssh::server::install'] -> Class['swift']
if !defined(Package['swift']) {
package { 'swift':
name => $::swift::params::package_name,
ensure => $package_ensure,
}
}
package { 'swiftclient':
name => $::swift::params::client_package,
ensure => $package_ensure,
}
File { owner => 'swift', group => 'swift', require => Package['swift'] }
file { '/home/swift':
ensure => directory,
mode => '0700',
}
file { '/etc/swift':
ensure => directory,
mode => '2770',
}
user {'swift':
ensure => present,
}
file { '/var/lib/swift':
ensure => directory,
owner => 'swift'
}
file { '/var/run/swift':
ensure => directory,
}
file { '/etc/swift/swift.conf':
ensure => present,
mode => '0660',
content => template('swift/swift.conf.erb'),
}
}