Add inline docs to manifests

This commit adds some initial inline documentation
of the manifests.

It also performs some basic whitespace cleanup.
This commit is contained in:
Dan Bode 2012-02-13 15:39:18 -08:00
parent 7228c5cd95
commit 18d681943e
8 changed files with 141 additions and 11 deletions

View File

@ -5,9 +5,11 @@
$proxy_local_net_ip='127.0.0.1'
$swift_shared_secret='changeme'
Exec { logoutput => true }
package { 'curl': ensure => present }
class { 'ssh::server::install': }
class { 'memcached':
@ -20,12 +22,12 @@ class { 'swift':
package_ensure => latest,
}
# create xfs partitions on a loopback device and mount them
# create xfs partitions on a loopback device and mounts them
swift::storage::loopback { ['1', '2', '3']:
require => Class['swift'],
}
# sets up a storage node which is composed of a single
# sets up storage nodes which is composed of a single
# device that contains an endpoint for an object, account, and container
Swift::Storage::Node {

View File

@ -16,6 +16,7 @@ apt::source { 'puppet':
release => 'natty',
key => '4BD6EC30',
}
# install the latest version of Puppet
package { 'puppet':
ensure => latest,

View File

@ -1,12 +1,27 @@
# 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!
# This file should be the same on every node in the cluster.
#
# [*swift_ssh_key*] NOT YET IMPLEMENTED
# [*swift_ssh_key*] NOT YET IMPLEMENTED. I am not entirely sure what
# this key is intended to be used for.
# [*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,
# $swift_ssh_key,

View File

@ -1,7 +1,39 @@
# Installs and configures the swift proxy node.
#
# [*Parameters*]
#
# [*allow_account_management*]
# [*account_autocreate*] Rather accounts should automatically be created.
# I think this may be tempauth specific
# [*proxy_local_net_ip*] The address that the proxy will bind to.
# Optional. Defaults to 127.0.0.1
# TODO - this default is probably not ideal
# [*proxy_port*] Port that the swift proxy service will bind to.
# Optional. Defaults to 11211
# [*auth_type*] - Type of authorization to use.
# valid values are tempauth, swauth, and keystone.
# Optional. Defaults to tempauth.
# [*package_ensure*] Ensure state of the swift proxy package.
# Optional. Defaults to present.
#
# == sw auth specific configuration
# [*swauth_endpoint*]
# [*swauth_super_admin_user*]
#
# == Dependencies
#
# Class['memcached']
#
# == Examples
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
# [*auth_type*] - specified the type of authorization to use.
# valid values are tempauth, swauth, and keystone. Optional
# Defaults to keystone
class swift::proxy(
# why did cloudbuilders default this to false?
$allow_account_management = true,
@ -74,8 +106,8 @@ post-stop exec /usr/bin/swift-init proxy-server stop',
service { 'swift-proxy':
ensure => running,
enable => true,
provider => 'upstart',
enable => true,
subscribe => File['/etc/swift/proxy-server.conf'],
}
}

View File

@ -1,5 +1,28 @@
# Used to configure nodes that are responsible for managing swift rings.
# Rings are used to make decitions about how to map objects in the cluster
#
# role for deploying
# Specifies the following relationship:
# Rings shoudl be created before any devices are added to them
# Rings should be rebalanced if anything changes
# == Parameters
# # TODO - I need to review the ringbuilder docs
# [*part_power*]
# [*replicas*]
# [*min_part_hours*]
#
# == Dependencies
#
# Class['swift']
#
# == Examples
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
class swift::ringbuilder(
$part_power = undef,

View File

@ -1,3 +1,35 @@
# Creates a swift ring using ringbuilder.
# It creates the associated ring file as /etc/swift/${name}.builder
# It will not create a ring if the file already exists.
#
# == Parameters
#
# [*name*] The type of ring to create. Accepts object|container|account
# [*part_power*] Number of partitions in the ring. (specified as the power of 2)
# Optional. Defaults to 18 (2^18)
# [*replicas] Number of replicas to store.
# Optional. Defaults to 5
# TODO should it default to 3?
# [*min_part_hours*] Time before a partition can be moved.
# Optional. Defaults to 1.
# TODO should it be 24?
#
# == Examples
#
# swift::ringbuilder::create { 'account':
# part_power => 19,
# replicas => 3,
# min_part_hours => 24,
# }
#
# == Authors
#
# Pupppetlabs <info@puppetlabs.com>
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
define swift::ringbuilder::create(
$part_power = 18,
$replicas = 5,

View File

@ -1,3 +1,11 @@
# Swift::Ring::Rebalance
# Reblances the specified ring. Assumes that the ring already exists
# and is stored at /etc/swift/${name}.builder
#
# == Parameters
#
# [*name*] Type of ring to rebalance. The ring file is assumed to be at the path
# /etc/swift/${name}.builder
define swift::ringbuilder::rebalance() {
validate_re($name, '^object|container|account$')

View File

@ -1,5 +1,22 @@
# Performs all global configuration required
# for creating a swift storage node.
# Includes:
# installing an rsync server
# installs storeage packages (object,account,containers)
# == Parameters
# [*storeage_local_net_ip*]
# [*package_ensure*]
# == Dependencies
#
# class for building out a storage node
# == Examples
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
class swift::storage(
$package_ensure = 'present',