From 77be0932fc7d40a9bdf47c175c8ae5ffcc660f2f Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Mon, 23 Mar 2015 18:11:23 +0100 Subject: [PATCH] Upgrade puppet-lint and fix metadata, parameter and style lint issues This patch bump puppet-lint gem and add metadata and parameters checks. Metadata lint issues (SPDX ID), missing parameters documentation and syntaxe lint issues was also fixed in this patch Doc for metadata syntax. https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html Change-Id: Ia6bb3483b3ffdbeed60b58702a36e0c7b31ffb86 --- Gemfile | 5 ++- manifests/auth_file.pp | 20 +++++++++ manifests/bench.pp | 66 ++++++++++++++++++++++++++++ manifests/dispersion.pp | 11 ++++- manifests/init.pp | 9 ++-- manifests/keystone/auth.pp | 67 ++++++++++++++++++++++++++--- manifests/keystone/dispersion.pp | 9 +++- manifests/params.pp | 2 + manifests/proxy.pp | 28 ++++++++++++ manifests/proxy/account_quotas.pp | 1 - manifests/proxy/authtoken.pp | 57 ++++++++++++++++++------ manifests/proxy/bulk.pp | 1 - manifests/proxy/catch_errors.pp | 1 - manifests/proxy/ceilometer.pp | 6 +++ manifests/proxy/container_quotas.pp | 1 - manifests/proxy/crossdomain.pp | 1 - manifests/proxy/formpost.pp | 1 - manifests/proxy/gatekeeper.pp | 3 +- manifests/proxy/keystone.pp | 18 +++++--- manifests/proxy/ratelimit.pp | 33 +++++++++----- manifests/proxy/s3token.pp | 21 ++++++--- manifests/proxy/slo.pp | 1 - manifests/proxy/staticweb.pp | 1 - manifests/proxy/swauth.pp | 21 +++++++-- manifests/proxy/swift3.pp | 6 +++ manifests/proxy/tempauth.pp | 2 + manifests/proxy/tempurl.pp | 1 - manifests/ringbuilder/create.pp | 6 +-- manifests/ringserver.pp | 11 ++++- manifests/ringsync.pp | 2 + manifests/storage/account.pp | 20 ++++----- manifests/storage/all.pp | 31 ++++++++++++- manifests/storage/container.pp | 29 +++++++------ manifests/storage/disk.pp | 8 ++-- manifests/storage/ext4.pp | 10 ++--- manifests/storage/loopback.pp | 8 ++-- manifests/storage/node.pp | 12 +++--- manifests/storage/object.pp | 20 ++++----- manifests/storage/xfs.pp | 8 ++-- metadata.json | 2 +- 40 files changed, 433 insertions(+), 127 deletions(-) diff --git a/Gemfile b/Gemfile index f3182fde..e55c0fef 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,10 @@ source 'https://rubygems.org' group :development, :test do gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', '~> 0.3.2' + + gem 'metadata-json-lint' + gem 'puppet-lint-param-docs' + gem 'puppet-lint', '~> 1.1' gem 'rspec-puppet', '~> 1.0.1' gem 'rake', '10.1.1' gem 'rspec', '< 2.99' diff --git a/manifests/auth_file.pp b/manifests/auth_file.pp index 6971c2d8..e2c3d354 100644 --- a/manifests/auth_file.pp +++ b/manifests/auth_file.pp @@ -1,3 +1,23 @@ +# == Class: swift::auth_file +# +# Create a RC credentials file for Swift v1 authentication +# +# === Parameters: +# +# [*admin_tenant*] +# (required) The name of the tenant used to authenticate +# +# [*admin_user*] +# (optional) The name of the user to create in keystone for use by the ironic services +# Defaults to 'admin' +# +# [*auth_url*] +# (optional) The authentication URL +# Defaults to 'http://127.0.0.1:5000/v2.0/' +# +# [*admin_password*] +# (required) The password for the swift user +# class swift::auth_file ( $admin_tenant, $admin_password, diff --git a/manifests/bench.pp b/manifests/bench.pp index 10a6360e..76c6d434 100644 --- a/manifests/bench.pp +++ b/manifests/bench.pp @@ -1,4 +1,70 @@ +# == Class: swift::bench +# # Configure swift-bench.conf for swift performance bench +# +# === Parameters: +# +# [*auth_url*] +# Defaults to 'http://localhost:8080/auth/v1.0' +# +# [*swift_user*] +# Defaults to 'test:tester' +# +# [*swift_key*] +# Defaults to 'testing' +# +# [*auth_version*] +# Defaults to '1.0' +# +# [*log_level*] +# Defaults to 'INFO' +# +# [*test_timeout*] +# Defaults to '10' +# +# [*put_concurrency*] +# (optional) Configure PUT concurrency +# Defaults to '10' +# +# [*get_concurrency*] +# (optional) Configure GET concurrency +# Defaults to '10', +# +# [*del_concurrency*] +# (optional) Configure DELETE concurrency +# Defaults to '10', +# +# [*lower_object_size*] +# If object_sources is not set and lower_object_size != upper_object_size, +# each PUT will randomly select an object size between the two values. Units +# are bytes. +# Defaults to '10' +# +# [*upper_object_size*] +# If object_sources is not set and lower_object_size != upper_object_size, +# each PUT will randomly select an object size between the two values. Units +# are bytes. +# Defaults to '10' +# +# [*object_size*] +# If object_sources is not set and lower_object_size == upper_object_size, +# every object PUT will contain this many bytes. +# Defaults to '1' +# +# [*num_objects*] +# Defaults to '1000' +# +# [*num_gets*] +# Defaults to '10000' +# +# [*num_containers*] +# Defaults to '20' +# +# [*delete*] +# Should swift-bench benchmark DELETEing the created objects and then delete +# all created containers? +# Defaults to 'yes' +# class swift::bench ( $auth_url = 'http://localhost:8080/auth/v1.0', $swift_user = 'test:tester', diff --git a/manifests/dispersion.pp b/manifests/dispersion.pp index f01e4acc..9da17b1f 100644 --- a/manifests/dispersion.pp +++ b/manifests/dispersion.pp @@ -14,34 +14,44 @@ # [*auth_url*] # String. The full URL to the authentication endpoint (eg. keystone) # Optional. Defaults to '127.0.0.1'. +# # [*auth_user*] # String. The Swift username to use to run the tools. # Optional. Defaults to 'dispersion'. +# # [*auth_tenant*] # String. The user's tenant/project. # Optional. Defaults to 'services'. +# # [*auth_pass*] # String. The user's password. # Optional. Defaults to 'dispersion_password'. +# # [*auth_version*] # String. The version to pass to the 'swift' command. # Use '2.0' when using Keystone. # Optional. Defaults to '2.0' +# # [*endpoint_type*] # String. The ability to choose which Swift endpoint to use. # Optional. Defaults to 'publicURL'. +# # [*swift_dir*] # String. The path to swift configuration folder # Optional. Defaults to '/etc/swift'. +# # [*coverage*] # Integer. The percentage of partitions to cover. # Optional. Defaults to 1 +# # [*retries*] # Integer. Number of retries. # Optional. Defaults to 5. +# # [*concurrency*] # Integer. Process concurrency. # Optional. Defaults to 25. +# # [*dump_json*] # 'yes' or 'no'. Should 'swift-dispersion-report' dump json results ? # Optional. Defaults to no. @@ -56,7 +66,6 @@ # # Francois Charlier fcharlier@ploup.net # - class swift::dispersion ( $auth_url = 'http://127.0.0.1:5000/v2.0/', $auth_user = 'dispersion', diff --git a/manifests/init.pp b/manifests/init.pp index db693a6d..088ed246 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,6 +1,7 @@ # 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. @@ -48,8 +49,8 @@ class swift( File { owner => 'swift', group => 'swift', require => Package['swift'] } file { '/home/swift': - ensure => directory, - mode => '0700', + ensure => directory, + mode => '0700', } file { '/etc/swift': @@ -67,8 +68,8 @@ class swift( } file { '/etc/swift/swift.conf': - ensure => present, - mode => '0660', + ensure => present, + mode => '0660', } swift_config { 'swift-hash/swift_hash_path_suffix': diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index e1529517..b3b3709f 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -5,8 +5,9 @@ # # The user is given the admin role in the services tenant. # -# === Parameters -# [*auth_user*] +# === Parameters: +# +# [*auth_name*] # String. The name of the user. # Optional. Defaults to 'swift'. # @@ -14,8 +15,64 @@ # String. The user's password. # Optional. Defaults to 'swift_password'. # +# [*port*] +# (Optional) Port for endpoint. +# Defaults to '8080'. +# +# [*public_port*] +# (Optional) Port for endpoint. +# Defaults to '8080'. +# +# [*tenant*] +# (Optional) The tenant to use for the swift service user +# Defaults to 'services' +# +# [*email*] +# (Optional) The email address for the swift service user +# Defaults to 'swift@localhost' +# +# [*region*] +# (Optional) The region in which to place the endpoints +# Defaults to 'RegionOne' +# # [*operator_roles*] -# Array of strings. List of roles Swift considers as admin. +# (Optional) Array of strings. List of roles Swift considers as admin. +# Defaults to '['admin', 'SwiftOperator']' +# +# [*public_protocol*] +# (Optional) Protocol to use for the public endpoint. Can be http or https. +# Defaults to 'http' +# +# [*public_address*] +# (Optional) Public address for endpoint. +# Defaults to '127.0.0.1'. +# +# [*admin_protocol*] +# (Optional) Protocol for admin endpoints. +# Defaults to 'http'. +# +# [*admin_address*] +# (Optional) Admin address for endpoint. +# Defaults to '127.0.0.1'. +# +# [*internal_protocol*] +# Protocol for internal endpoints. Defaults to 'http'. +# +# [*internal_address*] +# (Optional) Internal address for endpoint. +# Defaults to '127.0.0.1'. +# +# [*configure_endpoint*] +# (optional) Whether to create the endpoint. +# Defaults to true +# +# [*configure_s3_endpoint*] +# (optional) Whether to create the S3 endpoint. +# Defaults to true +# +# [*endpoint_prefix*] +# (optional) The prefix endpoint, used for endpoint URL. +# Defaults to 'AUTH' # # [*service_name*] # (optional) Name of the service. @@ -86,7 +143,7 @@ class swift::keystone::auth( internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/${endpoint_prefix}_%(tenant_id)s", } - keystone::resource::service_identity { "swift_s3": + keystone::resource::service_identity { 'swift_s3': configure_user => false, configure_user_role => false, configure_endpoint => $configure_s3_endpoint, @@ -106,6 +163,6 @@ class swift::keystone::auth( } # Backward compatibility - Keystone_user["$auth_name"] -> Keystone_user_role["${auth_name}@${tenant}"] + Keystone_user[$auth_name] -> Keystone_user_role["${auth_name}@${tenant}"] } diff --git a/manifests/keystone/dispersion.pp b/manifests/keystone/dispersion.pp index e9993b05..685ce655 100644 --- a/manifests/keystone/dispersion.pp +++ b/manifests/keystone/dispersion.pp @@ -17,11 +17,18 @@ # String. The user's password. # Optional. Defaults to 'dispersion_password'. # +# [*email*] +# (Optional) The email address for the swift service user +# Defaults to 'swift@localhost' +# +# [*tenant*] +# (Optional) The tenant to use for the swift service user +# Defaults to 'services' +# # === Authors # # Francois Charlier fcharlier@ploup.net # - class swift::keystone::dispersion( $auth_user = 'dispersion', $auth_pass = 'dispersion_password', diff --git a/manifests/params.pp b/manifests/params.pp index 4b71a924..feaa197d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,3 +1,5 @@ +# == Class: swift::params +# class swift::params { case $::osfamily { 'Debian': { diff --git a/manifests/proxy.pp b/manifests/proxy.pp index d89fea92..d2838566 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -37,6 +37,34 @@ # Has to be set to true for tempauth. # Defaults to true. # +# [*log_headers*] +# (optional) If True, log headers in each request +# Defaults to False. +# +# [*log_udp_host*] +# (optional) If not set, the UDP receiver for syslog is disabled. +# Defaults to an empty string +# +# [*log_udp_port*] +# (optional) Port value for UDP receiver, if enabled. +# Defaults to an empty string +# +# [*log_address*] +# (optional) Location where syslog sends the logs to. +# Defaults to '/dev/log'. +# +# [*log_level*] +# (optional) Log level. +# Defaults to 'INFO'. +# +# [*log_facility*] +# (optional) Log level +# Defaults to 'LOG_LOCAL1'. +# +# [*log_handoffs*] +# (optional) If True, the proxy will log whenever it has to failover to a handoff node +# Defaults to true. +# # [*read_affinity*] # (optional) Configures the read affinity of proxy-server. # Defaults to undef. diff --git a/manifests/proxy/account_quotas.pp b/manifests/proxy/account_quotas.pp index 94a68ee6..d3a77c79 100644 --- a/manifests/proxy/account_quotas.pp +++ b/manifests/proxy/account_quotas.pp @@ -17,7 +17,6 @@ # # Configure Swift Account Quotas # - class swift::proxy::account_quotas() { concat::fragment { 'swift_account_quotas': target => '/etc/swift/proxy-server.conf', diff --git a/manifests/proxy/authtoken.pp b/manifests/proxy/authtoken.pp index 71117522..23ec71a1 100644 --- a/manifests/proxy/authtoken.pp +++ b/manifests/proxy/authtoken.pp @@ -3,33 +3,63 @@ # for swift proxy # # == Parameters -# [admin_token] Keystone admin token that can serve as a shared secret +# +# [*admin_token*] +# Keystone admin token that can serve as a shared secret # for authenticating. If this is choosen if is used instead of a user,tenant,password. # Optional. Defaults to false. -# [admin_user] User used to authenticate service. +# +# [*admin_user*] +# User used to authenticate service. # Optional. Defaults to 'swift'. -# [admin_tenant_name] Tenant used to authenticate service. +# +# [*admin_tenant_name*] +# Tenant used to authenticate service. # Optional. Defaults to 'services'. -# [admin_password] Password used with user to authenticate service. +# +# [*admin_password*] +# Password used with user to authenticate service. # Optional. Defaults to 'password'. -# [delay_auth_decision] Set to 1 to support token-less access (anonymous access, -# tempurl, ...) +# +# [*delay_auth_decision*] +# Set to 1 to support token-less access (anonymous access, tempurl, ...) # Optional, Defaults to 0 -# [auth_host] Host providing the keystone service API endpoint. Optional. +# +# [*auth_host*] +# Host providing the keystone service API endpoint. Optional. # Defaults to 127.0.0.1 -# [auth_port] Port where keystone service is listening. Optional. +# +# [*auth_port*] +# Port where keystone service is listening. Optional. # Defaults to 3557. -# [auth_protocol] Protocol to use to communicate with keystone. Optional. +# +# [*auth_protocol*] +# Protocol to use to communicate with keystone. Optional. # Defaults to https. -# [auth_admin_prefix] path part of the auth url. Optional. +# +# [*auth_admin_prefix*] +# Path part of the auth url. Optional. # This allows admin auth URIs like http://host/keystone/admin/v2.0. # Defaults to false for empty. It defined, should be a string with a leading '/' and no trailing '/'. -# [auth_uri] The public auth url to redirect unauthenticated requests. +# +# [*auth_uri*] +# The public auth url to redirect unauthenticated requests. # Defaults to false to be expanded to '${auth_protocol}://${auth_host}:5000'. # Should be set to your public keystone endpoint (without version). -# [signing_dir] The cache directory for signing certificates. +# +# [*identity_uri*] +# identity_uri points to the Keystone Admin service. This information is +# used by the middleware to actually query Keystone about the validity of the +# authentication tokens. It is not necessary to append any Keystone API version +# number to this URI. +# Defaults to false. +# +# [*signing_dir*] +# The cache directory for signing certificates. # Defaults to '/var/cache/swift' -# [cache] the cache backend to use +# +# [*cache*] +# The cache backend to use # Optional. Defaults to 'swift.cache' # # == Authors @@ -40,7 +70,6 @@ # # Copyright 2012 Puppetlabs Inc, unless otherwise noted. # - class swift::proxy::authtoken( $admin_user = 'swift', $admin_tenant_name = 'services', diff --git a/manifests/proxy/bulk.pp b/manifests/proxy/bulk.pp index 7110e023..e5e1897d 100644 --- a/manifests/proxy/bulk.pp +++ b/manifests/proxy/bulk.pp @@ -37,7 +37,6 @@ # while its processing the request. # Default to 60. # - class swift::proxy::bulk( $max_containers_per_extraction = '10000', $max_failed_extractions = '1000', diff --git a/manifests/proxy/catch_errors.pp b/manifests/proxy/catch_errors.pp index 452b91f5..c1f88fbc 100644 --- a/manifests/proxy/catch_errors.pp +++ b/manifests/proxy/catch_errors.pp @@ -15,7 +15,6 @@ # # Copyright 2012 eNovance licensing@enovance.com # - class swift::proxy::catch_errors() { concat::fragment { 'swift_catch_errors': diff --git a/manifests/proxy/ceilometer.pp b/manifests/proxy/ceilometer.pp index eb9a5a07..c4d90bb5 100644 --- a/manifests/proxy/ceilometer.pp +++ b/manifests/proxy/ceilometer.pp @@ -5,6 +5,12 @@ # # puppet-ceilometer (http://github.com/enovance/puppet-ceilometer) # +# == Parameters +# +# [*ensure*] +# Enable or not ceilometer fragment +# Defaults to 'present' +# # == Examples # # == Authors diff --git a/manifests/proxy/container_quotas.pp b/manifests/proxy/container_quotas.pp index 19e95129..f423443a 100644 --- a/manifests/proxy/container_quotas.pp +++ b/manifests/proxy/container_quotas.pp @@ -17,7 +17,6 @@ # # Configure Swift Container Quotas # - class swift::proxy::container_quotas() { concat::fragment { 'swift_container_quotas': target => '/etc/swift/proxy-server.conf', diff --git a/manifests/proxy/crossdomain.pp b/manifests/proxy/crossdomain.pp index d01d99fc..6530ded4 100644 --- a/manifests/proxy/crossdomain.pp +++ b/manifests/proxy/crossdomain.pp @@ -11,7 +11,6 @@ # cross_domain_policy value according to http://docs.openstack.org/developer/swift/crossdomain.html # default: # - class swift::proxy::crossdomain ( $cross_domain_policy = '', ) { diff --git a/manifests/proxy/formpost.pp b/manifests/proxy/formpost.pp index 19f68e26..597ef301 100644 --- a/manifests/proxy/formpost.pp +++ b/manifests/proxy/formpost.pp @@ -15,7 +15,6 @@ # # Copyright 2012 eNovance licensing@enovance.com # - class swift::proxy::formpost() { concat::fragment { 'swift-proxy-formpost': diff --git a/manifests/proxy/gatekeeper.pp b/manifests/proxy/gatekeeper.pp index 7d2b07f9..95d8237d 100644 --- a/manifests/proxy/gatekeeper.pp +++ b/manifests/proxy/gatekeeper.pp @@ -35,12 +35,11 @@ # # Copyright 2014 UnitedStack licensing@unitedstack.com # - class swift::proxy::gatekeeper( $log_name = 'gatekeeper', $log_facility = 'LOG_LOCAL0', $log_level = 'INFO', - $log_headers = 'false', + $log_headers = false, $log_address = '/dev/log' ) { diff --git a/manifests/proxy/keystone.pp b/manifests/proxy/keystone.pp index da57dce7..9e7c2362 100644 --- a/manifests/proxy/keystone.pp +++ b/manifests/proxy/keystone.pp @@ -2,21 +2,27 @@ # This class can be sed to manage keystone middleware for swift proxy # # == Parameters -# [operator_roles] a list of keystone roles a user must have to gain -# access to Swift. -# Optional. Defaults to ['admin', 'SwiftOperator'] +# +# [*operator_roles*] +# (Optional) a list of keystone roles a user must have to gain access to Swift. +# Defaults to ['admin', 'SwiftOperator'] # Must be an array of strings # Swift operator roles must be defined in swift::keystone::auth because # keystone API access is usually not available on Swift proxy nodes. -# [is_admin] Set to true to allow users to set ACLs on their account. -# Optional. Defaults to true. +# +# [*is_admin*] +# (Optional) Set to true to allow users to set ACLs on their account. +# Defaults to true. +# +# [*reseller_prefix*] +# (Optional) The prefix used for reseller URL. +# Defaults to 'AUTH_' # # == Authors # # Dan Bode dan@puppetlabs.com # Francois Charlier fcharlier@ploup.net # - class swift::proxy::keystone( $operator_roles = ['admin', 'SwiftOperator'], $is_admin = true, diff --git a/manifests/proxy/ratelimit.pp b/manifests/proxy/ratelimit.pp index f2293a19..7b465b34 100644 --- a/manifests/proxy/ratelimit.pp +++ b/manifests/proxy/ratelimit.pp @@ -1,21 +1,32 @@ +# == Class: swift::proxy::ratelimit # # Configure swift ratelimit. # # See Swift's ratelimit documentation for more detail about the values. # -# == Parameters -# [clock_accuracy] The accuracy of swift proxy servers' clocks. +# === Parameters +# +# [*clock_accuracy*] +# (optional) The accuracy of swift proxy servers' clocks. # 1000 is 1ms max difference. No rate should be higher than this. -# Optional. Defaults to 1000 -# [max_sleep_time_seconds] Time before the app returns a 498 response. -# Optional. Defaults to 60. -# [log_sleep_time_seconds] if >0, enables logging of sleeps longer than +# Defaults to 1000 +# +# [*max_sleep_time_seconds*] +# (optional) Time before the app returns a 498 response. +# Defaults to 60. +# +# [*log_sleep_time_seconds*] +# (optional) if >0, enables logging of sleeps longer than # the value. -# Optional. Defaults to 0. -# [rate_buffer_seconds] Time in second the rate counter can skip. -# Optional. Defaults to 5. -# [account_ratelimit] if >0, limits PUT and DELETE requests to containers -# Optional. Defaults to 0. +# Defaults to 0. +# +# [*rate_buffer_seconds*] +# (optional) Time in second the rate counter can skip. +# Defaults to 5. +# +# [*account_ratelimit*] +# (optional) if >0, limits PUT and DELETE requests to containers +# Defaults to 0. # # == Dependencies # diff --git a/manifests/proxy/s3token.pp b/manifests/proxy/s3token.pp index feebf306..9d8883f8 100644 --- a/manifests/proxy/s3token.pp +++ b/manifests/proxy/s3token.pp @@ -1,13 +1,20 @@ +# == Class: swift::proxy::s3token # # Configure swift s3token. # -# == Parameters -# [auth_host] the keystone host -# Optional. Defaults to 127.0.0.1 -# [auth_port] the Keystone client API port -# Optional. Defaults to 5000 -# [auth_protocol] http or https -# Optional. Defaults to http +# === Parameters +# +# [*auth_host*] +# (optional) The keystone host +# Defaults to 127.0.0.1 +# +# [*auth_port*] +# (optional) The Keystone client API port +# Defaults to 5000 +# +# [*auth_protocol*] +# (optional) http or https +# Defaults to http # # == Dependencies # diff --git a/manifests/proxy/slo.pp b/manifests/proxy/slo.pp index fef5799f..20601be8 100644 --- a/manifests/proxy/slo.pp +++ b/manifests/proxy/slo.pp @@ -40,7 +40,6 @@ # # Copyright 2014 UnitedStack licensing@unitedstack.com # - class swift::proxy::slo ( $max_manifest_segments = '1000', $max_manifest_size = '2097152', diff --git a/manifests/proxy/staticweb.pp b/manifests/proxy/staticweb.pp index ad588f78..3531751d 100644 --- a/manifests/proxy/staticweb.pp +++ b/manifests/proxy/staticweb.pp @@ -15,7 +15,6 @@ # # Copyright 2012 eNovance licensing@enovance.com # - class swift::proxy::staticweb() { concat::fragment { 'swift-proxy-staticweb': diff --git a/manifests/proxy/swauth.pp b/manifests/proxy/swauth.pp index 40de3cad..923e9b7e 100644 --- a/manifests/proxy/swauth.pp +++ b/manifests/proxy/swauth.pp @@ -1,5 +1,20 @@ +# == Class: swift::proxy::swauth +# +# === Parameters: +# +# [*package_ensure*] +# The status of the python-swauth package. +# Defaults to 'present' +# # [*swauth_endpoint*] -# [*swauth_super_admin_user*] +# (optional) The endpoint used to autenticate to Swauth WSGI. +# Defaults to '127.0.0.1' +# +# [*swauth_super_admin_key*] +# (optional) The Swauth WSGI filter admin key. +# Defaults to 'swauthkey' +# +# class swift::proxy::swauth( $swauth_endpoint = '127.0.0.1', $swauth_super_admin_key = 'swauthkey', @@ -7,8 +22,8 @@ class swift::proxy::swauth( ) { package { 'python-swauth': - ensure => $package_ensure, - before => Package['swift-proxy'], + ensure => $package_ensure, + before => Package['swift-proxy'], } concat::fragment { 'swift_proxy_swauth': diff --git a/manifests/proxy/swift3.pp b/manifests/proxy/swift3.pp index 4396d6f3..e13896b2 100644 --- a/manifests/proxy/swift3.pp +++ b/manifests/proxy/swift3.pp @@ -3,6 +3,12 @@ # # == Dependencies # +# == Parameters +# +# [*ensure*] +# Enable or not ceilometer fragment +# Defaults to 'present' +# # == Examples # # == Authors diff --git a/manifests/proxy/tempauth.pp b/manifests/proxy/tempauth.pp index 29add9f1..d87deb2b 100644 --- a/manifests/proxy/tempauth.pp +++ b/manifests/proxy/tempauth.pp @@ -1,3 +1,5 @@ +# == class: swift::proxy::tempauth +# class swift::proxy::tempauth() { concat::fragment { 'swift-proxy-swauth': diff --git a/manifests/proxy/tempurl.pp b/manifests/proxy/tempurl.pp index d83c4d3e..200337b1 100644 --- a/manifests/proxy/tempurl.pp +++ b/manifests/proxy/tempurl.pp @@ -15,7 +15,6 @@ # # Copyright 2012 eNovance licensing@enovance.com # - class swift::proxy::tempurl() { concat::fragment { 'swift-proxy-tempurl': diff --git a/manifests/ringbuilder/create.pp b/manifests/ringbuilder/create.pp index a318f1e7..a37f4c9c 100644 --- a/manifests/ringbuilder/create.pp +++ b/manifests/ringbuilder/create.pp @@ -37,9 +37,9 @@ define swift::ringbuilder::create( validate_re($name, '^object|container|account$') exec { "create_${name}": - command => "swift-ring-builder /etc/swift/${name}.builder create ${part_power} ${replicas} ${min_part_hours}", - path => ['/usr/bin'], - creates => "/etc/swift/${name}.builder", + command => "swift-ring-builder /etc/swift/${name}.builder create ${part_power} ${replicas} ${min_part_hours}", + path => ['/usr/bin'], + creates => "/etc/swift/${name}.builder", } } diff --git a/manifests/ringserver.pp b/manifests/ringserver.pp index a6973676..6c142b58 100644 --- a/manifests/ringserver.pp +++ b/manifests/ringserver.pp @@ -1,6 +1,15 @@ +# == Class: swift::ringserver +# # Used to create an rsync server to serve up the ring databases via rsync # -# == Parameters +# === Parameters +# +# [*local_net_ip*] +# (required) ip address that the swift servers should bind to. +# +# [*max_connections*] +# (optional) maximum connections to rsync server +# Defaults to 5 # # == Dependencies # diff --git a/manifests/ringsync.pp b/manifests/ringsync.pp index c84c5df5..bb956cc3 100644 --- a/manifests/ringsync.pp +++ b/manifests/ringsync.pp @@ -1,3 +1,5 @@ +# == Define: swift::ringsync +# define swift::ringsync( $ring_server ) { diff --git a/manifests/storage/account.pp b/manifests/storage/account.pp index a4398c3e..fa460f51 100644 --- a/manifests/storage/account.pp +++ b/manifests/storage/account.pp @@ -35,18 +35,18 @@ class swift::storage::account( } service { 'swift-account-reaper': - ensure => $service_ensure, - name => $::swift::params::account_reaper_service_name, - enable => $enabled, - provider => $::swift::params::service_provider, - require => Package['swift-account'], + ensure => $service_ensure, + name => $::swift::params::account_reaper_service_name, + enable => $enabled, + provider => $::swift::params::service_provider, + require => Package['swift-account'], } service { 'swift-account-auditor': - ensure => $service_ensure, - name => $::swift::params::account_auditor_service_name, - enable => $enabled, - provider => $::swift::params::service_provider, - require => Package['swift-account'], + ensure => $service_ensure, + name => $::swift::params::account_auditor_service_name, + enable => $enabled, + provider => $::swift::params::service_provider, + require => Package['swift-account'], } } diff --git a/manifests/storage/all.pp b/manifests/storage/all.pp index c1a77bb0..7ab7a0cb 100644 --- a/manifests/storage/all.pp +++ b/manifests/storage/all.pp @@ -2,20 +2,49 @@ # configures all storage types # on the same node # -# [*storeage_local_net_ip*] ip address that the swift servers should +# [*storage_local_net_ip*] ip address that the swift servers should # bind to. Required +# # [*devices*] The path where the managed volumes can be found. # This assumes that all servers use the same path. # Optional. Defaults to /srv/node/ +# # [*object_port*] Port where object storage server should be hosted. # Optional. Defaults to 6000. +# # [*allow_versions*] Boolean to enable the versioning in swift container # Optional. Default to false. +# # [*container_port*] Port where the container storage server should be hosted. # Optional. Defaults to 6001. +# # [*account_port*] Port where the account storage server should be hosted. # Optional. Defaults to 6002. # +# [*object_pipeline*] +# (optional) Specify the object pipeline +# Defaults to undef +# +# [*container_pipeline*] +# (optional) Specify the container pipeline +# Defaults to undef +# +# [*allow_versions*] +# (optional) Enable/Disable object versioning feature +# Defaults to false +# +# [*mount_check*] +# (optional) Whether or not check if the devices are mounted +# to prevent accidentally writing to the root device +# Defaults to false +# +# [*account_pipeline*] +# (optional) Specify the account pipeline +# Defaults to undef +# +# [*log_facility*] +# (optional) Syslog log facility +# Defaults to 'LOG_LOCAL2' # class swift::storage::all( $storage_local_net_ip, diff --git a/manifests/storage/container.pp b/manifests/storage/container.pp index 741dcba0..e7187f64 100644 --- a/manifests/storage/container.pp +++ b/manifests/storage/container.pp @@ -1,5 +1,6 @@ # # === Parameters +# # [*enabled*] # (optional) Should the service be enabled. # Defaults to true @@ -39,19 +40,19 @@ class swift::storage::container( } service { 'swift-container-updater': - ensure => $service_ensure, - name => $::swift::params::container_updater_service_name, - enable => $enabled, - provider => $::swift::params::service_provider, - require => Package['swift-container'], + ensure => $service_ensure, + name => $::swift::params::container_updater_service_name, + enable => $enabled, + provider => $::swift::params::service_provider, + require => Package['swift-container'], } service { 'swift-container-auditor': - ensure => $service_ensure, - name => $::swift::params::container_auditor_service_name, - enable => $enabled, - provider => $::swift::params::service_provider, - require => Package['swift-container'], + ensure => $service_ensure, + name => $::swift::params::container_auditor_service_name, + enable => $enabled, + provider => $::swift::params::service_provider, + require => Package['swift-container'], } if $::operatingsystem == 'Ubuntu' { @@ -65,10 +66,10 @@ class swift::storage::container( target => '/lib/init/upstart-job', } service { 'swift-container-sync': - ensure => $service_ensure, - enable => $enabled, - provider => $::swift::params::service_provider, - require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync'] + ensure => $service_ensure, + enable => $enabled, + provider => $::swift::params::service_provider, + require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync'] } } } diff --git a/manifests/storage/disk.pp b/manifests/storage/disk.pp index ea3109a9..85c7c157 100644 --- a/manifests/storage/disk.pp +++ b/manifests/storage/disk.pp @@ -31,7 +31,7 @@ # } # # TODO(yuxcer): maybe we can remove param $base_dir - +# define swift::storage::disk( $base_dir = '/dev', $mnt_base_dir = '/srv/node', @@ -47,9 +47,9 @@ define swift::storage::disk( } exec { "create_partition_label-${name}": - command => "parted -s ${base_dir}/${name} mklabel gpt", - path => ['/usr/bin/', '/sbin','/bin'], - onlyif => ["test -b ${base_dir}/${name}","parted ${base_dir}/${name} print|tail -1|grep 'Error'"], + command => "parted -s ${base_dir}/${name} mklabel gpt", + path => ['/usr/bin/', '/sbin','/bin'], + onlyif => ["test -b ${base_dir}/${name}","parted ${base_dir}/${name} print|tail -1|grep 'Error'"], } swift::storage::xfs { $name: diff --git a/manifests/storage/ext4.pp b/manifests/storage/ext4.pp index 24879140..a866445b 100644 --- a/manifests/storage/ext4.pp +++ b/manifests/storage/ext4.pp @@ -26,11 +26,11 @@ define swift::storage::ext4( } swift::storage::mount { $name: - device => $device, - mnt_base_dir => $mnt_base_dir, - subscribe => Exec["mkfs-${name}"], - loopback => $loopback, - fstype => 'ext4', + device => $device, + mnt_base_dir => $mnt_base_dir, + subscribe => Exec["mkfs-${name}"], + loopback => $loopback, + fstype => 'ext4', } } diff --git a/manifests/storage/loopback.pp b/manifests/storage/loopback.pp index 323fb015..4972764e 100644 --- a/manifests/storage/loopback.pp +++ b/manifests/storage/loopback.pp @@ -29,10 +29,10 @@ define swift::storage::loopback( } exec { "create_partition-${name}": - command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}", - path => ['/usr/bin/', '/bin'], - unless => "test -f ${base_dir}/${name}", - require => File[$base_dir], + command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}", + path => ['/usr/bin/', '/bin'], + unless => "test -f ${base_dir}/${name}", + require => File[$base_dir], } $storage_params = { diff --git a/manifests/storage/node.pp b/manifests/storage/node.pp index 9c105e1a..7f7608db 100644 --- a/manifests/storage/node.pp +++ b/manifests/storage/node.pp @@ -30,8 +30,8 @@ define swift::storage::node( config_file_path => 'object-server.conf', } ring_object_device { "${storage_local_net_ip}:60${name}0/${name}": - zone => $zone, - weight => $weight, + zone => $zone, + weight => $weight, } swift::storage::server { "60${name}1": @@ -39,8 +39,8 @@ define swift::storage::node( config_file_path => 'container-server.conf', } ring_container_device { "${storage_local_net_ip}:60${name}1/${name}": - zone => $zone, - weight => $weight, + zone => $zone, + weight => $weight, } swift::storage::server { "60${name}2": @@ -48,8 +48,8 @@ define swift::storage::node( config_file_path => 'account-server.conf', } ring_account_device { "${storage_local_net_ip}:60${name}2/${name}": - zone => $zone, - weight => $weight, + zone => $zone, + weight => $weight, } } diff --git a/manifests/storage/object.pp b/manifests/storage/object.pp index 587c60aa..eb6a2c7a 100644 --- a/manifests/storage/object.pp +++ b/manifests/storage/object.pp @@ -35,18 +35,18 @@ class swift::storage::object( } service { 'swift-object-updater': - ensure => $service_ensure, - name => $::swift::params::object_updater_service_name, - enable => $enabled, - provider => $::swift::params::service_provider, - require => Package['swift-object'], + ensure => $service_ensure, + name => $::swift::params::object_updater_service_name, + enable => $enabled, + provider => $::swift::params::service_provider, + require => Package['swift-object'], } service { 'swift-object-auditor': - ensure => $service_ensure, - name => $::swift::params::object_auditor_service_name, - enable => $enabled, - provider => $::swift::params::service_provider, - require => Package['swift-object'], + ensure => $service_ensure, + name => $::swift::params::object_auditor_service_name, + enable => $enabled, + provider => $::swift::params::service_provider, + require => Package['swift-object'], } } diff --git a/manifests/storage/xfs.pp b/manifests/storage/xfs.pp index 11224c50..7bf7d99d 100644 --- a/manifests/storage/xfs.pp +++ b/manifests/storage/xfs.pp @@ -50,10 +50,10 @@ define swift::storage::xfs( } swift::storage::mount { $name: - device => $target_device, - mnt_base_dir => $mnt_base_dir, - subscribe => Exec["mkfs-${name}"], - loopback => $loopback, + device => $target_device, + mnt_base_dir => $mnt_base_dir, + subscribe => Exec["mkfs-${name}"], + loopback => $loopback, } } diff --git a/metadata.json b/metadata.json index 4273eeb0..6b188647 100644 --- a/metadata.json +++ b/metadata.json @@ -3,7 +3,7 @@ "version": "5.0.0", "author": "Puppet Labs and StackForge Contributors", "summary": "Puppet module for OpenStack Swift", - "license": "Apache License 2.0", + "license": "Apache-2.0", "source": "git://github.com/stackforge/puppet-swift.git", "project_page": "https://launchpad.net/puppet-swift", "issues_url": "https://bugs.launchpad.net/puppet-swift",