2012-01-19 18:58:37 -08:00
|
|
|
# Install and configure base swift components
|
2012-02-13 15:39:18 -08:00
|
|
|
#
|
2012-01-19 18:58:37 -08:00
|
|
|
# == Parameters
|
2015-03-23 18:11:23 +01:00
|
|
|
#
|
2016-01-25 14:57:58 -07:00
|
|
|
# [*swift_hash_path_suffix*]
|
|
|
|
# (Required) String. A suffix used by hash_path to offer a bit more security
|
|
|
|
# when generating hashes for paths. It simply appends this value to all
|
|
|
|
# paths; if someone knows this suffix, it's easier for them to guess the hash
|
|
|
|
# a path will end up with. New installations are advised to set this
|
2022-06-27 16:56:49 +05:30
|
|
|
# parameter to a random secret, which would not be disclosed outside the
|
2016-01-25 14:57:58 -07:00
|
|
|
# organization. The same secret needs to be used by all swift servers of the
|
|
|
|
# same cluster. Existing installations should set this parameter to an empty
|
|
|
|
# string.
|
|
|
|
#
|
|
|
|
# [*swift_hash_path_prefix*]
|
2016-06-02 01:13:09 -03:00
|
|
|
# (Required) String. A prefix used by hash_path to offer a bit more security
|
2016-05-17 17:06:48 -06:00
|
|
|
# when generating hashes for paths. It simply prepends this value to all paths;
|
|
|
|
# if someone knows this prefix, it's easier for them to guess the hash a path
|
2016-01-25 14:57:58 -07:00
|
|
|
# will end up with. New installations are advised to set this parameter to a
|
2022-06-27 16:56:49 +05:30
|
|
|
# random secret, which would not be disclosed outside the organization. The
|
2016-01-25 14:57:58 -07:00
|
|
|
# same secret needs to be used by all swift servers of the same cluster.
|
|
|
|
# Existing installations should set this parameter to an empty string.
|
2014-03-05 23:57:26 +01:00
|
|
|
# as a salt when hashing to determine mappings in the ring.
|
|
|
|
# This file should be the same on every node in the cluster.
|
|
|
|
#
|
2016-06-02 01:13:09 -03:00
|
|
|
# [*package_ensure*]
|
|
|
|
# (Optional) The ensure state for the swift package.
|
|
|
|
# Defaults to present.
|
2014-03-05 23:57:26 +01:00
|
|
|
#
|
2016-06-02 01:13:09 -03:00
|
|
|
# [*max_header_size*]
|
|
|
|
# (Optional) Max HTTP header size for incoming requests for all swift
|
2015-07-02 19:24:50 +03:00
|
|
|
# services. Recommended size is 32768 for PKI keystone tokens.
|
2016-06-02 01:13:09 -03:00
|
|
|
# Defaults to 8192
|
2015-07-02 19:24:50 +03:00
|
|
|
#
|
2012-02-13 15:39:18 -08:00
|
|
|
# == Dependencies
|
|
|
|
#
|
2015-04-22 11:37:31 -07:00
|
|
|
# None
|
2012-02-13 15:39:18 -08:00
|
|
|
#
|
|
|
|
# == Authors
|
|
|
|
#
|
|
|
|
# Dan Bode dan@puppetlabs.com
|
|
|
|
#
|
|
|
|
# == Copyright
|
|
|
|
#
|
|
|
|
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
|
2012-01-19 18:58:37 -08:00
|
|
|
#
|
|
|
|
class swift(
|
2016-01-25 14:57:58 -07:00
|
|
|
$swift_hash_path_suffix = undef,
|
|
|
|
$swift_hash_path_prefix = undef,
|
|
|
|
$package_ensure = 'present',
|
|
|
|
$max_header_size = '8192',
|
2012-01-19 18:58:37 -08:00
|
|
|
) {
|
|
|
|
|
2019-12-08 23:21:35 +01:00
|
|
|
include swift::deps
|
|
|
|
include swift::params
|
|
|
|
include swift::client
|
2012-01-19 18:58:37 -08:00
|
|
|
|
2016-06-02 01:13:09 -03:00
|
|
|
if ($swift_hash_path_prefix == undef and $swift_hash_path_suffix == undef) {
|
|
|
|
fail('You must specify at least swift_hash_path_prefix or swift_hash_path_suffix')
|
2016-01-25 14:57:58 -07:00
|
|
|
}
|
|
|
|
|
2022-05-11 00:56:52 +09:00
|
|
|
package { 'swift':
|
|
|
|
ensure => $package_ensure,
|
|
|
|
name => $::swift::params::package_name,
|
|
|
|
tag => ['openstack', 'swift-package'],
|
2012-01-19 18:58:37 -08:00
|
|
|
}
|
|
|
|
|
2012-11-19 18:47:03 +04:00
|
|
|
user {'swift':
|
2015-12-11 10:02:16 +01:00
|
|
|
ensure => present,
|
2017-07-14 15:47:52 +08:00
|
|
|
require => Anchor['swift::install::end'],
|
2012-11-19 18:47:03 +04:00
|
|
|
}
|
2015-09-28 11:22:43 -04:00
|
|
|
|
2016-01-25 14:57:58 -07:00
|
|
|
swift_config {
|
2016-06-02 01:13:09 -03:00
|
|
|
'swift-hash/swift_hash_path_suffix': value => $swift_hash_path_suffix;
|
2016-01-25 14:57:58 -07:00
|
|
|
'swift-hash/swift_hash_path_prefix': value => $swift_hash_path_prefix;
|
|
|
|
'swift-constraints/max_header_size': value => $max_header_size;
|
2015-07-02 19:24:50 +03:00
|
|
|
}
|
2012-01-19 18:58:37 -08:00
|
|
|
}
|