Merge pull request #390 from enovance/deprecate-puppet27

Deprecate Puppet 2.7
This commit is contained in:
Emilien Macchi 2014-04-04 21:40:38 +02:00
commit b4e4ccb137
8 changed files with 101 additions and 75 deletions

12
.forgeignore Normal file
View File

@ -0,0 +1,12 @@
- pkg/
- spec/
- Rakefile
- Puppetfile
- coverage/
- .git/
- .forgeignore
- .travis.yml
- .gitignore
- Gemfile
- Gemfile.lock
- .fixtures.yml

View File

@ -6,14 +6,9 @@ rvm:
- 2.0.0 - 2.0.0
env: env:
matrix: matrix:
- PUPPET_GEM_VERSION="~> 2.7.0" - PUPPET_GEM_VERSION="~> 3.2.0"
- PUPPET_GEM_VERSION="~> 3.3.0" - PUPPET_GEM_VERSION="~> 3.3.0"
- PUPPET_GEM_VERSION="~> 3.4.0" - PUPPET_GEM_VERSION="~> 3.4.0"
matrix: - PUPPET_GEM_VERSION="~> 3.5.0"
exclude:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 2.7.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 2.7.0"
notifications: notifications:
email: false email: false

View File

@ -1,5 +1,5 @@
name 'enovance-openstack-cloud' name 'eNovance-cloud'
version '1.0.0' version '1.1.0'
source 'https://github.com/enovance/puppet-openstack-cloud' source 'https://github.com/enovance/puppet-openstack-cloud'
author 'eNovance' author 'eNovance'
license 'Apache License 2.0' license 'Apache License 2.0'

View File

@ -1,8 +1,6 @@
puppet-openstack-cloud # puppet-openstack-cloud
======================
[![Build [![Build Status](https://travis-ci.org/enovance/puppet-openstack-cloud.svg)](https://travis-ci.org/enovance/puppet-openstack-cloud)
Status](https://travis-ci.org/enovance/puppet-openstack-cloud.svg)](https://travis-ci.org/enovance/puppet-openstack-cloud)
#### Table of Contents #### Table of Contents
@ -11,13 +9,12 @@ Status](https://travis-ci.org/enovance/puppet-openstack-cloud.svg)](https://trav
3. [Setup - The basics of getting started with puppet-openstack-cloud](#setup) 3. [Setup - The basics of getting started with puppet-openstack-cloud](#setup)
4. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation)
5. [Limitations - OS compatibility, etc.](#limitations) 5. [Limitations - OS compatibility, etc.](#limitations)
6. [Getting Involved - How to go deaper](#involved) 6. [Getting Involved - How to go deeper](#involved)
7. [Development - Guide for contributing to the module](#development) 7. [Development - Guide for contributing to the module](#development)
8. [Contributors - Those with commits](#contributors) 8. [Contributors - Those with commits](#contributors)
9. [Release Notes - Notes on the most recent updates to the module](#release-notes) 9. [Release Notes - Notes on the most recent updates to the module](#release-notes)
Overview ## Overview
--------
The OpenStack Puppet Modules are a flexible Puppet implementation capable of configuring the core [OpenStack](http://docs.openstack.org/) services: The OpenStack Puppet Modules are a flexible Puppet implementation capable of configuring the core [OpenStack](http://docs.openstack.org/) services:
@ -41,22 +38,24 @@ Cinder has multi-backend support with Ceph used by default and NetApp as an opti
These Puppet modules are based on the [openstack documentation](http://docs.openstack.org/). These Puppet modules are based on the [openstack documentation](http://docs.openstack.org/).
Module Description ## Module Description
------------------
There are a lot of moving pieces in OpenStack, consequently there are several Puppet modules needed to cover all these pieces. Each module is then made up of several class definitions, resource declarations, defined resources, and custom types/providers. A common pattern to reduce this complexity in Puppet is to create a composite module that bundles all these component type modules into a common set of configurations. The cloud module is doing this compositing and exposing a set of variables needed to be successful in getting a functional stack up and running. There are a lot of moving pieces in OpenStack, consequently there are several Puppet modules needed to cover all these pieces. Each module is then made up of several class definitions, resource declarations, defined resources, and custom types/providers. A common pattern to reduce this complexity in Puppet is to create a composite module that bundles all these component type modules into a common set of configurations. The cloud module is doing this compositing and exposing a set of variables needed to be successful in getting a functional stack up and running.
**Pre-module Dependencies** ### Pre-module Dependencies
* [Puppet](http://docs.puppetlabs.com/puppet/) 2.7.12 or greater * [Puppet](http://docs.puppetlabs.com/puppet/) 3 or greater
* [Facter](http://www.puppetlabs.com/puppet/related-projects/facter/) 1.6.1 or greater (versions that support the osfamily fact) * [Facter](http://www.puppetlabs.com/puppet/related-projects/facter/) 1.6.1 or greater (versions that support the osfamily fact)
### Notes about Puppet3
Puppet 3.x isn't yet available on Debian/RedHat stable osfamily, but hopefully puppet provides a Official repository, please see [this page](http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html) for the setup.
**Platforms** **Platforms**
These modules have been fully tested on Ubuntu Precise and Debian Wheezy and RHEL 6. These modules have been fully tested on Ubuntu Precise and Debian Wheezy and RHEL 6.
Setup ## Setup
-----
**What the cloud module affects** **What the cloud module affects**
@ -88,26 +87,21 @@ The swift portions of this module needs Puppet's [exported resources](http://doc
The things that follow can be handled by Puppet but are out of scope of this document and are not included in the cloud module. The things that follow can be handled by Puppet but are out of scope of this document and are not included in the cloud module.
### Beginning with puppet-openstack-cloud ### Beginning with puppet-openstack-cloud
Utlization of this module can come in many forms. It was designed to be capable of deploying all services to a single node or distributed across several. This is not an exhaustive list, we recommend you consult and understand all the manifests included in this module and the [core openstack](http://docs.openstack.org) documentation. Utilization of this module can come in many forms. It was designed to be capable of deploying all services to a single node or distributed across several. This is not an exhaustive list, we recommend you consult and understand all the manifests included in this module and the [core openstack](http://docs.openstack.org) documentation.
Implementation ## Implementation
--------------
(more doc should be written here) (more doc should be written here)
Limitations ## Limitations
-----------
* Deploys only with rabbitmq and mysql RPC/data backends. * Deploys only with rabbitmq and mysql RPC/data backends.
* Not backwards compatible with pre-2.x release of the cloud modules. * Not backwards compatible with pre-2.x release of the cloud modules.
## Getting Involved
Getting Involved
----------------
Need a feature? Found a bug? Let us know! Need a feature? Found a bug? Let us know!
@ -115,20 +109,30 @@ We are extremely interested in growing a community of OpenStack experts and user
The best way to get help with this set of modules is to email the group associated with this project: The best way to get help with this set of modules is to email the group associated with this project:
dev@enovance.com dev [at] enovance [dot] com
Issues should be opened here: Issues should be opened here:
https://github.com/enovance/puppet-openstack-cloud/issues https://github.com/enovance/puppet-openstack-cloud/issues
Contributors ## Contributors
------------
* https://github.com/enovance/puppet-openstack-cloud/graphs/contributors * https://github.com/enovance/puppet-openstack-cloud/graphs/contributors
Release Notes ## Release Notes
-------------
**1.1.0**
* Updated puppetlabs-rabbitmq to 3.1.0 (RabbitMQ to 3.2.4)
* Add Cinder Muli-backend support
* NetApp support for Cinder as a backend
* Keystone uses now MySQL for tokens storage (due to several issues with Memcache backend)
* Back to upstream puppet-horizon from stackforge
* Servername parameter support in Horizon configuration to allow SSL redirections
* puppet-openstack-cloud module QA is done by Travis
* neutron: increase agent polling interval
* network: add dhcp\_lease\_duration parameter support
**1.0.0** **1.0.0**

View File

@ -1,3 +1,9 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
NAME = 'eNovance-cloud'
TDIR = File.expand_path(File.dirname(__FILE__))
require 'puppetlabs_spec_helper/rake_tasks' require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint' require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax' require 'puppet-syntax/tasks/puppet-syntax'
@ -29,3 +35,10 @@ if ENV['COV']
desc 'Run syntax, lint, spec tests and coverage' desc 'Run syntax, lint, spec tests and coverage'
task :cov => [:syntax,:lint,:spec_prep,:spec_standalone] task :cov => [:syntax,:lint,:spec_prep,:spec_standalone]
end end
namespace :module do
desc "Build #{NAME} module (in a clean env) Please use this for puppetforge"
task :build do
exec "rsync -rv --exclude-from=#{TDIR}/.forgeignore . /tmp/#{NAME};cd /tmp/#{NAME};puppet module build"
end
end

View File

@ -68,50 +68,52 @@ class cloud::database::sql (
# TODO(Gonéri): OS/values detection should be moved in a params.pp # TODO(Gonéri): OS/values detection should be moved in a params.pp
case $::osfamily { case $::osfamily {
'RedHat': { 'RedHat': {
class { 'mysql': class { 'mysql':
server_package_name => 'MariaDB-Galera-server', server_package_name => 'MariaDB-Galera-server',
client_package_name => 'MariaDB-client', client_package_name => 'MariaDB-client',
service_name => $mysql_service_name, service_name => $mysql_service_name,
} }
# Specific to Red Hat # Specific to Red Hat
$wsrep_provider = '/usr/lib64/galera/libgalera_smm.so' $wsrep_provider = '/usr/lib64/galera/libgalera_smm.so'
$dirs = [ '/var/run/mysqld', '/var/log/mysql' ] $dirs = [ '/var/run/mysqld', '/var/log/mysql' ]
file { $dirs: file { $dirs:
ensure => directory, ensure => directory,
mode => '0750', mode => '0750',
before => Service['mysqld'], before => Service['mysqld'],
owner => 'mysql' owner => 'mysql'
} }
} # RedHat
}
'Debian': { 'Debian': {
class { 'mysql': class { 'mysql':
server_package_name => 'mariadb-galera-server', server_package_name => 'mariadb-galera-server',
client_package_name => 'mariadb-client', client_package_name => 'mariadb-client',
service_name => $mysql_service_name, service_name => $mysql_service_name,
} }
# Specific to Debian / Ubuntu # Specific to Debian / Ubuntu
$wsrep_provider = '/usr/lib/galera/libgalera_smm.so' $wsrep_provider = '/usr/lib/galera/libgalera_smm.so'
database_user { 'debian-sys-maint@localhost': database_user { 'debian-sys-maint@localhost':
ensure => 'present', ensure => 'present',
password_hash => mysql_password($mysql_sys_maint_password), password_hash => mysql_password($mysql_sys_maint_password),
provider => 'mysql', provider => 'mysql',
require => File['/root/.my.cnf'] require => File['/root/.my.cnf']
} }
file{'/etc/mysql/debian.cnf': file{'/etc/mysql/debian.cnf':
ensure => file, ensure => file,
content => template('cloud/database/debian.cnf.erb'), content => template('cloud/database/debian.cnf.erb'),
owner => 'root', owner => 'root',
group => 'root', group => 'root',
mode => '0600', mode => '0600',
require => Exec['clean-mysql-binlog'], require => Exec['clean-mysql-binlog'],
} }
} # Debian
default: {
err "${::osfamily} not supported yet"
} }
} }

View File

@ -73,8 +73,8 @@ This node is under the control of Puppet ${::puppetversion}.
} }
service { 'cron': service { 'cron':
name => $cron_service_name,
ensure => running, ensure => running,
name => $cron_service_name,
enable => true enable => true
} }

View File

@ -116,7 +116,7 @@ describe 'cloud::volume::controller' do
should contain_class('cinder::api').with( should contain_class('cinder::api').with(
:keystone_password => 'secrete', :keystone_password => 'secrete',
:keystone_auth_host => '10.0.0.1', :keystone_auth_host => '10.0.0.1',
:bind_host => '10.0.0.1', :bind_host => '10.0.0.1'
) )
should contain_cinder_config('DEFAULT/default_volume_type').with(:ensure => 'absent') should contain_cinder_config('DEFAULT/default_volume_type').with(:ensure => 'absent')
end end