Jcrespo has submitted this change and it was merged.

Change subject: Add mysql grants for racktables
......................................................................


Add mysql grants for racktables

Change-Id: I1d0aa2c2e63e2b0cc64512cc2bc48dc244c28571
References: T118816
---
M manifests/role/mariadb.pp
M templates/mariadb/production-grants-m1.sql.erb
2 files changed, 14 insertions(+), 5 deletions(-)

Approvals:
  Jcrespo: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index a092e80..43a3f2a 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -18,12 +18,15 @@
     include passwords::tendril
     include passwords::nodepool
     include passwords::testreduce::mysql
+    include passwords::racktables
 
-    $root_pass    = $passwords::misc::scripts::mysql_root_pass
-    $repl_pass    = $passwords::misc::scripts::mysql_repl_pass
-    $nagios_pass  = $passwords::misc::scripts::nagios_sql_pass
-    $tendril_user = $passwords::tendril::db_user
-    $tendril_pass = $passwords::tendril::db_pass
+    $root_pass       = $passwords::misc::scripts::mysql_root_pass
+    $repl_pass       = $passwords::misc::scripts::mysql_repl_pass
+    $nagios_pass     = $passwords::misc::scripts::nagios_sql_pass
+    $tendril_user    = $passwords::tendril::db_user
+    $tendril_pass    = $passwords::tendril::db_pass
+    $racktables_user = $passwords::racktables::racktables_db_user
+    $racktables_pass = $passwords::racktables::racktables_db_pass
 
     file { '/etc/mysql/production-grants.sql':
         ensure  => present,
diff --git a/templates/mariadb/production-grants-m1.sql.erb 
b/templates/mariadb/production-grants-m1.sql.erb
index d96b0bf..7580a24 100644
--- a/templates/mariadb/production-grants-m1.sql.erb
+++ b/templates/mariadb/production-grants-m1.sql.erb
@@ -47,3 +47,9 @@
 
 GRANT ALL PRIVILEGES
     ON `rt`.* TO 'rt'@'10.64.0.165';
+
+-- racktables
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
+ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW,
+CREATE ROUTINE, ALTER ROUTINE, TRIGGER ON `racktables`.* TO
+'<%=@racktables_user%>'@'10.64.32.182' IDENTIFIED BY '<%=@racktables_pass%>';

-- 
To view, visit https://gerrit.wikimedia.org/r/267232
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d0aa2c2e63e2b0cc64512cc2bc48dc244c28571
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to