# Manages the php-hhvm main ini file | |||||
{% from "php/ng/map.jinja" import php with context %} | |||||
{% from "php/ng/ini.jinja" import php_ini %} | |||||
{% set ini_settings = php.ini.defaults %} | |||||
{% do ini_settings.update(php.hhvm.config.ini.settings) %} | |||||
{% set conf_settings = php.lookup.hhvm.defaults %} | |||||
{% do conf_settings.update(php.hhvm.config.conf.settings) %} | |||||
php_hhvm_ini_config: | |||||
{{ php_ini(php.lookup.hhvm.ini, php.hhvm.config.ini.opts, ini_settings) }} | |||||
php_hhvm_conf_config: | |||||
{{ php_ini(php.lookup.hhvm.conf, php.hhvm.config.conf.opts, conf_settings) }} | |||||
# Meta-state to fully install php.hhvm | |||||
include: | |||||
- php.ng.hhvm.repo | |||||
- php.ng.hhvm.config | |||||
- php.ng.hhvm.service | |||||
extend: | |||||
php_hhvm_service: | |||||
service: | |||||
- watch: | |||||
- file: php_hhvm_ini_cnfig | |||||
- file: php_hhvm_conf_config | |||||
- require: | |||||
- sls: php.ng.hhvm.config | |||||
php_hhvm_ini_config: | |||||
file: | |||||
- require: | |||||
- pkg: php_install_hhvm | |||||
php_hhvm_conf_config: | |||||
file: | |||||
- require: | |||||
- pkg: php_install_hhvm |
{% set state = 'hhvm' %} | |||||
{% include "php/ng/installed.jinja" %} |
# Manages the php-hhvm service. | |||||
{% from "php/ng/map.jinja" import php with context %} | |||||
include: | |||||
- php.ng.hhvm.install | |||||
{% if salt['grains.get']('os_family') == 'Debian' -%} | |||||
hhvm_repo: | |||||
pkgrepo.managed: | |||||
- name: deb http://dl.hhvm.com/{{ salt['grains.get']('os')|lower }} {{ salt['grains.get']('oscodename')}} main | |||||
- file: /etc/apt/sources.list.d/hhvm.list | |||||
- keyid: 0x5a16e7281be7a449 | |||||
- keyserver: keyserver.ubuntu.com | |||||
- refresh_db: True | |||||
- require_in: | |||||
- pkg: php_install_hhvm | |||||
{%- endif %} |
# Manages the php-hhvm service. | |||||
{% from "php/ng/map.jinja" import php with context %} | |||||
{% from "php/ng/macro.jinja" import sls_block %} | |||||
{% set service_function = {True:'running', False:'dead'}.get(php.hhvm.service.enabled) %} | |||||
include: | |||||
- php.ng.hhvm.install | |||||
php_hhvm_service: | |||||
service.{{ service_function }}: | |||||
{{ sls_block(php.hhvm.service.opts) }} | |||||
- name: {{ php.lookup.hhvm.service }} | |||||
- enable: {{ php.hhvm.service.enabled }} | |||||
- require: | |||||
- sls: php.ng.hhvm.install | |||||
- watch: | |||||
- pkg: php_install_hhvm | |||||
'apache2': 'libapache2-mod-php5', | 'apache2': 'libapache2-mod-php5', | ||||
'curl': 'php5-curl', | 'curl': 'php5-curl', | ||||
'fpm': 'php5-fpm', | 'fpm': 'php5-fpm', | ||||
'hhvm': 'hhvm', | |||||
'gd': 'php5-gd', | 'gd': 'php5-gd', | ||||
'gmp': 'php5-gmp', | 'gmp': 'php5-gmp', | ||||
'geoip': 'php5-geoip', | 'geoip': 'php5-geoip', | ||||
('include', '/etc/php5/fpm/pool.d/*.conf'), | ('include', '/etc/php5/fpm/pool.d/*.conf'), | ||||
]), | ]), | ||||
}, | }, | ||||
'hhvm': { | |||||
'conf': '/etc/hhvm/server.ini', | |||||
'ini': '/etc/hhvm/php.ini', | |||||
'service': 'hhvm', | |||||
'defaults': odict([ | |||||
('global', odict([ | |||||
('pid', '/var/run/hhvm.pid'), | |||||
('error_log', '/var/log/hhvm.log'), | |||||
])), | |||||
]), | |||||
}, | |||||
'cli': { | 'cli': { | ||||
'ini': '/etc/php5/cli/php.ini', | 'ini': '/etc/php5/cli/php.ini', | ||||
}, | }, | ||||
}, | }, | ||||
'pools': {}, | 'pools': {}, | ||||
}, | }, | ||||
'hhvm': { | |||||
'service': { | |||||
'enabled': True, | |||||
'opts': {}, | |||||
}, | |||||
'config': { | |||||
'ini': { | |||||
'opts': {}, | |||||
'settings': {}, | |||||
}, | |||||
'conf': { | |||||
'opts': {}, | |||||
'settings': {}, | |||||
}, | |||||
}, | |||||
}, | |||||
'cli': { | 'cli': { | ||||
'ini': { | 'ini': { | ||||
'opts': {}, | 'opts': {}, |