Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/293059

Change subject: [WIP] Install SmashPig db and schema
......................................................................

[WIP] Install SmashPig db and schema

Change-Id: I7c3f132dee026645b1c96183ff7ab1ff4465a62e
---
M puppet/modules/smashpig/manifests/init.pp
M puppet/modules/smashpig/templates/config.yaml.erb
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/59/293059/1

diff --git a/puppet/modules/smashpig/manifests/init.pp 
b/puppet/modules/smashpig/manifests/init.pp
index 147d2d4..078d227 100644
--- a/puppet/modules/smashpig/manifests/init.pp
+++ b/puppet/modules/smashpig/manifests/init.pp
@@ -46,4 +46,15 @@
             Class['::apache::mod::rewrite'],
         ],
     }
+
+    mysql::db { 'smashpig': }
+
+    exec { 'smashpig_schema':
+        command => "/usr/bin/mysql -uroot -p${mysql::root_password} smashpig 
-qfsA < ${dir}/Schema/001_CreatePendingTable.sql",
+        unless  => "/usr/bin/mysql -uroot -p${mysql::root_password} smashpig 
-qfsANe \"select 1 from smashpig.pending\" | /usr/bin/tail -1 | /bin/grep -q 1",
+        require => [
+            Git::Clone['wikimedia/fundraising/SmashPig'],
+            Mysql::Db['smashpig'],
+        ],
+    }
 }
diff --git a/puppet/modules/smashpig/templates/config.yaml.erb 
b/puppet/modules/smashpig/templates/config.yaml.erb
index 76a5291..c88c9b7 100644
--- a/puppet/modules/smashpig/templates/config.yaml.erb
+++ b/puppet/modules/smashpig/templates/config.yaml.erb
@@ -4,3 +4,8 @@
     data-store:
         stomp:
             lib-path: "<%= scope.lookupvar('crm::dir') 
%>/sites/all/modules/queue2civicrm/Stomp.php"
+        pending-db:
+            inst-args:
+                - mysql://localhost/pending
+                - root
+                - "<%= scope.lookupvar('mysql::root_password') %>"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c3f132dee026645b1c96183ff7ab1ff4465a62e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight <awi...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to