Ori.livneh has submitted this change and it was merged.
Change subject: hhvm: abstract out backports to a hhvm module
......................................................................
hhvm: abstract out backports to a hhvm module
The HHVM package we use requires liboost 1.0.49 which is not available
in Ubuntu Precise. Ori added a third party ppa in
applicationserver::hhvm , I need the same setup for the contint slaves.
This patch creates a new hhvm puppet module which hold the backport
logic in the standalone hhvm::backports. The hhvm class install the
package and require the backport to be installed.
In applicationserver, simply include the class, keeping the
apache_mod_fastcgi_for_hhvm requirement.
Also added hhvm to contint slaves.
Change-Id: I3bab6e0ec5f1fc769ee0e2659d73ded82c6980ed
---
M modules/applicationserver/manifests/hhvm.pp
M modules/contint/manifests/packages/labs.pp
A modules/hhvm/manifests/backports.pp
A modules/hhvm/manifests/init.pp
4 files changed, 41 insertions(+), 11 deletions(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/applicationserver/manifests/hhvm.pp
b/modules/applicationserver/manifests/hhvm.pp
index 769a5c3..0109d4a 100644
--- a/modules/applicationserver/manifests/hhvm.pp
+++ b/modules/applicationserver/manifests/hhvm.pp
@@ -12,16 +12,7 @@
fail('applicationserver::hhvm may only be deployed to Labs.')
}
- apt::repository { 'boost_backports':
- uri => 'http://ppa.launchpad.net/mapnik/boost/ubuntu',
- dist => 'precise',
- components => 'main',
- keyfile => 'puppet:///files/misc/boost-backports.key',
- before => Package['hhvm'],
- }
-
- package { 'hhvm':
- ensure => present,
+ class { 'hhvm':
require => Apache_module['apache_mod_fastcgi_for_hhvm'],
}
diff --git a/modules/contint/manifests/packages/labs.pp
b/modules/contint/manifests/packages/labs.pp
index 8fad6ae..d7ace87 100644
--- a/modules/contint/manifests/packages/labs.pp
+++ b/modules/contint/manifests/packages/labs.pp
@@ -45,7 +45,7 @@
}
# Facebook Hiphop virtual machine
- package { 'hhvm': ensure => present }
+ include ::hhvm
# Bring tox/virtualenv... from pip bug 44443
# TODO: Reevaluate this once we switch to trusty. Maybe provider being apt
diff --git a/modules/hhvm/manifests/backports.pp
b/modules/hhvm/manifests/backports.pp
new file mode 100644
index 0000000..ee552b7
--- /dev/null
+++ b/modules/hhvm/manifests/backports.pp
@@ -0,0 +1,20 @@
+# == Class hhvm::backports
+#
+# Recent hhvm versions requires liboost 1.0.49 which is not shipped by
+# Ubuntu Precise. We rely on a third-party PPA.
+#
+# Can only be applied on Labs.
+#
+# You most probably want to use the 'hhvm' puppet class instead.
+class hhvm::backports {
+ if $::realm != 'labs' {
+ fail( 'hhvm::backports may only be deployed to Labs.' )
+ }
+
+ apt::repository { 'boost_backports':
+ uri => 'http://ppa.launchpad.net/mapnik/boost/ubuntu',
+ dist => 'precise',
+ components => 'main',
+ keyfile => 'puppet:///files/misc/boost-backports.key',
+ }
+}
diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp
new file mode 100644
index 0000000..83a9246
--- /dev/null
+++ b/modules/hhvm/manifests/init.pp
@@ -0,0 +1,19 @@
+# == Class hhvm
+#
+# Install hhvm and its dependencies.
+#
+# Can only be applied on Labs.
+#
+class hhvm {
+ if $::realm != 'labs' {
+ fail( 'hhvm may only be deployed to Labs.' )
+ }
+
+ include hhvm::backports
+
+ package { 'hhvm':
+ ensure => present,
+ require => Class['hhvm::backports'],
+ }
+
+}
--
To view, visit https://gerrit.wikimedia.org/r/123573
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3bab6e0ec5f1fc769ee0e2659d73ded82c6980ed
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[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