forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request redhat-openstack#162 from cwolferh/master
Update repo locations for pacemaker and galera
- Loading branch information
Showing
75 changed files
with
7,922 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
fixtures: | ||
repositories: | ||
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib" | ||
"xinetd": "git://github.com/packstack/puppetlabs-xinetd" | ||
"mysql": "git://github.com/packstack/puppetlabs-mysql" | ||
"xinetd": "git://github.com/puppetlabs/puppetlabs-xinetd" | ||
"mysql": "git://github.com/puppetlabs/puppetlabs-mysql" | ||
symlinks: | ||
"galera": "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Gemfile.lock | ||
.vagrant | ||
vendor | ||
vendor/ | ||
.bundle/ | ||
spec/fixtures/modules | ||
spec/fixtures/manifests/site.pp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
require 'rspec-system/rake_task' | ||
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, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,81 @@ | ||
require 'spec_helper' | ||
describe 'galera::monitor' do | ||
|
||
let :facts do | ||
{ :osfamily => 'RedHat' } | ||
end | ||
let :pre_condition do | ||
"include 'galera::server'" | ||
end | ||
|
||
let :params do | ||
{ | ||
:monitor_username => 'monitor_user', | ||
:monitor_password => 'monitor_pass', | ||
:monitor_hostname => '127.0.0.1', | ||
:mysql_port => '3306', | ||
:mysql_path => '/usr/bin/mysql', | ||
:script_dir => '/usr/local/bin', | ||
:enabled => true | ||
: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 | ||
|
||
it { should contain_service('xinetd').with( | ||
:ensure => 'running', | ||
:enable => 'true' | ||
)} | ||
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 | ||
|
||
it { should contain_file('/usr/local/bin/galera_chk')} | ||
it { should contain_database_user("[email protected]")} | ||
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("[email protected]") | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.