From 589502118f2eb4284696409bfac360c3f6d09152 Mon Sep 17 00:00:00 2001 From: alexey-mr Date: Thu, 17 Nov 2016 13:25:51 +0300 Subject: [PATCH] Glance configuration is moved to scaleio openstack puppet module Change-Id: I8e77ab4aa6ffcbaa9ede310c642f3085b8b8021c --- deployment_scripts/puppet/manifests/glance.pp | 55 +------------------ .../modules/scaleio_fuel/files/.gitkeep | 0 .../scaleio_fuel/files/glance_rootwrap.conf | 27 --------- .../modules/scaleio_fuel/files/glance_sudoers | 3 - 4 files changed, 2 insertions(+), 83 deletions(-) create mode 100644 deployment_scripts/puppet/modules/scaleio_fuel/files/.gitkeep delete mode 100644 deployment_scripts/puppet/modules/scaleio_fuel/files/glance_rootwrap.conf delete mode 100644 deployment_scripts/puppet/modules/scaleio_fuel/files/glance_sudoers diff --git a/deployment_scripts/puppet/manifests/glance.pp b/deployment_scripts/puppet/manifests/glance.pp index af768c5..ab5dafd 100644 --- a/deployment_scripts/puppet/manifests/glance.pp +++ b/deployment_scripts/puppet/manifests/glance.pp @@ -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': } } } diff --git a/deployment_scripts/puppet/modules/scaleio_fuel/files/.gitkeep b/deployment_scripts/puppet/modules/scaleio_fuel/files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/deployment_scripts/puppet/modules/scaleio_fuel/files/glance_rootwrap.conf b/deployment_scripts/puppet/modules/scaleio_fuel/files/glance_rootwrap.conf deleted file mode 100644 index 486da5a..0000000 --- a/deployment_scripts/puppet/modules/scaleio_fuel/files/glance_rootwrap.conf +++ /dev/null @@ -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 diff --git a/deployment_scripts/puppet/modules/scaleio_fuel/files/glance_sudoers b/deployment_scripts/puppet/modules/scaleio_fuel/files/glance_sudoers deleted file mode 100644 index a5a30a3..0000000 --- a/deployment_scripts/puppet/modules/scaleio_fuel/files/glance_sudoers +++ /dev/null @@ -1,3 +0,0 @@ -Defaults:glance !requiretty - -glance ALL = (root) NOPASSWD: /usr/bin/glance-rootwrap /etc/glance/rootwrap.conf *