php-formula/docs/README.rst

604 lines
11 KiB
ReStructuredText
Raw Normal View History

.. _readme:
2013-07-30 00:37:17 +02:00
php-formula
===========
2013-07-30 00:37:17 +02:00
|img_travis| |img_sr|
2013-07-30 00:37:17 +02:00
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/php-formula.svg?branch=master
:alt: Travis CI Build Status
:scale: 100%
:target: https://travis-ci.com/saltstack-formulas/php-formula
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
:alt: Semantic Release
:scale: 100%
:target: https://github.com/semantic-release/semantic-release
Formula to set up and configure php
.. list-table::
:name: banner-breaking-changes-v1.0.0
:header-rows: 1
:widths: 1
* - WARNING: BREAKING CHANGES SINCE ``v1.0.0``
* - Prior to
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
this formula provided two methods for managing PHP;
the old method under ``php`` and the new method under ``php.ng``.
The old method has now been removed and ``php.ng`` has been promoted to
be ``php`` in its place.
If you are not in a position to migrate, please pin your repo to the final
release tag before
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
i.e.
`v0.41.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.41.0>`_.
To migrate from ``php.ng``, simply modify your pillar to promote the
entire section under ``php:ng`` so that it is under ``php`` instead.
So with the editor of your choice, highlight the entire section and then
unindent one level. Finish by removing the ``ng:`` line.
To migrate from the old ``php``, first convert to ``php.ng`` under
`v0.41.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.41.0>`_.
and then follow the steps laid out in the paragraph directly above.
.. contents:: **Table of Contents**
General notes
-------------
See the full `SaltStack Formulas installation and usage instructions
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
Contributing to this repo
-------------------------
**Commit message formatting is significant!!**
Please see :ref:`How to contribute <CONTRIBUTING>` for more details.
2013-07-30 00:37:17 +02:00
Available states
----------------
2013-07-30 00:37:17 +02:00
Please provide feedback by filing issues,
2014-06-06 19:14:44 +02:00
discussing in ``#salt`` in Freenode and the mailing list as normal.
**Note:** php states require the merge parameter of salt.modules.pillar.get(),
2014-06-06 19:14:44 +02:00
first available in the Helium release.
.. contents::
:local:
``php``
^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php package.
``php.adodb``
^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-adodb package.
``php.apache2``
^^^^^^^^^^^^^^^^^^
Meta-state that combines `php.apache2.install`_ and `php.apache2.ini`_.
``php.apache2.ini``
^^^^^^^^^^^^^^^^^^^^^^
Manages the apache2 php.ini file
``php.apache2.install``
^^^^^^^^^^^^^^^^^^^^^^^^^^
Installs the apache2 and libapache2-mod-php5 package. Debian Only.
``php.apc``
^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-apc package.
Disabled on opensuse need server:php repo
2014-06-06 19:14:44 +02:00
``php.apcu``
^^^^^^^^^^^^^^^
2015-04-25 12:35:29 +02:00
Installs the php-apcu package.
Disabled on opensuse need server:php repo
``php.auth-sasl``
^^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-auth-sasl package.
``php.bcmath``
^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-bcmath package.
``php.bz2``
^^^^^^^^^^^^^^
Installs the php-bz2 package.
``php.cache-lite``
^^^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-cache-lite package.
``php.cgi``
^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-cgi package.
Disabled on opensuse only php5-fastcgi available.
2014-06-06 19:14:44 +02:00
``php.cli``
^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Meta-state that combines `php.cli.install`_ and `php.cli.ini`_.
2014-06-06 19:14:44 +02:00
``php.cli.ini``
^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Manages the php-cli ini file.
``php.cli.install``
^^^^^^^^^^^^^^^^^^^^^^
Installs the php-cli package.
``php.composer``
^^^^^^^^^^^^^^^^^^^
2018-03-15 15:00:02 +01:00
Installs [composer](https://getcomposer.org) and keeps it updated.
``php.console-table``
^^^^^^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-console-table package.
``php.ctype``
^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-ctype package.
``php.curl``
^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php5-curl package on Debian, and ensures that curl itself is
installed for RedHat systems, this is due to the curl libs being provided by
php-common, which will get installed with the main php package.
``php.dba``
^^^^^^^^^^^^^^
Installs the php-dba package.
``php.dev``
^^^^^^^^^^^^^^
2016-07-06 11:31:15 +02:00
2018-11-02 01:43:04 +01:00
Installs the php5-dev and build-essential package.
``php.filter``
^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-filter package.
2016-07-06 11:31:15 +02:00
``php.fpm``
^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Meta-state that combines all php.fpm states.
2014-06-06 19:14:44 +02:00
``php.fpm.config``
^^^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Manages the (non-pool) php-fpm config files.
``php.fpm.install``
^^^^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-fpm package.
``php.fpm.pools``
^^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Meta-state that combines `php.fpm.service`_ and `php.fpm.pools_config`_
2014-06-06 19:14:44 +02:00
``php.fpm.pools_config``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Manages php-fpm pool config files.
``php.fpm.service``
^^^^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Manages the php-fpm service.
``php.gd``
^^^^^^^^^^^^^
Installs the php-gd package.
``php.gearman``
^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-gearman package.
``php.geoip``
^^^^^^^^^^^^^^^^
Installs the php-geoip package.
``php.geshi``
^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-geshi package.
``php.gettext``
^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-gettext package.
``php.gmp``
^^^^^^^^^^^^^^
Installs the php-gmp package. Debian Only.
``php.hash``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-hash package.
``php.http``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-http package.
``php.hhvm``
^^^^^^^^^^^^^^^
Meta-state that combines php.hhvm states
``php.hhvm.config``
^^^^^^^^^^^^^^^^^^^^^^
Manages the php-hhvm config files
``php.hhvm.install``
^^^^^^^^^^^^^^^^^^^^^^^
Installs the php-hhvm package
``php.hhvm.repo``
^^^^^^^^^.REPO^^^^^^
Configures the hhvm repo for debian/ubuntu
``php.hhvm.service``
^^^^^^^^^^^^^^^^^^^^^^^
Manages the php-hhvm service.
``php.igbinary``
^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
2019-03-20 16:46:59 +01:00
Installs the php-igbinary package.
2014-06-06 19:14:44 +02:00
``php.imagick``
^^^^^^^^^^^^^^^^^^
2019-03-20 16:46:59 +01:00
Installs the php-imagick package.
Disabled on opensuse no package.
``php.imap``
^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-imap package.
``php.intl``
^^^^^^^^^^^^^^^
2014-08-11 03:51:16 +02:00
Installs the php-intl package.
``php.json``
^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-json package.
``php.ldap``
^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-ldap package.
``php.mail``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-mail package.
``php.mbstring``
^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-mbstring package.
``php.mcrypt``
^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-mcrypt package.
``php.mdb2``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-mdb2 package.
``php.mdb2-driver-mysql``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-mdb2-driver-mysql package.
``php.mdb2-driver-pgsql``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-mdb2-driver-pgsql package.
``php.memcache``
^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-memcache package.
Disabled on opensuse need server:php:extensions repo
``php.memcached``
^^^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-memcached package.
Disabled on opensuse need server:php:extensions repo
``php.modules``
^^^^^^^^^^^^^^^^^^
Calls ``php.<name>`` for each entry in ``php:modules`` if available, or
try to install the matching packages that can be set via from
``php:lookup:pkgs``
``php.mongo``
^^^^^^^^^^^^^^^^
Installs the php-mongo package.
``php.mongodb``
^^^^^^^^^^^^^^^^^^
Installs the php-mongodb package.
``php.msgpack``
^^^^^^^^^^^^^^^^^^
Installs the php-msgpack package.
``php.mysql``
^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-mysql package.
``php.mysqlnd``
^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-mysqlnd package.
Disabled on opensuse no package.
2014-06-06 19:14:44 +02:00
``php.net-smtp``
^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-net-smtp package.
``php.net4``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-net4 package.
``php.net6``
^^^^^^^^^^^NET6
2018-11-02 01:43:04 +01:00
Installs the php-net6 package.
``php.oauth``
^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-oauth package.
2014-06-06 19:14:44 +02:00
``php.opcache``
^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-opcache package.
``php.openssl``
^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-openssl package.
``php.pear``
^^^^^^^^^^^^^^^
2014-12-17 10:53:35 +01:00
Installs the php-pear package.
2014-12-17 10:53:35 +01:00
``php.pgsql``
^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-pgsql package.
``php.phar``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-phar package.
``php.posix``
^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-posix package.
``php.pspell``
^^^^^^^^^^^^^^^^^
Installs the php-pspell package.
``php.readline``
^^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-readline package.
``php.redis``
^^^^^^^^^^^^^^^^
Installs the php-redis package.
Disabled on opensuse need server:php:extensions repo
``php.seclib``
^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-seclib package.
``php.session``
^^^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-session package.
``php.snmp``
^^^^^^^^^^^^^^^
2016-06-28 11:48:37 +02:00
Installs the php-snmp package.
``php.soap``
^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-soap package.
``php.sqlite``
^^^^^^^^^^^^^^^^^
2015-03-06 15:42:00 +01:00
Installs the php-sqlite package,
``php.ssh2``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-ssh2 package,
``php.suhosin``
^^^^^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
Installs the php-suhosin package.
``php.svn``
^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-svn package.
``php.sybase``
^^^^^^^^^^^^^^^^^
2017-04-25 12:42:04 +02:00
Installs the php-sybase package.
``php.tcpdf``
^^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-tcpdf package.
``php.tidy``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-tidy package.
``php.uuid``
^^^^^^^^^^^^^^^
2018-11-02 01:43:04 +01:00
Installs the php-uuid package.
``php.xcache``
^^^^^^^^^^^^^^^^^
2015-10-22 17:20:28 +02:00
Meta-state that combines `php.xcache.install`_ and `php.xcache.ini`_.
2015-10-23 23:35:05 +02:00
``php.xcache.ini``
^^^^^^^^^^^^^^^^^^^^^
2015-10-23 23:35:05 +02:00
Manages the php-xcache ini file
``php.xcache.install``
^^^^^^^^^^^^^^^^^^^^^^^^^
2015-10-23 23:35:05 +02:00
2015-10-22 17:20:28 +02:00
Installs the php-xcache package.
Disabled on opensuse need server:php:extensions repo
``php.xdebug``
^^^^^^^^^^^^^^^^^
Installs the php-xdebug package.
``php.xml``
^^^^^^^^^^^^^^
2014-06-06 19:14:44 +02:00
2014-07-29 01:18:08 +02:00
Installs the php-xml package.
``php.xsl``
^^^^^^^^^^^^^^
Installs the php-xsl package.
2016-07-13 09:59:30 +02:00
``php.zip``
^^^^^^^^^^^^^^
2018-03-15 23:56:36 +01:00
2018-11-02 01:43:04 +01:00
Installs the php-zip package.
Testing
-------
Linux testing is done with ``kitchen-salt``.
Requirements
^^^^^^^^^^^^
* Ruby
* Docker
.. code-block:: bash
$ gem install bundler
$ bundle install
$ bin/kitchen test [platform]
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
e.g. ``debian-9-2019-2-py3``.
``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^
Creates the docker instance and runs the ``template`` main state, ready for testing.
``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^
Runs the ``inspec`` tests on the actual instance.
``bin/kitchen destroy``
^^^^^^^^^^^^^^^^^^^^^^^
Removes the docker instance.
``bin/kitchen test``
^^^^^^^^^^^^^^^^^^^^
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
``bin/kitchen login``
^^^^^^^^^^^^^^^^^^^^^
Gives you SSH access to the instance for manual testing.