commit
682db69b82
|
@ -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',
|
||||
}
|
||||
}
|
|
@ -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 @@ class glance::api(
|
|||
$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']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ class glance(
|
|||
ensure => directory,
|
||||
owner => 'glance',
|
||||
group => 'root',
|
||||
mode => 770,
|
||||
mode => '0770',
|
||||
require => Package['glance']
|
||||
}
|
||||
package { 'glance': ensure => $package_ensure }
|
||||
|
|
|
@ -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 @@ describe 'glance' do
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue