Jcrespo has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/337814 )
Change subject: mariadb: Move grants and mysqld config files to the role
......................................................................
mariadb: Move grants and mysqld config files to the role
Templates autoloading dir is deprecated. As a result, we
have to move the files around ( to role/templates/mariadb).
Check that we do not break anything in the process, specially
for analytics submodules.
Change-Id: Icedb5f8c299112801d8293cfe11f07fb48c22033
---
M modules/mariadb
M modules/role/manifests/analytics_cluster/database/meta.pp
M modules/role/manifests/labs/db/master.pp
M modules/role/manifests/labs/db/replica.pp
M modules/role/manifests/labs/db/slave.pp
M modules/role/manifests/labs/dns.pp
M modules/role/manifests/mariadb.pp
M modules/role/manifests/mariadb/dbstore.pp
M modules/role/manifests/mariadb/dbstore2.pp
M modules/role/manifests/parsoid/testing.pp
R modules/role/templates/mariadb/grants/dns.sql.erb
R modules/role/templates/mariadb/grants/production-core.sql.erb
R modules/role/templates/mariadb/grants/production-m1.sql.erb
R modules/role/templates/mariadb/grants/production-m2.sql.erb
R modules/role/templates/mariadb/grants/production-m3.sql.erb
R modules/role/templates/mariadb/grants/production-m4.sql.erb
R modules/role/templates/mariadb/grants/production-m5.sql.erb
R modules/role/templates/mariadb/grants/production-parsercache-m5.sql.erb
R modules/role/templates/mariadb/grants/production.sql.erb
R modules/role/templates/mariadb/grants/research-grants.sql.erb
R modules/role/templates/mariadb/grants/wikitech.sql.erb
R modules/role/templates/mariadb/mysqld_config/analytics-meta.my.cnf.erb
R
modules/role/templates/mariadb/mysqld_config/analytics-meta.my.cnf.production.erb
R modules/role/templates/mariadb/mysqld_config/analytics.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/beta.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/dbstore2.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/default.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/dns.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/eventlogging.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/labs.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/misc.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/parsercache.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/parsoid_testing.my.cnf
R modules/role/templates/mariadb/mysqld_config/phabricator.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/production.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/sanitarium2.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/tendril.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/tools.my.cnf.erb
R modules/role/templates/mariadb/mysqld_config/wikitech.my.cnf.erb
42 files changed, 25 insertions(+), 25 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/14/337814/1
diff --git a/modules/mariadb b/modules/mariadb
index 3a09aee..40a7a02 160000
--- a/modules/mariadb
+++ b/modules/mariadb
@@ -1 +1 @@
-Subproject commit 3a09aee8dd90d8f7f7b2aacd8b0175e8ed0bdd5e
+Subproject commit 40a7a02836b1cd892834c985ac78746483837c09
diff --git a/modules/role/manifests/analytics_cluster/database/meta.pp
b/modules/role/manifests/analytics_cluster/database/meta.pp
index 46b5083..48fc0d0 100644
--- a/modules/role/manifests/analytics_cluster/database/meta.pp
+++ b/modules/role/manifests/analytics_cluster/database/meta.pp
@@ -12,8 +12,8 @@
# Production instance has large innodb_buffer_pool_size.
# Unfortunetly this is not configurable via parameters or
# hiera with the mariadb::config class.
- 'production' => 'mariadb/analytics-meta.my.cnf.production.erb',
- default => 'mariadb/analytics-meta.my.cnf.erb',
+ 'production' =>
'role/mariadb/mysqld_config/analytics-meta.my.cnf.production.erb',
+ default => 'role/mariadb/mysqld_config/analytics-meta.my.cnf.erb',
}
class { '::mariadb::config':
diff --git a/modules/role/manifests/labs/db/master.pp
b/modules/role/manifests/labs/db/master.pp
index 873ee98..fb4d1a1 100644
--- a/modules/role/manifests/labs/db/master.pp
+++ b/modules/role/manifests/labs/db/master.pp
@@ -20,7 +20,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/tools.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/tools.my.cnf.erb',
datadir => '/srv/labsdb/data',
tmpdir => '/tmp',
ssl => 'puppet-cert',
diff --git a/modules/role/manifests/labs/db/replica.pp
b/modules/role/manifests/labs/db/replica.pp
index 64ca374..33f0b86 100644
--- a/modules/role/manifests/labs/db/replica.pp
+++ b/modules/role/manifests/labs/db/replica.pp
@@ -40,7 +40,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/labsdb-replica.my.cnf.erb',
+ config =>
'role/mariadb/mysqld_config/labsdb-replica.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
read_only => 'ON',
diff --git a/modules/role/manifests/labs/db/slave.pp
b/modules/role/manifests/labs/db/slave.pp
index ae430ef..7d71e2e 100644
--- a/modules/role/manifests/labs/db/slave.pp
+++ b/modules/role/manifests/labs/db/slave.pp
@@ -18,7 +18,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/tools.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/tools.my.cnf.erb',
datadir => '/srv/labsdb/data',
tmpdir => '/srv/labsdb/tmp',
read_only => 'ON',
diff --git a/modules/role/manifests/labs/dns.pp
b/modules/role/manifests/labs/dns.pp
index 90b3997..44fa93d 100644
--- a/modules/role/manifests/labs/dns.pp
+++ b/modules/role/manifests/labs/dns.pp
@@ -37,7 +37,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/dns.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/dns.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
read_only => 'off',
@@ -55,7 +55,7 @@
owner => 'root',
group => 'root',
mode => '0400',
- content => template('mariadb/grants-dns.sql.erb'),
+ content => template('role/mariadb/grants/dns.sql.erb'),
}
ferm::service { 'udp_dns_rec':
diff --git a/modules/role/manifests/mariadb.pp
b/modules/role/manifests/mariadb.pp
index 59742d7..35ce6ee 100644
--- a/modules/role/manifests/mariadb.pp
+++ b/modules/role/manifests/mariadb.pp
@@ -45,14 +45,14 @@
owner => 'root',
group => 'root',
mode => '0400',
- content => template('mariadb/production-grants.sql.erb'),
+ content => template('role/mariadb/grants/production.sql.erb'),
}
file { '/root/.my.cnf':
owner => 'root',
group => 'root',
mode => '0400',
- content => template('mariadb/root.my.cnf.erb'),
+ content => template('role/mariadb/mysqld_config/root.my.cnf.erb'),
}
if $shard {
@@ -72,7 +72,7 @@
owner => 'root',
group => 'root',
mode => '0400',
- content => template("mariadb/production-grants-${shard}.sql.erb"),
+ content =>
template("role/mariadb/grants/production-${shard}.sql.erb"),
}
}
}
@@ -90,7 +90,7 @@
owner => 'root',
group => 'root',
mode => '0400',
- content => template('mariadb/production-grants-core.sql.erb'),
+ content => template('role/mariadb/grants/production-core.sql.erb'),
}
}
@@ -106,7 +106,7 @@
owner => 'root',
group => 'root',
mode => '0400',
- content => template('mariadb/grants-wikitech.sql.erb'),
+ content => template('role/mariadb/grants/wikitech.sql.erb'),
}
}
@@ -236,7 +236,7 @@
include mariadb::service
class { 'mariadb::config':
- config => 'mariadb/misc.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/misc.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
ssl => 'puppet-cert',
@@ -299,7 +299,7 @@
$stopwords_database = 'phabricator_search'
class { 'mariadb::config':
- config => 'mariadb/phabricator.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/phabricator.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
sql_mode => 'STRICT_ALL_TABLES',
@@ -390,7 +390,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/eventlogging.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/eventlogging.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
read_only => $read_only,
@@ -437,7 +437,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/beta.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/beta.my.cnf.erb',
}
class { 'mariadb::service':
@@ -478,7 +478,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/tendril.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/tendril.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
ssl => 'puppet-cert',
@@ -634,7 +634,7 @@
include role::labs::db::check_private_data
class { 'mariadb::config':
- config => 'mariadb/sanitarium.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/sanitarium.my.cnf.erb',
}
ferm::service { 'mysqld_sanitarium':
@@ -725,7 +725,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/sanitarium2.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/sanitarium2.my.cnf.erb',
ssl => 'puppet-cert',
}
@@ -827,7 +827,7 @@
include mariadb::service
class { 'mariadb::config':
- config => 'mariadb/wikitech.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/wikitech.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
}
@@ -947,7 +947,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/parsercache.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/parsercache.my.cnf.erb',
datadir => '/srv/sqldata-cache',
tmpdir => '/srv/tmp',
ssl => 'puppet-cert',
diff --git a/modules/role/manifests/mariadb/dbstore.pp
b/modules/role/manifests/mariadb/dbstore.pp
index a042403..75c34e9 100644
--- a/modules/role/manifests/mariadb/dbstore.pp
+++ b/modules/role/manifests/mariadb/dbstore.pp
@@ -30,7 +30,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/dbstore.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/dbstore.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
ssl => 'puppet-cert',
diff --git a/modules/role/manifests/mariadb/dbstore2.pp
b/modules/role/manifests/mariadb/dbstore2.pp
index 032eaea..c02e768 100644
--- a/modules/role/manifests/mariadb/dbstore2.pp
+++ b/modules/role/manifests/mariadb/dbstore2.pp
@@ -30,7 +30,7 @@
}
class { 'mariadb::config':
- config => 'mariadb/dbstore2.my.cnf.erb',
+ config => 'role/mariadb/mysqld_config/dbstore2.my.cnf.erb',
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
ssl => 'puppet-cert',
diff --git a/modules/role/manifests/parsoid/testing.pp
b/modules/role/manifests/parsoid/testing.pp
index 8530496..1532329 100644
--- a/modules/role/manifests/parsoid/testing.pp
+++ b/modules/role/manifests/parsoid/testing.pp
@@ -39,7 +39,7 @@
}
file { '/etc/my.cnf':
- content => template('mariadb/parsoid_testing.my.cnf'),
+ content =>
template('role/mariadb/mysqld_config/parsoid_testing.my.cnf'),
owner => 'root',
group => 'parsoid-test-roots',
mode => '0440',
diff --git a/templates/mariadb/grants-dns.sql.erb
b/modules/role/templates/mariadb/grants/dns.sql.erb
similarity index 100%
rename from templates/mariadb/grants-dns.sql.erb
rename to modules/role/templates/mariadb/grants/dns.sql.erb
diff --git a/templates/mariadb/production-grants-core.sql.erb
b/modules/role/templates/mariadb/grants/production-core.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-core.sql.erb
rename to modules/role/templates/mariadb/grants/production-core.sql.erb
diff --git a/templates/mariadb/production-grants-m1.sql.erb
b/modules/role/templates/mariadb/grants/production-m1.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-m1.sql.erb
rename to modules/role/templates/mariadb/grants/production-m1.sql.erb
diff --git a/templates/mariadb/production-grants-m2.sql.erb
b/modules/role/templates/mariadb/grants/production-m2.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-m2.sql.erb
rename to modules/role/templates/mariadb/grants/production-m2.sql.erb
diff --git a/templates/mariadb/production-grants-m3.sql.erb
b/modules/role/templates/mariadb/grants/production-m3.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-m3.sql.erb
rename to modules/role/templates/mariadb/grants/production-m3.sql.erb
diff --git a/templates/mariadb/production-grants-m4.sql.erb
b/modules/role/templates/mariadb/grants/production-m4.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-m4.sql.erb
rename to modules/role/templates/mariadb/grants/production-m4.sql.erb
diff --git a/templates/mariadb/production-grants-m5.sql.erb
b/modules/role/templates/mariadb/grants/production-m5.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-m5.sql.erb
rename to modules/role/templates/mariadb/grants/production-m5.sql.erb
diff --git a/templates/mariadb/production-grants-parsercache.sql.erb
b/modules/role/templates/mariadb/grants/production-parsercache-m5.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants-parsercache.sql.erb
rename to
modules/role/templates/mariadb/grants/production-parsercache-m5.sql.erb
diff --git a/templates/mariadb/production-grants.sql.erb
b/modules/role/templates/mariadb/grants/production.sql.erb
similarity index 100%
rename from templates/mariadb/production-grants.sql.erb
rename to modules/role/templates/mariadb/grants/production.sql.erb
diff --git a/templates/mariadb/research-grants.sql.erb
b/modules/role/templates/mariadb/grants/research-grants.sql.erb
similarity index 100%
rename from templates/mariadb/research-grants.sql.erb
rename to modules/role/templates/mariadb/grants/research-grants.sql.erb
diff --git a/templates/mariadb/grants-wikitech.sql.erb
b/modules/role/templates/mariadb/grants/wikitech.sql.erb
similarity index 100%
rename from templates/mariadb/grants-wikitech.sql.erb
rename to modules/role/templates/mariadb/grants/wikitech.sql.erb
diff --git a/templates/mariadb/analytics-meta.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/analytics-meta.my.cnf.erb
similarity index 100%
rename from templates/mariadb/analytics-meta.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/analytics-meta.my.cnf.erb
diff --git a/templates/mariadb/analytics-meta.my.cnf.production.erb
b/modules/role/templates/mariadb/mysqld_config/analytics-meta.my.cnf.production.erb
similarity index 100%
rename from templates/mariadb/analytics-meta.my.cnf.production.erb
rename to
modules/role/templates/mariadb/mysqld_config/analytics-meta.my.cnf.production.erb
diff --git a/templates/mariadb/analytics.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/analytics.my.cnf.erb
similarity index 100%
rename from templates/mariadb/analytics.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/analytics.my.cnf.erb
diff --git a/templates/mariadb/beta.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/beta.my.cnf.erb
similarity index 100%
rename from templates/mariadb/beta.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/beta.my.cnf.erb
diff --git a/templates/mariadb/dbstore.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
similarity index 100%
rename from templates/mariadb/dbstore.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
diff --git a/templates/mariadb/dbstore2.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/dbstore2.my.cnf.erb
similarity index 100%
rename from templates/mariadb/dbstore2.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/dbstore2.my.cnf.erb
diff --git a/templates/mariadb/default.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/default.my.cnf.erb
similarity index 100%
rename from templates/mariadb/default.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/default.my.cnf.erb
diff --git a/templates/mariadb/dns.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/dns.my.cnf.erb
similarity index 100%
rename from templates/mariadb/dns.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/dns.my.cnf.erb
diff --git a/templates/mariadb/eventlogging.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/eventlogging.my.cnf.erb
similarity index 100%
rename from templates/mariadb/eventlogging.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/eventlogging.my.cnf.erb
diff --git a/templates/mariadb/labs.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/labs.my.cnf.erb
similarity index 100%
rename from templates/mariadb/labs.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/labs.my.cnf.erb
diff --git a/templates/mariadb/labsdb-replica.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
similarity index 100%
rename from templates/mariadb/labsdb-replica.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
diff --git a/templates/mariadb/misc.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/misc.my.cnf.erb
similarity index 100%
rename from templates/mariadb/misc.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/misc.my.cnf.erb
diff --git a/templates/mariadb/parsercache.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/parsercache.my.cnf.erb
similarity index 100%
rename from templates/mariadb/parsercache.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/parsercache.my.cnf.erb
diff --git a/templates/mariadb/parsoid_testing.my.cnf
b/modules/role/templates/mariadb/mysqld_config/parsoid_testing.my.cnf
similarity index 100%
rename from templates/mariadb/parsoid_testing.my.cnf
rename to modules/role/templates/mariadb/mysqld_config/parsoid_testing.my.cnf
diff --git a/templates/mariadb/phabricator.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/phabricator.my.cnf.erb
similarity index 100%
rename from templates/mariadb/phabricator.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/phabricator.my.cnf.erb
diff --git a/templates/mariadb/production.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/production.my.cnf.erb
similarity index 100%
rename from templates/mariadb/production.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/production.my.cnf.erb
diff --git a/templates/mariadb/sanitarium.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
similarity index 100%
rename from templates/mariadb/sanitarium.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
diff --git a/templates/mariadb/sanitarium2.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/sanitarium2.my.cnf.erb
similarity index 100%
rename from templates/mariadb/sanitarium2.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/sanitarium2.my.cnf.erb
diff --git a/templates/mariadb/tendril.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/tendril.my.cnf.erb
similarity index 100%
rename from templates/mariadb/tendril.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/tendril.my.cnf.erb
diff --git a/templates/mariadb/tools.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/tools.my.cnf.erb
similarity index 100%
rename from templates/mariadb/tools.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/tools.my.cnf.erb
diff --git a/templates/mariadb/wikitech.my.cnf.erb
b/modules/role/templates/mariadb/mysqld_config/wikitech.my.cnf.erb
similarity index 100%
rename from templates/mariadb/wikitech.my.cnf.erb
rename to modules/role/templates/mariadb/mysqld_config/wikitech.my.cnf.erb
--
To view, visit https://gerrit.wikimedia.org/r/337814
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icedb5f8c299112801d8293cfe11f07fb48c22033
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits