Nikerabbit has uploaded a new change for review.
https://gerrit.wikimedia.org/r/148967
Change subject: Update hhvm config
......................................................................
Update hhvm config
* Bring closer to mediawiki vagrant
** Moved most settings to php.ini
** Updated dynamic extension path
** But the admin consoles etc were not added
* Use unix socket
* Disable hhvm fastcgi by default still
Change-Id: I9da2a1c359835df9fe246faf2f6d067a7f1e0ed7
---
A puppet/hiera.yaml
A puppet/modules/git
M puppet/modules/hhvm/files/config.hdf
A puppet/modules/hhvm/files/php.ini
D puppet/modules/hhvm/files/server.ini
M puppet/modules/hhvm/files/upstart
M puppet/modules/hhvm/manifests/init.pp
M puppet/modules/nginx/files/translatewiki.net
8 files changed, 45 insertions(+), 62 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/translatewiki
refs/changes/67/148967/1
diff --git a/puppet/hiera.yaml b/puppet/hiera.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/puppet/hiera.yaml
diff --git a/puppet/modules/git b/puppet/modules/git
new file mode 160000
index 0000000..5a03063
--- /dev/null
+++ b/puppet/modules/git
+Subproject commit 5a03063a8a1c1beda56490f9601f788c98155bcb
diff --git a/puppet/modules/hhvm/files/config.hdf
b/puppet/modules/hhvm/files/config.hdf
index fc28082..160aafd 100644
--- a/puppet/modules/hhvm/files/config.hdf
+++ b/puppet/modules/hhvm/files/config.hdf
@@ -1,48 +1,11 @@
# This file is managed by puppet
-PidFile = /var/run/hhvm/pid
-
-Server {
- Type = fastcgi
- Port = 9000
- IP = 127.0.0.1
- GzipCompressionLevel = 0
-}
-
Eval {
- EnableZendCompat = true
- Jit = true
PerfPidMap = false
}
-
-DynamicExtensionPath = /usr/lib/hphp/extensions/20131007
DynamicExtensions {
* = luasandbox.so
* = fss.so
* = wikidiff2.so
-}
-
-Log {
- Level = Notice
- AlwaysLogUnhandledExceptions = true
- UseLogFile = true
- UseSyslog = false
- File = /var/log/hhvm/error.log
- Access {
- * {
- File = /var/log/hhvm/access.log
- Format = %h %l %u % t \”%r\” %>s %b
- }
- }
-}
-
-Repo {
- Central {
- Path = /var/run/hhvm/hhvm.hhbc
- }
-}
-
-MySQL {
- TypedResults = false
}
diff --git a/puppet/modules/hhvm/files/php.ini
b/puppet/modules/hhvm/files/php.ini
new file mode 100644
index 0000000..d5f58af
--- /dev/null
+++ b/puppet/modules/hhvm/files/php.ini
@@ -0,0 +1,32 @@
+; This file is managed by puppet
+
+; php options
+pid = /run/hhvm/pid
+date.timezone = 'UTC'
+
+; hhvm specific
+hhvm.server.ip = 127.0.0.1
+hhvm.server.file_socket = /run/hhvm/hhvm.sock
+hhvm.server.type = fastcgi
+hhvm.server.gzip_compression_level = 0
+
+hhvm.dynamic_extension_path = /usr/lib/hphp/extensions/20140702
+
+hhvm.jit = true
+hhvm.jit_afrozen_size = 100000000
+
+hhvm.log.level = Notice
+hhvm.log.always_log_unhandled_exceptions = true
+hhvm.log.runtime_error_reporting_level = 8191
+hhvm.log.use_log_file = true
+hhvm.log.use_syslog = false
+hhvm.log.file = /var/log/hhvm/error.log
+hhvm.log.access.file = /var/log/hhvm/access.log
+hhvm.log.access.format = %h %l %u % t \”%r\” %>s %b
+
+hhvm.repo.central.path = /run/hhvm/hhvm.hhbc
+
+hhvm.enable_zend_compat = true
+
+hhvm.mysql.typed_results = false
+hhvm.mysql.slow_query_threshold = 5000
diff --git a/puppet/modules/hhvm/files/server.ini
b/puppet/modules/hhvm/files/server.ini
deleted file mode 100644
index c3faa9f..0000000
--- a/puppet/modules/hhvm/files/server.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-; php options
-
-pid = /var/run/hhvm/pid
-
-; hhvm specific
-
-hhvm.server.port = 9000
-hhvm.server.type = fastcgi
-hhvm.log.level = Info
-hhvm.log.always_log_unhandled_exceptions = true
-hhvm.log.runtime_error_reporting_level = 8191
-hhvm.log.use_log_file = true
-hhvm.log.file = /var/log/hhvm/error.log
-hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
-hhvm.mysql.typed_results = false
-hhvm.mysql.connect_timeout = 100
-hhvm.mysql.slow_query_threshold = 1000
diff --git a/puppet/modules/hhvm/files/upstart
b/puppet/modules/hhvm/files/upstart
index 1c7fe5c..f489a93 100644
--- a/puppet/modules/hhvm/files/upstart
+++ b/puppet/modules/hhvm/files/upstart
@@ -5,8 +5,8 @@
start on (local-filesystems and net-device-up IFACE!=lo)
pre-start script
- mkdir -p -m0755 /var/run/hhvm
- chown -R www-data:www-data /var/run/hhvm
+ mkdir -p -m0755 /run/hhvm
+ chown -R www-data:www-data /run/hhvm
mkdir -p -m0755 /var/log/hhvm
chown -R www-data:www-data /var/log/hhvm
end script
diff --git a/puppet/modules/hhvm/manifests/init.pp
b/puppet/modules/hhvm/manifests/init.pp
index 61a601c..b2faa5c 100644
--- a/puppet/modules/hhvm/manifests/init.pp
+++ b/puppet/modules/hhvm/manifests/init.pp
@@ -20,11 +20,10 @@
}
package { [ 'hhvm', 'hhvm-dev', 'hhvm-fss', 'hhvm-luasandbox',
'hhvm-wikidiff2' ]:
+ ensure => latest,
before => Service['hhvm'],
require => Apt::Source['wikimedia'],
}
-
- package { 'hhvm-nightly': ensure => absent, }
file { '/etc/hhvm':
ensure => directory,
@@ -42,6 +41,12 @@
notify => Service['hhvm'],
}
+ file { '/etc/hhvm/php.ini':
+ source => 'puppet:///modules/hhvm/php.ini',
+ require => Package['hhvm'],
+ notify => Service['hhvm'],
+ }
+
service { 'hhvm':
ensure => running,
provider => upstart,
diff --git a/puppet/modules/nginx/files/translatewiki.net
b/puppet/modules/nginx/files/translatewiki.net
index 0d98d27..a257aa5 100644
--- a/puppet/modules/nginx/files/translatewiki.net
+++ b/puppet/modules/nginx/files/translatewiki.net
@@ -40,11 +40,11 @@
# Allowed php files, case sensitive
location ~
^/w/(i|index|load|api|opensearch_desc|profileinfo|webfiles/jserror)\.php$ {
- set $fastcgi_pass_value unix:/var/run/php5-fpm.sock;
+ set $fastcgi_pass_value unix:/run/php5-fpm.sock;
- if ($cookie_hhvm = "1") {
- set $fastcgi_pass_value 127.0.0.1:9000;
- }
+# if ($cookie_hhvm = "1") {
+# set $fastcgi_pass_value unix:/run/hhvm/hhvm.sock;
+# }
fastcgi_pass $fastcgi_pass_value;
fastcgi_buffers 16 4k;
--
To view, visit https://gerrit.wikimedia.org/r/148967
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9da2a1c359835df9fe246faf2f6d067a7f1e0ed7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits