diff --git a/Puppetfile b/Puppetfile index 410e5aa6c..8a29e0886 100644 --- a/Puppetfile +++ b/Puppetfile @@ -62,10 +62,6 @@ mod 'fluentd', :commit => 'ddc5f0e4c6c53d15f0cbd34f74bfaa91a0fb299f', :git => 'https://github.com/soylent/konstantin-fluentd.git' -mod 'galera', - :commit => 'a2ecf273aef9ef9193bba35c235fb7b8b821a0c3', - :git => 'https://github.com/redhat-openstack/puppet-galera.git' - mod 'git', :commit => '8e7f586', :git => 'https://github.com/puppetlabs/puppetlabs-git.git' diff --git a/galera/.fixtures.yml b/galera/.fixtures.yml deleted file mode 100644 index 989d203c2..000000000 --- a/galera/.fixtures.yml +++ /dev/null @@ -1,7 +0,0 @@ -fixtures: - repositories: - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib" - "xinetd": "git://github.com/puppetlabs/puppetlabs-xinetd" - "mysql": "git://github.com/puppetlabs/puppetlabs-mysql" - symlinks: - "galera": "#{source_dir}" diff --git a/galera/.gitignore b/galera/.gitignore deleted file mode 100644 index bb757b24b..000000000 --- a/galera/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -Gemfile.lock -.vagrant -vendor/ -.bundle/ -spec/fixtures/modules -spec/fixtures/manifests/site.pp diff --git a/galera/Gemfile b/galera/Gemfile deleted file mode 100644 index 95232d551..000000000 --- a/galera/Gemfile +++ /dev/null @@ -1,18 +0,0 @@ -source 'https://rubygems.org' - -group :development, :test do - gem 'puppetlabs_spec_helper', :require => false - gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git' - gem 'puppet-lint', :git => 'https://github.com/rodjek/puppet-lint.git' - gem 'puppet-lint-param-docs', '1.1.0' - gem 'puppet-syntax' - gem 'rake', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/galera/LICENSE b/galera/LICENSE deleted file mode 100644 index 8d968b6cb..000000000 --- a/galera/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/galera/README.md b/galera/README.md deleted file mode 100644 index 33da7f111..000000000 --- a/galera/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Galera module - -This is a module for installing and confiuring galera. - -It depends on the mysql module from puppetlabs as well as xinetd. - -## Usage - -### galera::server - - Used to configure a MariaDB Galera server cluster. - - class { 'galera::server': - wsrep_cluster_name => 'galera_cluster', - wsrep_sst_method => 'rsync' - wsrep_sst_username => 'ChangeMe', - wsrep_sst_password => 'ChangeMe', - } - -### galera::monitor - - Used to monitor a MariaDB Galera cluster server. The class is meant - to be used in a server load-balancer environment. - - class {'galera::monitor': - monitor_username => 'mon_user', - monitor_password => 'mon_pass' - } - - Here is a sample 3-node HAProxy Configuration: - - listen galera 192.168.220.40:3306 - balance leastconn - mode tcp - option tcpka - option httpchk - server control01 192.168.220.41:3306 check port 9200 inter 2000 rise 2 fall 5 - server control02 192.168.220.42:3306 check port 9200 inter 2000 rise 2 fall 5 - server control03 192.168.220.43:3306 check port 9200 inter 2000 rise 2 fall 5 - -## Authors - -Daneyon Hansen, Ryan O'Hara diff --git a/galera/Rakefile b/galera/Rakefile deleted file mode 100644 index c3bb5ac20..000000000 --- a/galera/Rakefile +++ /dev/null @@ -1,27 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' - -exclude_paths = [ - "pkg/**/*", - "vendor/**/*", - "spec/**/*", -] - -PuppetSyntax.exclude_paths = exclude_paths - -Rake::Task[:lint].clear -PuppetLint::RakeTask.new :lint do |config| - config.ignore_paths = exclude_paths - config.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}' - config.disable_checks = [ "class_inherits_from_params_class", "80chars" ] - config.fail_on_warnings = true - config.relative = true -end - -desc "Run syntax, lint, and spec tests." -task :test => [ - :syntax, - :lint, - :spec, -] diff --git a/galera/lib/puppet/parser/functions/wsrep_options.rb b/galera/lib/puppet/parser/functions/wsrep_options.rb deleted file mode 100644 index f09049026..000000000 --- a/galera/lib/puppet/parser/functions/wsrep_options.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:wsrep_options, :type => :rvalue) do |args| - opts = args[0] - opts.delete_if {|key, val| val.equal? :undef} - opts.sort.map do |k,v| - String(k) + "=" + String(v) - end - end -end diff --git a/galera/manifests/monitor.pp b/galera/manifests/monitor.pp deleted file mode 100644 index cfef0c230..000000000 --- a/galera/manifests/monitor.pp +++ /dev/null @@ -1,90 +0,0 @@ -# == Class: galera::monitor -# -# === Parameters: -# -# [*mysql_username*] -# Username of the service account used for the clustercheck script. -# -# [*mysql_password*] -# Password of the service account used for the clustercheck script. -# -# [*mysql_host*] -# Hostname/IP address of mysql server to monitor. -# Defaults to 127.0.0.1. -# -# [*mysql_port*] -# Port used by mysql service. -# Defaults to 3306. -# -# [*monitor_port*] -# Port used by galera monitor service. -# Defaults to 9200. -# -# [*monitor_script*] -# Full path to monitor script.\ -# Defaults to '/usr/bin/clustercheck'. -# -# [*enabled*] -# Enable/Disable galera monitor xinetd::service. -# Defaults to true. -# -# [*create_mysql_user*] -# Whether to create mysql user or not. -# Defaults to false. -# -# === Actions: -# -# === Requires: -# -# === Sample usage: -# -# class { 'galera::monitor': -# mysql_username => 'mon_user', -# mysql_password => 'mon_pass' -# } -# -class galera::monitor ( - $mysql_username = 'monitor_user', - $mysql_password = 'monitor_pass', - $mysql_host = '127.0.0.1', - $mysql_port = '3306', - $monitor_port = '9200', - $monitor_script = '/usr/bin/clustercheck', - $enabled = true, - $create_mysql_user = false, -) { - - if $enabled { - $monitor_disable = 'no' - } else { - $monitor_disable = 'yes' - } - - file { '/etc/sysconfig/clustercheck': - mode => '0640', - content => template('galera/clustercheck.erb'), - owner => 'root', - group => 'root', - } - - xinetd::service { 'galera-monitor': - disable => $monitor_disable, - port => $monitor_port, - server => $monitor_script, - flags => 'REUSE', - per_source => 'UNLIMITED', - service_type => 'UNLISTED', - log_on_success => '', - log_on_success_operator => '=', - log_on_failure => 'HOST', - log_on_failure_operator => '=', - } - - if $create_mysql_user { - mysql_user { "${mysql_username}@${mysql_host}": - ensure => present, - password_hash => mysql_password($mysql_password), - require => [File['/root/.my.cnf'],Service['mysqld']], - } - } -} diff --git a/galera/manifests/server.pp b/galera/manifests/server.pp deleted file mode 100644 index eff45b14d..000000000 --- a/galera/manifests/server.pp +++ /dev/null @@ -1,155 +0,0 @@ -# == Class: galera::server -# -# manages the installation of the galera server. -# manages the package, service, galera.cnf -# -# === Parameters: -# -# [*bootstrap*] -# Defaults to false, boolean to set cluster boostrap. -# -# [*package_name*] -# The name of the galera package. -# -# [*package_ensure*] -# Ensure state for package. Can be specified as version. -# -# [*wsrep_node_address*] -# Address of local galera node. -# -# [*wsrep_provider*] -# Full path to wsrep provider library or 'none'. -# -# [*wsrep_cluster_name*] -# Logical cluster name. be the same for all nodes. -# -# [*wsrep_cluster_members*] -# List of cluster members, IP addresses or hostnames. -# -# [*wsrep_sst_method*] -# State snapshot transfer method. -# -# [*wsrep_sst_username*] -# Username used by the wsrep_sst_auth authentication string. -# -# [*wsrep_sst_password*] -# Password used by the wsrep_sst_auth authentication string. -# -# [*wsrep_ssl*] -# Boolean to disable SSL even if certificate and key are configured. -# -# [*wsrep_ssl_key*] -# Private key for the certificate above, unencrypted, in PEM format. -# -# [*wsrep_ssl_cert*] -# Certificate file in PEM format. -# -# [*debug*] -# -# [*wsrep_bind_address*] -# Address to bind galera service. -# Deprecated, please use ::mysql::server class. -# -# [*mysql_server_hash*] -# Hash of mysql server parameters. -# Deprecated, please use ::mysql::server class. -# -# -# [*manage_service*] -# State of the service. -# Deprecated, please use ::mysql::server class. -# -# [*service_name*] -# The name of the galera service. -# Deprecated, please use ::mysql::server class. -# -# [*service_enable*] -# Defaults to true, boolean to set service enable. -# Deprecated, please use ::mysql::server class. -# -# [*service_ensure*] -# Defaults to running, needed to set root password. -# Deprecated, please use ::mysql::server class. -# -# [*service_provider*] -# What service provider to use. -# Deprecated, please use ::mysql::server class. -# -# === Actions: -# -# === Requires: -# -# === Sample Usage: -# class { 'galera::server': -# wsrep_cluster_name => 'galera_cluster', -# wsrep_sst_method => 'rsync' -# wsrep_sst_username => 'ChangeMe', -# wsrep_sst_password => 'ChangeMe', -# } -# -class galera::server ( - $bootstrap = false, - $debug = false, - $wsrep_node_address = undef, - $wsrep_provider = '/usr/lib64/galera/libgalera_smm.so', - $wsrep_cluster_name = 'galera_cluster', - $wsrep_cluster_members = [ $::ipaddress ], - $wsrep_sst_method = 'rsync', - $wsrep_sst_username = 'root', - $wsrep_sst_password = undef, - $wsrep_ssl = false, - $wsrep_ssl_key = undef, - $wsrep_ssl_cert = undef, - $create_mysql_resource = true, - # DEPRECATED OPTIONS - $mysql_server_hash = {}, - $wsrep_bind_address = '0.0.0.0', - $manage_service = false, - $service_name = 'mariadb', - $service_enable = true, - $service_ensure = 'running', -) { - if $create_mysql_resource { - warning("DEPRECATED: ::mysql::server should be called manually, please set create_mysql_resource to false and call class ::mysql::server with your config") - - $mysql_server_class = { 'mysql::server' => $mysql_server_hash } - - create_resources( 'class', $mysql_server_class ) - } - - if $wsrep_bind_address { - warning("DEPRECATED: wsrep_bind_address is deprecated, you should use bind_address of mysql module") - } - - if $wsrep_ssl { - $wsrep_provider_options = wsrep_options({ - 'socket.ssl' => $wsrep_ssl, - 'socket.ssl_key' => $wsrep_ssl_key, - 'socket.ssl_cert' => $wsrep_ssl_cert, - }) - } else { - $wsrep_provider_options = wsrep_options({ - 'socket.ssl' => $wsrep_ssl, - }) - } - - $wsrep_debug = bool2num($debug) - - file { '/etc/my.cnf.d/galera.cnf': - ensure => present, - mode => '0644', - owner => 'root', - group => 'root', - content => template('galera/wsrep.cnf.erb'), - notify => Service['mysqld'], - } - - if $manage_service { - warning("DEPRECATED: service setup is deprecated, you should use mysql module for this.") - service { 'galera': - ensure => $service_ensure, - name => $service_name, - enable => $service_enable, - } - } -} diff --git a/galera/metadata.json b/galera/metadata.json deleted file mode 100644 index 26a8cb5af..000000000 --- a/galera/metadata.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "puppet-galera", - "version": "0.0.2", - "author": "Ryan O'Hara", - "summary": "Install/Configure MariaDB with galera", - "license": "Apache 2.0", - "source": "git://github.com/redhat-openstack/puppet-galera.git", - "project_page": "https://github.com/redhat-openstack/puppet-galera", - "operatingsystem_support": [ - { - "operatingsystem": "RedHat", - "operatingsystemrelease": [ - "5", - "6", - "7" - ] - }, - { - "operatingsystem": "CentOS", - "operatingsystemrelease": [ - "5", - "6", - "7" - ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "5", - "6", - "7" - ] - } - ], - "requirements": [ - { - "name": "pe", - "version_requirement": "3.x" - }, - { - "name": "puppet", - "version_requirement": "3.x" - } - ], - "description": "Install/Configure MariaDB with Galera", - "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":">= 2.4.0"}, - {"name":"puppetlabs/mysql","version_requirement":">= 2.3.1"}, - {"name":"puppetlabs/xinetd","version_requirement":">= 1.2.0"} - ] -} diff --git a/galera/spec/classes/galera_monitor_spec.rb b/galera/spec/classes/galera_monitor_spec.rb deleted file mode 100644 index 3bdf322fb..000000000 --- a/galera/spec/classes/galera_monitor_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -require 'spec_helper' -describe 'galera::monitor' do - - let :facts do - { :osfamily => 'RedHat' } - end - - let :params do - { - :mysql_username => 'monitor_user', - :mysql_password => 'monitor_pass', - :mysql_host => '127.0.0.1', - :mysql_port => '3306', - :monitor_port => '9200', - :monitor_script => '/usr/bin/clustercheck', - :enabled => true, - :create_mysql_user => false, - } - end - - context 'with galera-monitor xinetd service' do - context 'with enabled parameter to true' do - it 'Configures galera-monitor xinetd service' do - should contain_xinetd__service('galera-monitor').with( - :disable => 'no', - :port => '9200', - :server => '/usr/bin/clustercheck', - :flags => 'REUSE', - :per_source => 'UNLIMITED', - :service_type => 'UNLISTED', - :log_on_success => '', - :log_on_success_operator => '=', - :log_on_failure => 'HOST', - :log_on_failure_operator => '=', - ) - end - end - - context 'with enabled parameter to false' do - let(:params) { {:enabled => false } } - it 'Configures galera-monitor xinetd service' do - should contain_xinetd__service('galera-monitor').with( - :disable => 'yes', - :port => '9200', - :server => '/usr/bin/clustercheck', - :flags => 'REUSE', - :per_source => 'UNLIMITED', - :service_type => 'UNLISTED', - :log_on_success => '', - :log_on_success_operator => '=', - :log_on_failure => 'HOST', - :log_on_failure_operator => '=', - ) - end - end - end - - it 'Configures clustercheck configuration file' do - should contain_file('/etc/sysconfig/clustercheck').with( - :mode => '0640', - :owner => 'root', - :group => 'root', - ) - end - - context 'with create_mysql_user parameter' do - let(:params) { {:create_mysql_user => false} } - context 'create_mysql_user to false' do - it 'Should not contain mysql_user resource' do - should_not contain_mysql_user() - end - end - - let(:params) { {:create_mysql_user => true} } - context 'create_mysql_user to true' do - it 'Should contain mysql_user resource' do - should contain_mysql_user("monitor_user@127.0.0.1") - end - end - end -end diff --git a/galera/spec/classes/galera_server_spec.rb b/galera/spec/classes/galera_server_spec.rb deleted file mode 100644 index 41654f19a..000000000 --- a/galera/spec/classes/galera_server_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'spec_helper' - -describe 'galera::server', :type => :class do - - let :facts do - { :osfamily => 'RedHat' } - end - - let :params do - { - :bootstrap => false, - :debug => false, - :service_name => 'mariadb', - :service_enable => true, - :service_ensure => 'running', - :manage_service => false, - :wsrep_bind_address => '0.0.0.0', - :wsrep_node_address => 'undef', - :wsrep_provider => '/usr/lib64/galera/libgalera_smm.so', - :wsrep_cluster_name => 'galera_cluster', - :wsrep_cluster_members => ['127.0.0.1'], - :wsrep_sst_method => 'rsync', - :wsrep_sst_username => 'root', - :wsrep_sst_password => 'undef', - :wsrep_ssl => false, - :wsrep_ssl_key => 'undef', - :wsrep_ssl_cert => 'undef', - } - end - - it { should contain_class('mysql::server') } - - context 'Configures /etc/my.cnf.d/galera.cnf' do - it { should contain_file('/etc/my.cnf.d/galera.cnf').with( - 'ensure' => 'present', - 'mode' => '0644', - 'owner' => 'root', - 'group' => 'root', - 'notify' => 'Service[mariadb]' - ) - } - end - - context 'with manage_service to false' do - it "Doesn't configure galera service" do - should_not contain_service('galera') - end - end - - context 'with manage_service to true' do - let(:params) { {:manage_service => true} } - it "Configures galera service" do - should contain_service('galera').with( - 'ensure' => 'running', - 'name' => 'mariadb', - 'enable' => 'true', - ) - end - end -end diff --git a/galera/spec/spec_helper.rb b/galera/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649..000000000 --- a/galera/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/galera/templates/clustercheck.erb b/galera/templates/clustercheck.erb deleted file mode 100644 index 3abac52c5..000000000 --- a/galera/templates/clustercheck.erb +++ /dev/null @@ -1,7 +0,0 @@ -# This file is being maintained by Puppet. -# DO NOT EDIT - -MYSQL_USERNAME="<%= @mysql_username %>" -MYSQL_PASSWORD="<%= @mysql_password %>" -MYSQL_HOST="<%= @mysql_host %>" -MYSQL_PORT="<%= @mysql_port %>" diff --git a/galera/templates/wsrep.cnf.erb b/galera/templates/wsrep.cnf.erb deleted file mode 100644 index b471f627d..000000000 --- a/galera/templates/wsrep.cnf.erb +++ /dev/null @@ -1,133 +0,0 @@ -# This file contains wsrep-related mysqld options. It should be included -# in the main MySQL configuration file. -# -# Options that need to be customized: -# - wsrep_provider -# - wsrep_cluster_address -# - wsrep_sst_auth -# The rest of defaults should work out of the box. - -## -## mysqld options _MANDATORY_ for correct opration of the cluster -## -[mysqld] - -# (This must be substituted by wsrep_format) -binlog_format=ROW - -# Currently only InnoDB storage engine is supported -default-storage-engine=innodb - -# to avoid issues with 'bulk mode inserts' using autoinc -innodb_autoinc_lock_mode=2 - -# This is a must for paralell applying -innodb_locks_unsafe_for_binlog=1 - -# Query Cache is not supported with wsrep -#### query_cache_size=0 now in server.cnf -query_cache_type=0 - -# Override bind-address -# In some systems bind-address defaults to 127.0.0.1, and with mysqldump SST -# it will have (most likely) disastrous consequences on donor node -bind-address=<%= @wsrep_bind_address %> - -## -## WSREP options -## - -# Full path to wsrep provider library or 'none' -wsrep_provider=<%= @wsrep_provider %> - -# Provider specific configuration options -wsrep_provider_options="<%= @wsrep_provider_options.join '; ' %>" - -# Logical cluster name. Should be the same for all nodes. -wsrep_cluster_name="<%= @wsrep_cluster_name %>" - -# Human-readable node name (non-unique). Hostname by default. -#wsrep_node_name= - -# Base replication
[:port] of the node. -# The values supplied will be used as defaults for state transfer receiving, -# listening ports and so on. Default: address of the first network interface. -<% if @wsrep_node_address -%> -wsrep_node_address=<%= @wsrep_node_address %> -<% else -%> -#wsrep_node_address= -<% end -%> - -# Address for incoming client connections. Autodetect by default. -#wsrep_node_incoming_address= - -# How many threads will process writesets from other nodes -wsrep_slave_threads=1 - -# DBUG options for wsrep provider -#wsrep_dbug_option - -# Generate fake primary keys for non-PK tables (required for multi-master -# and parallel applying operation) -wsrep_certify_nonPK=1 - -# Maximum number of rows in write set -wsrep_max_ws_rows=131072 - -# Maximum size of write set -wsrep_max_ws_size=1073741824 - -# to enable debug level logging, set this to 1 -wsrep_debug=<%= @wsrep_debug %> - -# convert locking sessions into transactions -wsrep_convert_LOCK_to_trx=0 - -# how many times to retry deadlocked autocommits -wsrep_retry_autocommit=1 - -# change auto_increment_increment and auto_increment_offset automatically -wsrep_auto_increment_control=1 - -# retry autoinc insert, which failed for duplicate key error -wsrep_drupal_282555_workaround=0 - -# enable "strictly synchronous" semantics for read operations -wsrep_causal_reads=0 - -# Command to call when node status or cluster membership changes. -# Will be passed all or some of the following options: -# --status - new status of this node -# --uuid - UUID of the cluster -# --primary - whether the component is primary or not ("yes"/"no") -# --members - comma-separated list of members -# --index - index of this node in the list -wsrep_notify_cmd= - -## -## WSREP State Transfer options -## - -# State Snapshot Transfer method -wsrep_sst_method=<%= @wsrep_sst_method %> - -# Address which donor should send State Snapshot to. -# Should be the address of THIS node. DON'T SET IT TO DONOR ADDRESS!!! -# (SST method dependent. Defaults to the first IP of the first interface) -#wsrep_sst_receive_address= - -# SST authentication string. This will be used to send SST to joining nodes. -# Depends on SST method. For mysqldump method it is root: