diff --git a/.forgeignore b/.forgeignore new file mode 100644 index 00000000..a0de2203 --- /dev/null +++ b/.forgeignore @@ -0,0 +1,12 @@ +- pkg/ +- spec/ +- Rakefile +- Puppetfile +- coverage/ +- .git/ +- .forgeignore +- .travis.yml +- .gitignore +- Gemfile +- Gemfile.lock +- .fixtures.yml diff --git a/.travis.yml b/.travis.yml index c647f90a..7f559c32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,9 @@ rvm: - 2.0.0 env: matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.2.0" - PUPPET_GEM_VERSION="~> 3.3.0" - PUPPET_GEM_VERSION="~> 3.4.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.5.0" notifications: email: false diff --git a/Modulefile b/Modulefile index 77759cfb..f8a0c18a 100644 --- a/Modulefile +++ b/Modulefile @@ -1,5 +1,5 @@ -name 'enovance-openstack-cloud' -version '1.0.0' +name 'eNovance-cloud' +version '1.1.0' source 'https://github.com/enovance/puppet-openstack-cloud' author 'eNovance' license 'Apache License 2.0' diff --git a/README.md b/README.md index 5382b0fc..4e7de970 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -puppet-openstack-cloud -====================== +# puppet-openstack-cloud -[![Build -Status](https://travis-ci.org/enovance/puppet-openstack-cloud.svg)](https://travis-ci.org/enovance/puppet-openstack-cloud) +[![Build Status](https://travis-ci.org/enovance/puppet-openstack-cloud.svg)](https://travis-ci.org/enovance/puppet-openstack-cloud) #### 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) 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 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) 8. [Contributors - Those with commits](#contributors) 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: @@ -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/). -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. -**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) +### 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** These modules have been fully tested on Ubuntu Precise and Debian Wheezy and RHEL 6. -Setup ------ +## Setup **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. - ### 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) -Limitations ------------ +## Limitations * Deploys only with rabbitmq and mysql RPC/data backends. * 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! @@ -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: - dev@enovance.com + dev [at] enovance [dot] com Issues should be opened here: https://github.com/enovance/puppet-openstack-cloud/issues -Contributors ------------- +## 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** diff --git a/Rakefile b/Rakefile index d7b4fb01..1aa68916 100644 --- a/Rakefile +++ b/Rakefile @@ -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 'puppet-lint/tasks/puppet-lint' require 'puppet-syntax/tasks/puppet-syntax' @@ -29,3 +35,10 @@ if ENV['COV'] desc 'Run syntax, lint, spec tests and coverage' task :cov => [:syntax,:lint,:spec_prep,:spec_standalone] 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 diff --git a/manifests/database/sql.pp b/manifests/database/sql.pp index 0375524a..a80fc535 100644 --- a/manifests/database/sql.pp +++ b/manifests/database/sql.pp @@ -68,50 +68,52 @@ class cloud::database::sql ( # TODO(Gonéri): OS/values detection should be moved in a params.pp case $::osfamily { 'RedHat': { - class { 'mysql': - server_package_name => 'MariaDB-Galera-server', - client_package_name => 'MariaDB-client', - service_name => $mysql_service_name, - } + class { 'mysql': + server_package_name => 'MariaDB-Galera-server', + client_package_name => 'MariaDB-client', + service_name => $mysql_service_name, + } - # Specific to Red Hat - $wsrep_provider = '/usr/lib64/galera/libgalera_smm.so' + # Specific to Red Hat + $wsrep_provider = '/usr/lib64/galera/libgalera_smm.so' - $dirs = [ '/var/run/mysqld', '/var/log/mysql' ] + $dirs = [ '/var/run/mysqld', '/var/log/mysql' ] - file { $dirs: - ensure => directory, - mode => '0750', - before => Service['mysqld'], - owner => 'mysql' - } - - } + file { $dirs: + ensure => directory, + mode => '0750', + before => Service['mysqld'], + owner => 'mysql' + } + } # RedHat 'Debian': { - class { 'mysql': - server_package_name => 'mariadb-galera-server', - client_package_name => 'mariadb-client', - service_name => $mysql_service_name, - } + class { 'mysql': + server_package_name => 'mariadb-galera-server', + client_package_name => 'mariadb-client', + service_name => $mysql_service_name, + } - # Specific to Debian / Ubuntu - $wsrep_provider = '/usr/lib/galera/libgalera_smm.so' + # Specific to Debian / Ubuntu + $wsrep_provider = '/usr/lib/galera/libgalera_smm.so' - database_user { 'debian-sys-maint@localhost': - ensure => 'present', - password_hash => mysql_password($mysql_sys_maint_password), - provider => 'mysql', - require => File['/root/.my.cnf'] - } + database_user { 'debian-sys-maint@localhost': + ensure => 'present', + password_hash => mysql_password($mysql_sys_maint_password), + provider => 'mysql', + require => File['/root/.my.cnf'] + } - file{'/etc/mysql/debian.cnf': - ensure => file, - content => template('cloud/database/debian.cnf.erb'), - owner => 'root', - group => 'root', - mode => '0600', - require => Exec['clean-mysql-binlog'], - } + file{'/etc/mysql/debian.cnf': + ensure => file, + content => template('cloud/database/debian.cnf.erb'), + owner => 'root', + group => 'root', + mode => '0600', + require => Exec['clean-mysql-binlog'], + } + } # Debian + default: { + err "${::osfamily} not supported yet" } } diff --git a/manifests/init.pp b/manifests/init.pp index 1f0a06b2..4076401a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -73,8 +73,8 @@ This node is under the control of Puppet ${::puppetversion}. } service { 'cron': - name => $cron_service_name, ensure => running, + name => $cron_service_name, enable => true } diff --git a/spec/classes/cloud_volume_controller_spec.rb b/spec/classes/cloud_volume_controller_spec.rb index 4ca32e1b..333929f9 100644 --- a/spec/classes/cloud_volume_controller_spec.rb +++ b/spec/classes/cloud_volume_controller_spec.rb @@ -116,7 +116,7 @@ describe 'cloud::volume::controller' do should contain_class('cinder::api').with( :keystone_password => 'secrete', :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') end