Mwalker has uploaded a new change for review.
https://gerrit.wikimedia.org/r/96811
Change subject: OCG Collection
......................................................................
OCG Collection
Change-Id: Ied8b5ac362319be65606530575d56a96085f7fe1
---
A files/misc/ocg-collection.conf
M manifests/role/ocg.pp
2 files changed, 69 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/11/96811/1
diff --git a/files/misc/ocg-collection.conf b/files/misc/ocg-collection.conf
new file mode 100644
index 0000000..2a4cb0a
--- /dev/null
+++ b/files/misc/ocg-collection.conf
@@ -0,0 +1,17 @@
+# vim: set ft=upstart:
+
+#####################################################################
+### THIS FILE IS MANAGED BY PUPPET
+### puppet:///files/misc/ocg-collection.msc
+#####################################################################
+
+# Upstart configuration file for the MediaWiki Collection extension OCG
+
+description "MediaWiki Collection Offline Content Generator"
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
+
+exec /var/lib/ocg/collection/mw-collection-ocg.js
+
+respawn
diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index cb170d3..a177d6d 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -6,7 +6,7 @@
@monitor_group { "ocg_eqiad": description => "offline content generator eqiad"
}
class role::ocg {
- system::role { "ocg": description => "offline content generator" }
+ system::role { "ocg": description => "offline content generator base" }
package {
[ 'nodejs' ]:
@@ -22,3 +22,54 @@
ensure => latest;
}
}
+
+class role::ocg::collection {
+ system::role { "ocg-collection": description => "offline concent generator
for Collection extension" }
+
+ deployment::target { 'ocg-collection': }
+
+ package { [
+ 'texlive-xetex',
+ 'imagemagick',
+ ]: ensure => latest;
+ }
+
+ file { '/var/lib/ocg':
+ ensure => directory,
+ owner => ocg,
+ group => wikidev,
+ mode => '2775',
+ }
+
+ file { '/var/lib/ocg/collection':
+ ensure => link,
+ target => '/srv/deployment/ocg/Collection',
+ }
+
+ file { '/etc/init/ocg-collection':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => '0555',
+ source => 'puppet:///files/misc/ocg-collection.conf',
+ }
+
+ generic::systemuser { 'ocg':
+ name => 'ocg',
+ default_group => 'ocg',
+ home => '/var/lib/ocg',
+ }
+
+ service { 'ocg-collection':
+ ensure => running,
+ hasstatus => false,
+ hasrestart => false,
+ enable => true,
+ require => File['/etc/init/ocg-collection.conf'],
+ }
+
+ monitor_service { 'ocg-collection':
+ description => 'Offline Content Generation - Collection',
+ check_command => 'check_http_on_port!17080',
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/96811
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied8b5ac362319be65606530575d56a96085f7fe1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mwalker <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits