Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/122332
Change subject: db: lint role ...................................................................... db: lint role Change-Id: I90406592f22c5c6021d9f36551a9abbe6a5c9840 --- M manifests/role/db.pp 1 file changed, 57 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/122332/1 diff --git a/manifests/role/db.pp b/manifests/role/db.pp index 987123c..a8b893f 100644 --- a/manifests/role/db.pp +++ b/manifests/role/db.pp @@ -4,12 +4,14 @@ # or db::sanitarium or db::labsdb for the labsdb project class role::db::core { - $cluster = "mysql" + $cluster = 'mysql' - system::role { "db::core": description => "Core Database server" } + system::role { 'db::core': + description => 'Core Database server', + } - include standard, - mysql_wmf + include standard + include mysql_wmf } @@ -17,16 +19,18 @@ ## $instances must be a 2-level hash of the form: ## 'shard9001' => { port => NUMBER, innodb_log_file_size => "CORRECT_M", ram => "HELLA_G" }, ## 'shard9002' => { port => NUMBER+1, innodb_log_file_size => "CORRECT_M", ram => "HELLA_G" }, - $cluster = "mysql" + $cluster = 'mysql' - system::role {"role::db::sanitarium": description => "pre-labsdb dbs for Data Sanitization" } + system::role { 'role::db::sanitarium': + description => 'pre-labsdb dbs for Data Sanitization', + } - include standard, - cpufrequtils, - mysql_multi_instance + include standard + include cpufrequtils + include mysql_multi_instance - class { mysql : - package_name => 'mariadb-client-5.5' + class { 'mysql' : + package_name => 'mariadb-client-5.5', } ## for key in instances, make a mysql instance. need port, innodb_log_file_size, and amount of ram @@ -38,18 +42,18 @@ ## some per-node monitoring here $instances_count = size($instances_keys) - file { "/usr/lib/nagios/plugins/percona": - ensure => directory, + file { '/usr/lib/nagios/plugins/percona': + ensure => directory, recurse => true, - owner => root, - group => root, - mode => 0555, - source => "puppet:///modules/mysql_wmf/icinga/percona"; + owner => 'root', + group => 'root', + mode => '0555', + source => 'puppet:///modules/mysql_wmf/icinga/percona', } - nrpe::monitor_service { "mysqld": - description => "mysqld processes", - nrpe_command => "/usr/lib/nagios/plugins/check_procs -c ${instances_count}:${instances_count} -C mysqld" + nrpe::monitor_service { 'mysqld': + description => 'mysqld processes', + nrpe_command => "/usr/lib/nagios/plugins/check_procs -c ${instances_count}:${instances_count} -C mysqld", } } @@ -58,16 +62,18 @@ ## $instances must be a 2-level hash of the form: ## 'shard9001' => { port => NUMBER, innodb_log_file_size => "CORRECT_M", ram => "HELLA_G" }, ## 'shard9002' => { port => NUMBER+1, innodb_log_file_size => "CORRECT_M", ram => "HELLA_G" }, - $cluster = "mysql" + $cluster = 'mysql' - system::role {"role::db::labsdb": description => "labsdb dbs for labs use" } + system::role { 'role::db::labsdb': + description => 'labsdb dbs for labs use', + } - include standard, - cpufrequtils, - mysql_multi_instance + include standard + include cpufrequtils + include mysql_multi_instance - class { mysql : - package_name => 'mariadb-client-5.5' + class { 'mysql' : + package_name => 'mariadb-client-5.5', } ## for key in instances, make a mysql instance. need port, innodb_log_file_size, and amount of ram @@ -80,43 +86,44 @@ $instances_count = size($instances_keys) file { "/usr/lib/nagios/plugins/percona": - ensure => directory, + ensure => directory, recurse => true, - owner => root, - group => root, - mode => 0555, - source => "puppet:///modules/mysql_wmf/icinga/percona"; + owner => 'root', + group => 'root', + mode => '0555', + source => 'puppet:///modules/mysql_wmf/icinga/percona', } - nrpe::monitor_service { "mysqld": - description => "mysqld processes", - nrpe_command => "/usr/lib/nagios/plugins/check_procs -c ${instances_count}:${instances_count} -C mysqld" + nrpe::monitor_service { 'mysqld': + description => 'mysqld processes', + nrpe_command => "/usr/lib/nagios/plugins/check_procs -c ${instances_count}:${instances_count} -C mysqld", } } class role::labsdb::manager { - package { ["python-mysqldb", "python-yaml"]: - ensure => present; + package { ['python-mysqldb', 'python-yaml']: + ensure => present, } - file { - "/usr/local/sbin/skrillex.py": - owner => root, - group => wikidev, - mode => 0550, - source => "puppet:///files/mysql/skrillex.py"; - "/etc/skrillex.yaml": - owner => root, - group => root, - mode => 0400, - content => template('mysql_wmf/skrillex.yaml.erb'); + file { '/usr/local/sbin/skrillex.py': + owner => 'root', + group => 'wikidev', + mode => '0550', + source => 'puppet:///files/mysql/skrillex.py', + } + + file { '/etc/skrillex.yaml': + owner => 'root', + group => 'root', + mode => '0400', + content => template('mysql_wmf/skrillex.yaml.erb'), } } class role::db::maintenance { include mysql - package { "percona-toolkit": - ensure => latest; + package { 'percona-toolkit': + ensure => latest, } } -- To view, visit https://gerrit.wikimedia.org/r/122332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90406592f22c5c6021d9f36551a9abbe6a5c9840 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya <mata...@foss.co.il> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits