Browse Source

Merge pull request #64 from danoe/dev

manage xcache.ini in pillar
tags/v0.34.0
Forrest 9 years ago
parent
commit
256145736a
6 changed files with 171 additions and 26 deletions
  1. +76
    -26
      README.rst
  2. +57
    -0
      php/ng/map.jinja
  3. +15
    -0
      php/ng/xcache/ini.sls
  4. +11
    -0
      php/ng/xcache/init.sls
  5. +2
    -0
      php/ng/xcache/install.sls
  6. +10
    -0
      pillar.example

+ 76
- 26
README.rst View File



Installs the php-intl package. Installs the php-intl package.



``php.imagick`` ``php.imagick``
--------------- ---------------




Installs the php-mcrypt package. Installs the php-mcrypt package.



``php.memcache`` ``php.memcache``
---------------- ----------------




Installs the php-adodb package. Installs the php-adodb package.


``php.ng.apache2``
----------------

Meta-state that combines `php.ng.apache2.install`_ and `php.ng.apache2.ini`_.

``php.ng.apache2.ini``
--------------

Manages the apache2 php.ini file

``php.ng.apache2.install``
--------------

Installs the apache2 and libapache2-mod-php5 package. Debian Only.

``php.ng.apc`` ``php.ng.apc``
-------------- --------------




Meta-state that combines `php.ng.cli.install`_ and `php.ng.cli.ini`_. Meta-state that combines `php.ng.cli.install`_ and `php.ng.cli.ini`_.


``php.ng.cli.install``
----------------------

Installs the php-cli package.

``php.ng.cli.ini`` ``php.ng.cli.ini``
------------------ ------------------


Manages the php-cli ini file. Manages the php-cli ini file.


``php.ng.cli.install``
----------------------

Installs the php-cli package.

``php.ng.curl`` ``php.ng.curl``
--------------- ---------------




Manages the (non-pool) php-fpm config files. Manages the (non-pool) php-fpm config files.



``php.ng.fpm.install`` ``php.ng.fpm.install``
---------------------- ----------------------


Installs the php-fpm package. Installs the php-fpm package.



``php.ng.fpm.pools`` ``php.ng.fpm.pools``
-------------------- --------------------


Meta-state that combines `php.ng.fpm.service`_ and `php.ng.fpm.pools_config`_ Meta-state that combines `php.ng.fpm.service`_ and `php.ng.fpm.pools_config`_



``php.ng.fpm.pools_config`` ``php.ng.fpm.pools_config``
--------------------------- ---------------------------


Manages php-fpm pool config files. Manages php-fpm pool config files.



``php.ng.fpm.service`` ``php.ng.fpm.service``
---------------------- ----------------------


Manages the php-fpm service. Manages the php-fpm service.


``php.ng.gd``
-------------

Installs the php-gd package.

``php.ng.geoip``
----------------------

Installs the php-geoip package.

``php.ng.gmp``
----------

Installs the php-gmp package. Debian Only.

``php.ng.hhvm`` ``php.ng.hhvm``
--------------- ---------------




Manages the php-hhvm service. Manages the php-hhvm service.


``php.ng.gd``
-------------

Installs the php-gd package.


``php.ng.imagick`` ``php.ng.imagick``
------------------ ------------------




Installs the php-mcrypt package. Installs the php-mcrypt package.



``php.ng.memcache`` ``php.ng.memcache``
------------------- -------------------


Installs the php-memcache package. Installs the php-memcache package.
Disabled on opensuse need server:php:extensions repo Disabled on opensuse need server:php:extensions repo



``php.ng.memcached`` ``php.ng.memcached``
-------------------- --------------------


Installs the php-memcached package. Installs the php-memcached package.
Disabled on opensuse need server:php:extensions repo Disabled on opensuse need server:php:extensions repo



``php.ng.mysql`` ``php.ng.mysql``
---------------- ----------------


Installs the php-mysqlnd package. Installs the php-mysqlnd package.
Disabled on opensuse no package. Disabled on opensuse no package.


``php.ng.pear``
``php.ng.oauth``
--------------- ---------------


Installs the php-pear package.
Installs the php-oauth package.


``php.ng.redis``
``php.ng.pear``
--------------- ---------------


Installs the php-redis package.
Disabled on opensuse need server:php:extensions repo

Installs the php-pear package.


``php.ng.pgsql`` ``php.ng.pgsql``
---------------- ----------------


Installs the php-pgsql package. Installs the php-pgsql package.


``php.ng.pspell``
----------------

Installs the php-pspell package.

``php.ng.redis``
---------------

Installs the php-redis package.
Disabled on opensuse need server:php:extensions repo

``php.ng.soap`` ``php.ng.soap``
--------------- ---------------




Installs the php-suhosin package. Installs the php-suhosin package.


``php.ng.xcache``
---------------

Meta-state that combines `php.ng.xcache.install`_ and `php.ng.xcache.ini`_.

``php.ng.xcache.ini``
---------------

Manages the php-xcache ini file

``php.ng.xcache.install``
---------------

Installs the php-xcache package.
Disabled on opensuse need server:php:extensions repo

``php.ng.xdebug``
--------------

Installs the php-xdebug package.

``php.ng.xml`` ``php.ng.xml``
-------------- --------------


Installs the php-xml package. Installs the php-xml package.

``php.ng.xsl``
--------------

Installs the php-xsl package.

+ 57
- 0
php/ng/map.jinja View File

'pspell': 'php5-pspell', 'pspell': 'php5-pspell',
'soap': 'php-soap', 'soap': 'php-soap',
'sqlite': 'php5-sqlite', 'sqlite': 'php5-sqlite',
'xcache': 'php5-xcache',
'xdebug': 'php5-xdebug', 'xdebug': 'php5-xdebug',
'xsl': 'php5-xsl', 'xsl': 'php5-xsl',
'xml': 'php5', 'xml': 'php5',
'apache2': { 'apache2': {
'ini': '/etc/php5/apache2/php.ini', 'ini': '/etc/php5/apache2/php.ini',
}, },
'xcache': {
'ini': '/etc/php5/mods-available/xcache.ini',
'defaults': {},
},
}, },
'RedHat': { 'RedHat': {
'pkgs': { 'pkgs': {
'pear': 'php-pear', 'pear': 'php-pear',
'soap': 'php-soap', 'soap': 'php-soap',
'sqlite': 'php5-sqlite', 'sqlite': 'php5-sqlite',
'xcache': 'php-xcache',
'xml': 'php-xml', 'xml': 'php-xml',
'redis': 'php-redis', 'redis': 'php-redis',
'imagick': 'php-imagick', 'imagick': 'php-imagick',
'cli': { 'cli': {
'ini': '/etc/php.ini', 'ini': '/etc/php.ini',
}, },
'xcache': {
'ini': '/etc/php.d/xcache.ini',
},
}, },
'Suse': { 'Suse': {
'pkgs': { 'pkgs': {
'memcached': 'php-memcached', 'memcached': 'php-memcached',
'pear': 'php-pear', 'pear': 'php-pear',
'sqlite': 'php-sqlite', 'sqlite': 'php-sqlite',
'xcache': 'php-xcache',
'pgsql': 'php-pgsql', 'pgsql': 'php-pgsql',
'ldap': 'php-ldap', 'ldap': 'php-ldap',
}, },
'cli': { 'cli': {
'ini': '/etc/php.ini', 'ini': '/etc/php.ini',
}, },
'xcache': {
'ini': '/etc/php/conf.d/xcache.ini',
},
}, },
}), }),
'fpm': { 'fpm': {
'settings': {}, 'settings': {},
} }
}, },
'xcache': {
'ini': {
'defaults': {
'xcache-common': {
'extension': 'xcache.so',
},
'xcache.admin': {
'xcache.admin.enable_auth': 'On',
},
'xcache': {
'xcache.shm_scheme': '"mmap"',
'xcache.size': '60M',
'xcache.count': '1',
'xcache.slots': '8K',
'xcache.ttl': '0',
'xcache.gc_interval': '0',
'xcache.var_size': '4M',
'xcache.var_count': '1',
'xcache.var_slots': '8K',
'xcache.var_ttl': '0',
'xcache.var_maxttl': '0',
'xcache.var_gc_interval': '300',
'xcache.var_namespace_mode': '0',
'xcache.var_namespace': '""',
'xcache.readonly_protection': 'Off',
'xcache.mmap_path': '"/dev/zero"',
'xcache.coredump_directory': '""',
'xcache.coredump_type': '0',
'xcache.disable_on_crash': 'Off',
'xcache.experimental': 'Off',
'xcache.cacher': 'On',
'xcache.stat': 'On',
'xcache.optimizer': 'Off',
},
'xcache.coverager': {
'xcache.coverager': 'Off',
'xcache.coverager_autostart': 'On',
'xcache.coveragedump_directory': '""',
},
},
'opts': {},
'settings': {},
}
},
'ini': { 'ini': {
'defaults': { 'defaults': {
'PHP': { 'PHP': {

+ 15
- 0
php/ng/xcache/ini.sls View File

# Manages the php cli main ini file
{% from 'php/ng/map.jinja' import php with context %}
{% from "php/ng/ini.jinja" import php_ini %}

{% set settings = php.xcache.ini.defaults %}
{% for key, value in php.xcache.ini.settings.iteritems() %}
{% if settings[key] is defined %}
{% do settings[key].update(value) %}
{% else %}
{% do settings.update({key: value}) %}
{% endif %}
{% endfor %}

php_xcache_ini:
{{ php_ini(php.lookup.xcache.ini, php.xcache.ini.opts, settings) }}

+ 11
- 0
php/ng/xcache/init.sls View File

# Installs php-xcache and manages the associated xcache.ini

include:
- php.ng.xcache.install
- php.ng.xcache.ini

extend:
php_xcache_ini:
file:
- require:
- sls: php.ng.xcache.install

+ 2
- 0
php/ng/xcache/install.sls View File

{% set state = 'xcache' %}
{% include "php/ng/installed.jinja" %}

+ 10
- 0
pillar.example View File

PHP: PHP:
engine: 'Off' engine: 'Off'


# php-xcache settings
xcache:
ini:
opts: {}
# contents of the xcache.ini file that are merged with defaults
# from php.xcache.ini.defaults. See php.ng.ini.defaults for ini-style
settings:
xcache:
xcache.size: 90M

# global php.ini settings # global php.ini settings
ini: ini:
# Default php.ini contents. These follow a strict format. The top- # Default php.ini contents. These follow a strict format. The top-

Loading…
Cancel
Save