Chad has uploaded a new change for review.

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

Change subject: Install php5-xhprof unconditionally for PHP5 users
......................................................................

Install php5-xhprof unconditionally for PHP5 users

We're relying on it for development nowadays considering HHVM ships
it by default and it far outperforms MediaWiki's homegrown profiler.

Drop the role as it was pretty buggy anyway. We lose the fancy UI
stuff but I think that's an ok tradeoff for a working install and
parity with HHVM. You don't really need it for MediaWiki profiling
anyway.

Change-Id: Icac3c46e8838633c7bf52f54ebc51cc72ff9b020
---
M puppet/modules/php/manifests/init.pp
M puppet/modules/role/manifests/xhprof.pp
D puppet/modules/xhprof/files/xhprof-apache-config
D puppet/modules/xhprof/manifests/init.pp
4 files changed, 2 insertions(+), 84 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/79/177479/1

diff --git a/puppet/modules/php/manifests/init.pp 
b/puppet/modules/php/manifests/init.pp
index 6b42f6d..f6aeaa9 100644
--- a/puppet/modules/php/manifests/init.pp
+++ b/puppet/modules/php/manifests/init.pp
@@ -24,6 +24,7 @@
         'php5-mysql',
         'php5-sqlite',
         'php5-readline',
+        'php5-xhprof',
     ]:
         ensure  => present,
         require => Class['::apache::mod::php5'],
diff --git a/puppet/modules/role/manifests/xhprof.pp 
b/puppet/modules/role/manifests/xhprof.pp
index 4b81ffc..7d16ccb 100644
--- a/puppet/modules/role/manifests/xhprof.pp
+++ b/puppet/modules/role/manifests/xhprof.pp
@@ -15,7 +15,5 @@
 #   } );
 #
 class role::xhprof {
-    include ::xhprof
-
-    require_package('graphviz')
+    # include ::xhprof
 }
diff --git a/puppet/modules/xhprof/files/xhprof-apache-config 
b/puppet/modules/xhprof/files/xhprof-apache-config
deleted file mode 100644
index 4d83082..0000000
--- a/puppet/modules/xhprof/files/xhprof-apache-config
+++ /dev/null
@@ -1,11 +0,0 @@
-# vim: filetype=apache sts=4 sw=4 autoindent
-#
-# Apache site configuration for XHProf
-# This file is managed by Puppet.
-#
-
-<Directory /usr/share/php/xhprof_html>
-</Directory>
-
-Alias /xhprof "/usr/share/php/xhprof_html"
-
diff --git a/puppet/modules/xhprof/manifests/init.pp 
b/puppet/modules/xhprof/manifests/init.pp
deleted file mode 100644
index 3772adb..0000000
--- a/puppet/modules/xhprof/manifests/init.pp
+++ /dev/null
@@ -1,70 +0,0 @@
-# == Class: xhprof
-#
-# This Puppet class configures XHProf, a function-level hierarchical
-# profiler for PHP with a simple HTML based navigational interface.
-#
-# === Parameters
-#
-# [*profile_storage_dir*]
-#   Path where profiles should be stored. Default: '/vagrant/profiles'.
-#
-class xhprof (
-    $profile_storage_dir = '/vagrant/profiles'
-) {
-
-    $xhprof_version      = '0.9.4'
-    $installed_module    = '/usr/lib/php5/20121212/xhprof.so'
-
-    exec { 'download_xhprof':
-        cwd     => '/tmp',
-        creates => $installed_module,
-        command => "wget http://pecl.php.net/get/xhprof-${xhprof_version}.tgz";,
-    }
-
-    exec { 'extract_xhprof':
-        cwd     => '/tmp',
-        command => "tar -xzf xhprof-${xhprof_version}.tgz",
-        creates => $installed_module,
-        require => Exec['download_xhprof'],
-    }
-
-    exec { 'install_xhprof':
-        cwd     => "/tmp/xhprof-${xhprof_version}/extension",
-        command => 'phpize && ./configure && make && make install',
-        creates => $installed_module,
-        require => [ Exec['extract_xhprof'], Package['php5-dev'] ],
-    }
-
-    exec { 'install_xhprof_assets':
-        cwd     => "/tmp/xhprof-${xhprof_version}",
-        command => "cp -rf /tmp/xhprof-${xhprof_version}/xhprof_html 
/tmp/xhprof-${xhprof_version}/xhprof_lib /usr/share/php",
-        creates => '/usr/share/php/xhprof_html',
-        # php-pear ensures existance of /usr/share/php, better way?
-        require => [ Exec['install_xhprof'], Package['php-pear'] ],
-    }
-
-    php::ini { 'xhprof':
-        require  => Exec['install_xhprof'],
-        settings => {
-            'extension'         => 'xhprof.so',
-            # Not used by the extension directly, used by the
-            # XHProf_Runs utility class
-            'xhprof.output_dir' => $profile_storage_dir,
-        }
-    }
-
-    # Directory used, by default, to store profile runs
-    file { $profile_storage_dir:
-        ensure => directory,
-        owner  => $::share_owner,
-        group  => $::share_group,
-        mode   => '0775',
-    }
-
-    # Enable xhprof viewer on /xhprof directory of devwiki
-    apache::conf { 'xhprof':
-        ensure  => present,
-        source  => 'puppet:///modules/xhprof/xhprof-apache-config',
-        require => Php::Ini['xhprof'],
-    }
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icac3c46e8838633c7bf52f54ebc51cc72ff9b020
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

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

Reply via email to