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:
@@ -5,9 +5,11 @@
|
|||||||
|
|
||||||
$proxy_local_net_ip='127.0.0.1'
|
$proxy_local_net_ip='127.0.0.1'
|
||||||
$swift_shared_secret='changeme'
|
$swift_shared_secret='changeme'
|
||||||
|
|
||||||
Exec { logoutput => true }
|
Exec { logoutput => true }
|
||||||
|
|
||||||
package { 'curl': ensure => present }
|
package { 'curl': ensure => present }
|
||||||
|
|
||||||
class { 'ssh::server::install': }
|
class { 'ssh::server::install': }
|
||||||
|
|
||||||
class { 'memcached':
|
class { 'memcached':
|
||||||
@@ -20,12 +22,12 @@ class { 'swift':
|
|||||||
package_ensure => latest,
|
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']:
|
swift::storage::loopback { ['1', '2', '3']:
|
||||||
require => Class['swift'],
|
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
|
# device that contains an endpoint for an object, account, and container
|
||||||
|
|
||||||
Swift::Storage::Node {
|
Swift::Storage::Node {
|
||||||
|
@@ -16,6 +16,7 @@ apt::source { 'puppet':
|
|||||||
release => 'natty',
|
release => 'natty',
|
||||||
key => '4BD6EC30',
|
key => '4BD6EC30',
|
||||||
}
|
}
|
||||||
|
|
||||||
# install the latest version of Puppet
|
# install the latest version of Puppet
|
||||||
package { 'puppet':
|
package { 'puppet':
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
|
@@ -1,12 +1,27 @@
|
|||||||
# Install and configure base swift components
|
# Install and configure base swift components
|
||||||
|
#
|
||||||
# == Parameters
|
# == Parameters
|
||||||
# [*swift_hash_suffix*] string of text to be used
|
# [*swift_hash_suffix*] string of text to be used
|
||||||
# as a salt when hashing to determine mappings in the ring.
|
# 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(
|
class swift(
|
||||||
$swift_hash_suffix,
|
$swift_hash_suffix,
|
||||||
# $swift_ssh_key,
|
# $swift_ssh_key,
|
||||||
|
@@ -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(
|
class swift::proxy(
|
||||||
# why did cloudbuilders default this to false?
|
# why did cloudbuilders default this to false?
|
||||||
$allow_account_management = true,
|
$allow_account_management = true,
|
||||||
@@ -74,8 +106,8 @@ post-stop exec /usr/bin/swift-init proxy-server stop',
|
|||||||
|
|
||||||
service { 'swift-proxy':
|
service { 'swift-proxy':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
|
||||||
provider => 'upstart',
|
provider => 'upstart',
|
||||||
|
enable => true,
|
||||||
subscribe => File['/etc/swift/proxy-server.conf'],
|
subscribe => File['/etc/swift/proxy-server.conf'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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(
|
class swift::ringbuilder(
|
||||||
$part_power = undef,
|
$part_power = undef,
|
||||||
|
@@ -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(
|
define swift::ringbuilder::create(
|
||||||
$part_power = 18,
|
$part_power = 18,
|
||||||
$replicas = 5,
|
$replicas = 5,
|
||||||
|
@@ -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() {
|
define swift::ringbuilder::rebalance() {
|
||||||
|
|
||||||
validate_re($name, '^object|container|account$')
|
validate_re($name, '^object|container|account$')
|
||||||
|
@@ -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(
|
class swift::storage(
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
|
Reference in New Issue
Block a user