Permalink
Browse files

Add explicit class params for setting storeage ports

Previously, all of the ports used by the storage
class were hardcoded.

This commits adds the following class parameters to
the swift::storage class to allow for configuration
of the ports used by a storage server:
  - object_port
  - container_port
  - account_port
  • Loading branch information...
1 parent b7a8f0c commit 0955f3cd1c19bdbf853648babd5ae486b0c87506 Dan Bode committed Feb 14, 2012
Showing with 12 additions and 3 deletions.
  1. +12 −3 manifests/storage.pp
View
@@ -6,6 +6,12 @@
# == Parameters
# [*storeage_local_net_ip*]
# [*package_ensure*]
+# [*object_port*] Port where object storage server should be hosted.
+# Optional. Defaults to 6000.
+# [*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.
# == Dependencies
#
# == Examples
@@ -23,6 +29,9 @@
# TODO - should this default to 0.0.0.0?
$storage_local_net_ip = '127.0.0.1',
$devices = '/srv/nodes'
+ $object_port = '6000',
+ $container_port = '6001',
+ $account_port = '6002'
) inherits swift {
@@ -57,7 +66,7 @@
ensure => $package_ensure,
}
- swift::storage::server { '6002':
+ swift::storage::server { $account_port:
type => 'account',
config_file_path => 'account-server.conf',
}
@@ -75,7 +84,7 @@
ensure => $package_ensure,
}
- swift::storage::server { '6001':
+ swift::storage::server { $container_port:
type => 'container',
config_file_path => 'container-server.conf',
}
@@ -93,7 +102,7 @@
ensure => $package_ensure,
}
- swift::storage::server { '6000':
+ swift::storage::server { $object_port:
type => 'object',
config_file_path => 'object-server.conf',
}

0 comments on commit 0955f3c

Please sign in to comment.