Improve inline comments
Improve inline comments so that the example manifests can serve as a documented example.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# This example file is almost the
|
# This example file is almost the
|
||||||
# same as what I have been using
|
# same as what I have been using
|
||||||
# to build swift in my environment (which is based on vagrant)
|
# to build swift in my environment (which is based on vagrant)
|
||||||
|
#
|
||||||
$proxy_local_net_ip='127.0.0.1'
|
$proxy_local_net_ip='127.0.0.1'
|
||||||
$swift_shared_secret='changeme'
|
$swift_shared_secret='changeme'
|
||||||
|
|
||||||
|
@@ -1,28 +1,43 @@
|
|||||||
#
|
#
|
||||||
# Example file for building out a multi-node environment
|
# Example file for building out a multi-node environment
|
||||||
#
|
#
|
||||||
|
# This example creates nodes of the following roles:
|
||||||
# for this to work, you need to run the nodes in this order:
|
# swift_storage - nodes that host storage servers
|
||||||
|
# swift_proxy - nodes that serve as a swift proxy
|
||||||
|
# swift_ringbuilder - nodes that are responsible for
|
||||||
|
# rebalancing the rings
|
||||||
|
#
|
||||||
|
# This example assumes a few things:
|
||||||
|
# * the multi-node scenario requires a puppetmaster
|
||||||
|
# * it assumes that networking is correctly configured
|
||||||
|
#
|
||||||
|
# These nodes need to be brought up in a certain order
|
||||||
#
|
#
|
||||||
# 1. storage nodes
|
# 1. storage nodes
|
||||||
# 2. ringbuilder
|
# 2. ringbuilder
|
||||||
# 3. run the storage nodes again
|
# 3. run the storage nodes again (to synchronize the ring db)
|
||||||
|
# TODO - the code for this has not been written yet...
|
||||||
# 4. run the proxy
|
# 4. run the proxy
|
||||||
# 5. test that everything works!!
|
# 5. test that everything works!!
|
||||||
#
|
#
|
||||||
|
# This example file is what I used for testing
|
||||||
|
# in vagrant
|
||||||
#
|
#
|
||||||
# This example file is almost the
|
#
|
||||||
# same as what I have been using
|
# simple shared salt
|
||||||
# to build swift in my environment (which is based on vagrant)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$swift_shared_secret='changeme'
|
$swift_shared_secret='changeme'
|
||||||
|
# assumes that the ip address where all of the storage nodes
|
||||||
|
# will communicate is on eth1
|
||||||
$swift_local_net_ip = $ipaddress_eth1
|
$swift_local_net_ip = $ipaddress_eth1
|
||||||
|
|
||||||
Exec { logoutput => true }
|
Exec { logoutput => true }
|
||||||
|
|
||||||
|
#
|
||||||
|
# specifies that nodes with the cert names of
|
||||||
|
# swift_storage_1,2, and 3 will be assigned the
|
||||||
|
# role of swift_storage_nodes with in the respective
|
||||||
|
# zones of 1,2,3
|
||||||
|
#
|
||||||
node 'swift_storage_1' {
|
node 'swift_storage_1' {
|
||||||
|
|
||||||
$swift_zone = 1
|
$swift_zone = 1
|
||||||
@@ -42,6 +57,12 @@ node 'swift_storage_3' {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Specfies that a node with certname of swift_proxy
|
||||||
|
# will be assigned the role of swift proxy.
|
||||||
|
# In my testing environemnt, the proxy node also serves
|
||||||
|
# as the ringbuilder
|
||||||
|
#
|
||||||
node 'swift_proxy' {
|
node 'swift_proxy' {
|
||||||
|
|
||||||
class { 'role_swift_ringbuilder': }
|
class { 'role_swift_ringbuilder': }
|
||||||
@@ -57,6 +78,9 @@ node 'swift_ringbuilding' {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# classes that are used for role assignment
|
||||||
|
#
|
||||||
class role_swift {
|
class role_swift {
|
||||||
|
|
||||||
class { 'ssh::server::install': }
|
class { 'ssh::server::install': }
|
||||||
@@ -71,7 +95,8 @@ class role_swift {
|
|||||||
|
|
||||||
class role_swift_ringbuilder inherits role_swift {
|
class role_swift_ringbuilder inherits role_swift {
|
||||||
|
|
||||||
# collect all resource that we need to rebalance the ring
|
# collect all of the resources that are needed
|
||||||
|
# to rebalance the ring
|
||||||
Ring_object_device <<| |>>
|
Ring_object_device <<| |>>
|
||||||
Ring_container_device <<| |>>
|
Ring_container_device <<| |>>
|
||||||
Ring_account_device <<| |>>
|
Ring_account_device <<| |>>
|
||||||
@@ -87,6 +112,7 @@ class role_swift_ringbuilder inherits role_swift {
|
|||||||
|
|
||||||
class role_swift_proxy inherits role_swift {
|
class role_swift_proxy inherits role_swift {
|
||||||
|
|
||||||
|
# curl is only required so that I can run tests
|
||||||
package { 'curl': ensure => present }
|
package { 'curl': ensure => present }
|
||||||
|
|
||||||
class { 'memcached':
|
class { 'memcached':
|
||||||
|
@@ -1,27 +1,35 @@
|
|||||||
# this file
|
#
|
||||||
# contains puppet resources
|
# This file contains an example set of configuration that can be applied
|
||||||
# that I used to set up my
|
# to nodes before swift is installed on them.
|
||||||
# environment before installing swift
|
#
|
||||||
|
# This file is used to set up the basic environment that is used for
|
||||||
# set up all of the pre steps
|
# testing swift deployments.
|
||||||
# this shoud be run
|
#
|
||||||
|
# use the trunk repo for swift packages
|
||||||
# use the swift trunk ppa
|
|
||||||
class { 'swift::repo::trunk':}
|
class { 'swift::repo::trunk':}
|
||||||
|
|
||||||
|
#
|
||||||
|
# install the class apt and use 10.0.2.2:3128 as a proxy
|
||||||
|
#
|
||||||
class { 'apt':
|
class { 'apt':
|
||||||
proxy_host => '10.0.2.2',
|
proxy_host => '10.0.2.2',
|
||||||
proxy_port => '3128',
|
proxy_port => '3128',
|
||||||
disable_keys => true,
|
disable_keys => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
# use our apt repo
|
#
|
||||||
|
# use puppetlab's official apt repo to install the latest
|
||||||
|
# released version of puppet
|
||||||
|
#
|
||||||
apt::source { 'puppet':
|
apt::source { 'puppet':
|
||||||
location => 'http://apt.puppetlabs.com/ubuntu',
|
location => 'http://apt.puppetlabs.com/ubuntu',
|
||||||
release => 'natty',
|
release => 'natty',
|
||||||
key => '4BD6EC30',
|
key => '4BD6EC30',
|
||||||
}
|
}
|
||||||
|
|
||||||
# install the latest version of Puppet
|
#
|
||||||
|
# ensure that the latest version of puppet is installed
|
||||||
|
#
|
||||||
package { 'puppet':
|
package { 'puppet':
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
require => Apt::Source['puppet'],
|
require => Apt::Source['puppet'],
|
||||||
|
Reference in New Issue
Block a user