Glance configuration is moved to scaleio openstack puppet module

Change-Id: I8e77ab4aa6ffcbaa9ede310c642f3085b8b8021c
This commit is contained in:
alexey-mr 2016-11-17 13:25:51 +03:00
parent 5fd55dbd81
commit 589502118f
4 changed files with 2 additions and 83 deletions

View File

@ -1,25 +1,5 @@
# The puppet configures OpenStack glance to use ScaleIO via Cinder.
define glance_config(
$config_file,
) {
ini_subsetting { "${config_file}: stores":
ensure => 'present',
path => $config_file,
section => 'glance_store',
setting => 'stores',
subsetting => 'glance.store.cinder.Store',
subsetting_separator => ',',
} ->
ini_setting { "${config_file}: default_store":
ensure => 'present',
path => $config_file,
section => 'glance_store',
setting => 'default_store',
value => 'cinder',
}
}
notice('MODULAR: scaleio: glance')
@ -31,40 +11,9 @@ if $scaleio['metadata']['enabled'] {
fail("glance task should be run only on controllers, but node ${::hostname} is not controller")
}
if $scaleio['use_scaleio_for_glance'] {
$glance_services = $::osfamily ? {
'RedHat' => ['openstack-glance-api', 'openstack-glance-registry', 'openstack-glance-glare'],
'Debian' => ['glance-api', 'glance-registry', 'glance-glare'],
}
$glance_api_config_file = '/etc/glance/glance-api.conf'
$glance_glare_config_file = '/etc/glance/glance-glare.conf'
package { ['python-cinderclient', 'python-os-brick', 'python-oslo.rootwrap']:
ensure => 'present',
} ->
class {'scaleio_openstack::glance':
} ->
file { "/etc/glance/rootwrap.conf":
ensure => $ensure,
source => "puppet:///modules/scaleio_fuel/glance_rootwrap.conf",
mode => '0755',
owner => 'root',
group => 'root',
} ->
file { "/etc/sudoers.d/glance_sudoers":
ensure => $ensure,
source => "puppet:///modules/scaleio_fuel/glance_sudoers",
mode => '0644',
owner => 'root',
group => 'root',
} ->
glance_config {"${glance_api_config_file}":
config_file => $glance_api_config_file
} ->
glance_config {"${glance_glare_config_file}":
config_file => $glance_glare_config_file
} ~>
service { $glance_services:
ensure => running,
enable => true,
}
} else {
notify { 'Skip glance configuration': }
}
}

View File

@ -1,27 +0,0 @@
# Configuration for glance-rootwrap
# This file should be owned by (and only-writeable by) the root user
[DEFAULT]
# List of directories to load filter definitions from (separated by ',').
# These directories MUST all be only writeable by root !
filters_path=/etc/glance/rootwrap.d
# List of directories to search executables in, in case filters do not
# explicitely specify a full path (separated by ',')
# If not specified, defaults to system PATH environment variable.
# These directories MUST all be only writeable by root !
exec_dirs=/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin
# Enable logging to syslog
# Default value is False
use_syslog=False
# Which syslog facility to use.
# Valid values include auth, authpriv, syslog, local0, local1...
# Default value is 'syslog'
syslog_log_facility=syslog
# Which messages to log.
# INFO means log all usage
# ERROR means only log unsuccessful attempts
syslog_log_level=ERROR

View File

@ -1,3 +0,0 @@
Defaults:glance !requiretty
glance ALL = (root) NOPASSWD: /usr/bin/glance-rootwrap /etc/glance/rootwrap.conf *