jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I899afbb0b7c35523d928c4d2ddcfaa3e3212911a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to