Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Juno #253

Merged
merged 10 commits into from
Feb 10, 2015
20 changes: 10 additions & 10 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ mod 'aviator',
:git => 'https://github.com/aimonb/puppet_aviator.git'

mod 'ceilometer',
:commit => '953ce5032cb332bf8a15e78358ee8af6f14dd7f0',
:commit => '01f0a3057d3bdad97637a8c19b24f010a8c070e8',
:git => 'https://github.com/stackforge/puppet-ceilometer.git'

mod 'certmonger',
:commit => '3f86b9973fc30c14a066b0f215023d5f1398b874',
:git => 'https://github.com/rcritten/puppet-certmonger.git'

mod 'cinder',
:commit => 'f6af237764cca3319594e731b6b808a7c557cd4c',
:commit => 'a1e9f54d7e1840b1bd03acce5a1fd3199f803ac5',
:git => 'https://github.com/stackforge/puppet-cinder.git'

mod 'common',
Expand All @@ -35,7 +35,7 @@ mod 'galera',
:git => 'https://github.com/rohara/puppet-galera.git'

mod 'glance',
:commit => '9fb3db4a693b6839c2caa45df4cd37f9c21451de',
:commit => '637bc4c7f64c7baf6f1814b5012eaf7ba38f681a',
:git => 'https://github.com/stackforge/puppet-glance.git'

mod 'gluster',
Expand All @@ -47,11 +47,11 @@ mod 'haproxy',
:git => 'https://github.com/puppetlabs/puppetlabs-haproxy.git'

mod 'heat',
:commit => 'b1e9e9bd48c3da15be69c0797fb05e7ce0f6698f',
:commit => 'e5cb5d49deda76bb5c1f0ba825bdcecf4423c5e6',
:git => 'https://github.com/stackforge/puppet-heat.git'

mod 'horizon',
:commit => '168c206dfefa35abec48d7bce33ed469bf98cefb',
:commit => '6026088c831f9886f3445eb8775cc5514cadf79d',
:git => 'https://github.com/stackforge/puppet-horizon.git'

mod 'inifile',
Expand All @@ -63,11 +63,11 @@ mod 'ipa',
:git => 'https://github.com/xbezdick/puppet-ipa.git'

mod 'ironic',
:commit => '9aab12eab342b313881de6af9cd0d4e7c7dcdcd6',
:commit => '6733465482dc092486ee7d9227e9068fee506d6b',
:git => 'https://github.com/stackforge/puppet-ironic.git'

mod 'keystone',
:commit => 'b65ddba19f5d89fe13bd0264e988ef702ba2b5c9',
:commit => 'dfb8eb21f6bf8f81888491c2a3248a9d2207594d',
:git => 'https://github.com/stackforge/puppet-keystone.git'

mod 'memcached',
Expand Down Expand Up @@ -95,7 +95,7 @@ mod 'nagios',
:git => 'https://github.com/gildub/puppet-nagios-openstack.git'

mod 'neutron',
:commit => 'c3dc52023dfdf7649080c1b5bc5eae3b43991db1',
:commit => '8fe0ddd50a8c44357dbdea79c371267a0887c04e',
:git => 'https://github.com/stackforge/puppet-neutron.git'

mod 'nova',
Expand All @@ -115,7 +115,7 @@ mod 'openstack',
:git => 'https://github.com/stackforge/puppet-openstack.git'

mod 'openstacklib',
:commit => '999f7849a3e0653f46f7336ee0fa9c2e38630b7b',
:commit => '417121b83c188e5b470e6b16f8e906c8ecdbcc4a',
:git => 'https://github.com/stackforge/puppet-openstacklib.git'

mod 'pacemaker',
Expand Down Expand Up @@ -183,7 +183,7 @@ mod 'vlan',
:git => 'https://github.com/derekhiggins/puppet-vlan.git'

mod 'vswitch',
:commit => 'a36332da0ddb9d419e1d3f9d170058284b144f06',
:commit => '996db952e452a1aa11a4afb2962884ce97d08b8a',
:git => 'https://github.com/stackforge/puppet-vswitch.git'

mod 'xinetd',
Expand Down
2 changes: 2 additions & 0 deletions ceilometer/.fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
fixtures:
repositories:
'apache': 'git://github.com/puppetlabs/puppetlabs-apache.git'
'concat': 'git://github.com/puppetlabs/puppetlabs-concat.git'
'inifile': 'git://github.com/puppetlabs/puppetlabs-inifile'
'keystone': 'git://github.com/stackforge/puppet-keystone.git'
'mysql':
Expand Down
1 change: 1 addition & 0 deletions ceilometer/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
gem 'rspec-puppet', '~> 1.0.1'
gem 'metadata-json-lint'
gem 'puppet-syntax'
gem 'rake', '10.1.1'
Expand Down
4 changes: 2 additions & 2 deletions ceilometer/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# (optional) SSL version to use (valid only if SSL enabled).
# Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be
# available on some distributions.
# Defaults to 'SSLv3'
# Defaults to 'TLSv1'
#
# [*qpid_hostname*]
# [*qpid_port*]
Expand Down Expand Up @@ -91,7 +91,7 @@
$kombu_ssl_ca_certs = undef,
$kombu_ssl_certfile = undef,
$kombu_ssl_keyfile = undef,
$kombu_ssl_version = 'SSLv3',
$kombu_ssl_version = 'TLSv1',
$qpid_hostname = 'localhost',
$qpid_port = 5672,
$qpid_username = 'guest',
Expand Down
5 changes: 5 additions & 0 deletions ceilometer/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
$sqlite_package_name = 'python-sqlite2'
}

$ceilometer_wsgi_script_path = '/var/www/cgi-bin/ceilometer'
$ceilometer_wsgi_script_source = '/usr/lib/python2.7/site-packages/ceilometer/api/app.wsgi'

}
'Debian': {
# package names
Expand Down Expand Up @@ -69,6 +72,8 @@
$libvirt_group = 'libvirt'
}
}
$ceilometer_wsgi_script_path = '/usr/lib/cgi-bin/ceilometer'
$ceilometer_wsgi_script_source = '/usr/share/ceilometer/app.wsgi'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: \
Expand Down
121 changes: 121 additions & 0 deletions ceilometer/manifests/wsgi/apache.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#
# Copyright (C) 2015 eNovance SAS <[email protected]>
#
# Author: Emilien Macchi <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Class to serve Ceilometer API with apache mod_wsgi in place of ceilometer-api service.
#
# Serving Ceilometer API from apache is the recommended way to go for production
# systems as the current keystone implementation is not multi-processor aware,
# thus limiting the performance for concurrent accesses.
#
# When using this class you should disable your ceilometer-api service.
#
# == Parameters
#
# [*servername*]
# The servername for the virtualhost.
# Optional. Defaults to $::fqdn
#
# [*port*]
# The port.
# Optional. Defaults to 8777
#
# [*bind_host*]
# The host/ip address Apache will listen on.
# Optional. Defaults to undef (listen on all ip addresses).
#
# [*path*]
# The prefix for the endpoint.
# Optional. Defaults to '/'
#
# [*ssl*]
# Use ssl ? (boolean)
# Optional. Defaults to true
#
# [*workers*]
# Number of WSGI workers to spawn.
# Optional. Defaults to 1
#
# [*ssl_cert*]
# [*ssl_key*]
# [*ssl_chain*]
# [*ssl_ca*]
# [*ssl_crl_path*]
# [*ssl_crl*]
# [*ssl_certs_dir*]
# apache::vhost ssl parameters.
# Optional. Default to apache::vhost 'ssl_*' defaults.
#
# == Dependencies
#
# requires Class['apache'] & Class['ceilometer']
#
# == Examples
#
# include apache
#
# class { 'ceilometer::wsgi::apache': }
#
class ceilometer::wsgi::apache (
$servername = $::fqdn,
$port = 8777,
$bind_host = undef,
$path = '/',
$ssl = true,
$workers = 1,
$ssl_cert = undef,
$ssl_key = undef,
$ssl_chain = undef,
$ssl_ca = undef,
$ssl_crl_path = undef,
$ssl_crl = undef,
$ssl_certs_dir = undef,
$threads = $::processorcount,
$priority = '10',
) {

include ::ceilometer::params
include ::apache
include ::apache::mod::wsgi
if $ssl {
include ::apache::mod::ssl
}

openstacklib::wsgi::apache { 'ceilometer_wsgi':
bind_host => $bind_host,
bind_port => $port,
group => 'ceilometer',
path => $path,
priority => $priority,
servername => $servername,
ssl => $ssl,
ssl_ca => $ssl_ca,
ssl_cert => $ssl_cert,
ssl_certs_dir => $ssl_certs_dir,
ssl_chain => $ssl_chain,
ssl_crl => $ssl_crl,
ssl_crl_path => $ssl_crl_path,
ssl_key => $ssl_key,
threads => $threads,
user => 'ceilometer',
workers => $workers,
wsgi_daemon_process => 'ceilometer',
wsgi_process_group => 'ceilometer',
wsgi_script_dir => $::ceilometer::params::ceilometer_wsgi_script_path,
wsgi_script_file => 'app',
wsgi_script_source => $::ceilometer::params::ceilometer_wsgi_script_source,
}
}
1 change: 1 addition & 0 deletions ceilometer/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
],
"description": "Installs and configures OpenStack Ceilometer (Telemetry).",
"dependencies": [
{ "name": "puppetlabs/apache", "version_requirement": ">=1.0.0 <2.0.0" },
{ "name": "puppetlabs/inifile", "version_requirement": ">=1.0.0 <2.0.0" },
{ "name": "stackforge/keystone", "version_requirement": ">=5.0.0 <6.0.0" },
{ "name": "puppetlabs/stdlib", "version_requirement": ">=4.0.0 <5.0.0" },
Expand Down
2 changes: 1 addition & 1 deletion ceilometer/spec/classes/ceilometer_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
it { should contain_ceilometer_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent') }
it { should contain_ceilometer_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent') }
it { should contain_ceilometer_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent') }
it { should contain_ceilometer_config('DEFAULT/kombu_ssl_version').with_value('SSLv3') }
it { should contain_ceilometer_config('DEFAULT/kombu_ssl_version').with_value('TLSv1') }
end

context "with SSL wrongly configured" do
Expand Down
Loading