Permalink
Browse files

Merge pull request #14 from bodepd/master

First Post Diablo commit
  • Loading branch information...
2 parents 43f2c73 + ec1120e commit 682db69b82c32e328748932d08158d728bd2bdff @bodepd committed Mar 16, 2012
Showing with 94 additions and 19 deletions.
  1. +31 −0 README.markdown
  2. +52 −8 manifests/api.pp
  3. +1 −1 manifests/init.pp
  4. +8 −8 manifests/registry.pp
  5. +1 −1 spec/classes/glance_spec.rb
  6. +1 −1 templates/glance-api.conf.erb
View
@@ -0,0 +1,31 @@
+# PuppetLabs Glance module #
+
+This module provides a set of manifests that can be
+used to install and configure glance.
+
+It is currently targettting the essex release of OpenStack.
+
+For Daiblo support, use the Diablo branch.
+
+# Platforms #
+
+ Ubuntu 11.04 (Natty)
+ Ubuntu 11.10 (Oneiric)
+
+# Quick Start #
+
+ The below examples shows how the classes from this module can be
+ declared in site.pp to install both the glance registry and api services on
+ a node identified as glance.
+
+ In the below example, the default port for the registy service has been
+ overridden from its default value of 9191.
+
+ node glance {
+ class { 'glance::registry':
+ bind_port => '9393',
+ }
+ class { 'glance::api':
+ registry_port = '9393',
+ }
+ }
View
@@ -1,6 +1,50 @@
+# = Class: glance::api
+#
+# This class installs and configures the glance api server.
+#
+# == Paremeters:
+#
+# $log_verbose - rather to log the glance api service at verbose level.
+# Optional. Default: false
+#
+# $log_debug - rather to log the glance api service at debug level.
+# Optional. Default: false
+#
+# $default_store - Backend used to store glance dist images.
+# Optional. Default: file
+#
+# $bind_host - The address of the host to bind to.
+# Optional. Default: 0.0.0.0
+#
+# $bind_port - The port the server should bind to.
+# Optional. Default: 9292
+#
+# $registry_host - The address used to connecto to the registy service.
+# Optional. Default:
+#
+# $registry_port - The port of the Glance registry service.
+# Optional. Default: 9191
+#
+# $log_file - The path of file used for logging
+# Optional. Default: /var/log/glance/api.log
+#
+# $filesystem_store_datadir - Location where dist images are stored when
+# default_store == file.
+# Optional. Default: /var/lib/glance/images/
+#
+# $swift_store_auth_address - Optional. Default: '127.0.0.1:8080/v1.0/',
+#
+# $swift_store_user - Optional. Default:'jdoe',
+#
+# $swift_store_key - Optional. Default: 'a86850deb2742ec3cb41518e26aa2d89',
+#
+# $swift_store_container - 'glance',
+#
+# $swift_store_create_container_on_put - 'False'
+#
class glance::api(
- $log_verbose = 'false',
- $log_debug = 'false',
+ $log_verbose = false,
+ $log_debug = false,
$default_store = 'file',
$bind_host = '0.0.0.0',
$bind_port = '9292',
@@ -15,21 +59,21 @@
$swift_store_create_container_on_put = 'False'
) inherits glance {
- file { "/etc/glance/glance-api.conf":
+ file { '/etc/glance/glance-api.conf':
ensure => present,
owner => 'glance',
group => 'root',
- mode => 640,
+ mode => '0640',
content => template('glance/glance-api.conf.erb'),
- require => Class["glance"]
+ require => Class['glance']
}
- service { "glance-api":
+ service { 'glance-api':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
- subscribe => File["/etc/glance/glance-api.conf"],
- require => Class["glance"]
+ subscribe => File['/etc/glance/glance-api.conf'],
+ require => Class['glance']
}
}
View
@@ -5,7 +5,7 @@
ensure => directory,
owner => 'glance',
group => 'root',
- mode => 770,
+ mode => '0770',
require => Package['glance']
}
package { 'glance': ensure => $package_ensure }
View
@@ -1,27 +1,27 @@
class glance::registry(
- $log_verbose = 'false',
- $log_debug = 'false',
+ $log_verbose = false,
+ $log_debug = false,
$bind_host = '0.0.0.0',
$bind_port = '9191',
$log_file = '/var/log/glance/registry.log',
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
$sql_idle_timeout = '3600'
) inherits glance {
- file { "/etc/glance/glance-registry.conf":
+ file { '/etc/glance/glance-registry.conf':
ensure => present,
owner => 'glance',
group => 'root',
- mode => 640,
+ mode => '0640',
content => template('glance/glance-registry.conf.erb'),
- require => Class["glance"]
+ require => Class['glance']
}
- service { "glance-registry":
+ service { 'glance-registry':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
- subscribe => File["/etc/glance/glance-registry.conf"],
- require => Class["glance"]
+ subscribe => File['/etc/glance/glance-registry.conf'],
+ require => Class['glance']
}
}
@@ -23,7 +23,7 @@
it { should contain_file('/etc/glance/').with(
'ensure' => 'directory',
'owner' => 'glance',
- 'mode' => '770',
+ 'mode' => '0770',
'require' => 'Package[glance]'
)}
end
@@ -67,4 +67,4 @@ paste.app_factory = glance.api.v1:app_factory
paste.filter_factory = glance.api.middleware.version_negotiation:filter_factory
[filter:context]
-paste.filter_factory = glance.common.context:filter_factory
+paste.filter_factory = glance.common.context:filter_factory

0 comments on commit 682db69

Please sign in to comment.