Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/85412
Change subject: Add Xvfb module
......................................................................
Add Xvfb module
Adds a module that installs the X virtual framebuffer package and
configures an instance to run as a persistent Upstart service.
May be used in conjunction with a graphical web browser.
Change-Id: I899afbb0b7c35523d928c4d2ddcfaa3e3212911a
---
A puppet/modules/xvfb/manifests/init.pp
A puppet/modules/xvfb/templates/xvfb.conf.erb
2 files changed, 69 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant
refs/changes/12/85412/1
diff --git a/puppet/modules/xvfb/manifests/init.pp
b/puppet/modules/xvfb/manifests/init.pp
new file mode 100644
index 0000000..71333f8
--- /dev/null
+++ b/puppet/modules/xvfb/manifests/init.pp
@@ -0,0 +1,53 @@
+# == Class: xvfb
+#
+# Xvfb or X virtual framebuffer is an X11 server that performs all
+# graphical operations in memory, not showing any screen output.
+# It's useful for automating graphical applications. This module
+# configures a persistent Xvfb daemon.
+#
+# === Parameters
+#
+# [*display*]
+# X display number. Default: 99.
+#
+# [*resolution*]
+# Virtual framebuffer resolution, expressed as WIDTHxHEIGHTxDEPTH.
+# Default: '1024x768x24'.
+#
+# === Examples
+#
+# class { 'xvfb':
+# resolution => '800x600x16',
+# display => 100,
+# }
+#
+class xvfb(
+ $display = 99,
+ $resolution = '1024x768x24',
+) {
+ package { 'xvfb':
+ ensure => present,
+ }
+
+ group { 'xvfb':
+ ensure => present,
+ }
+
+ user { 'xvfb':
+ ensure => present,
+ gid => 'xvfb',
+ shell => '/bin/false',
+ home => '/nonexistent',
+ system => true,
+ }
+
+ file { '/etc/init/xvfb.conf':
+ content => template('xvfb/xvfb.conf.erb'),
+ require => [ Package['xvfb'], User['xvfb'] ],
+ }
+
+ service { 'xvfb':
+ provider => 'upstart',
+ require => File['/etc/init/xvfb.conf'],
+ }
+}
diff --git a/puppet/modules/xvfb/templates/xvfb.conf.erb
b/puppet/modules/xvfb/templates/xvfb.conf.erb
new file mode 100644
index 0000000..9d94c51
--- /dev/null
+++ b/puppet/modules/xvfb/templates/xvfb.conf.erb
@@ -0,0 +1,16 @@
+# xvfb - X virtual framebuffer
+#
+# Xvfb or X virtual framebuffer is an X11 server that performs all
+# graphical operations in memory, not showing any screen output.
+#
+description "X virtual framebuffer"
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+
+setuid xvfb
+setgid xvfb
+
+respawn
+respawn limit 10 5
+
+exec Xvfb :<%= @display %> -screen 0 <%= @resolution %> -ac
--
To view, visit https://gerrit.wikimedia.org/r/85412
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I899afbb0b7c35523d928c4d2ddcfaa3e3212911a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits