GithubHelp home page GithubHelp logo

gpkfr / puppet-php-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voxpupuli/puppet-php

0.0 3.0 0.0 597 KB

Puppet module to manage PHP FPM on Debian, Ubuntu, RedHat/CentOS, SuSE

Home Page: https://forge.puppetlabs.com/mayflower/php

License: Other

Ruby 26.29% Puppet 49.34% HTML 24.37%

puppet-php-1's Introduction

mayflower/php Puppet Module

Build Status

mayflower/php is a Puppet module for managing PHP with a strong focus on php-fpm. We strive to support all recent versions of Debian, Ubuntu, RedHat/CentOS and openSuSE/SLES. Managing Apache with mod_php is not supported.

This originally was a fork of jippi/puppet-php (nodes-php on Puppet Forge) but has since been rewritten in large parts.

Usage

The module aims to use sane defaults for the supported architectures. You must use hiera to configure most aspects of this module.

The recommended way is to include the php main class in your manifests:

include ::php

You can configure the module through hiera. Here are the defaults for some parameters as you would specify them in hiera:

php::ensure: latest
php::manage_repos: true
php::fpm: true
php::dev: true
php::composer: true
php::pear: true
php::phpunit: false
php::fpm::config:log_level: notice
php::composer::auto_update: true

There are more configuration options available. Please refer to the documention in the manifests for a complete overview.

Defining php.ini settings

PHP configuration parmaters in php.ini files can be defined as parameter settings on the php, php::fpm and php::cli classes or php::extension resources for each component independently.

These settings are written into their respective php.ini file. Global settings in php::settings are merged with the settings of all components. Please note that settings of extensions are always independent.

In the following example the timezone will be set in the PHP cli application and all php-fpm pools.

php::settings:
  Date/date.timezone: Europe/Berlin
php::cli::settings:
  PHP/memory_limit: 512M
php::fpm::settings:
  PHP/short_open_tag: 'On'

Installing extensions

Extensions can be installed and configured by defining the hash php::extensions in hiera. They are activated for all activated components.

php::extensions:
  json: {}
  mysql: {}
  memcached:
    provider: pecl
    header_packages:
      - libmemcached-dev
  apc:
    package_prefix: php-
    settings:
      apc.stat: 1
      apc.stat_ctime: 1

Notes

Debian squeeze & Ubuntu precise come with PHP 5.3

On Debian-based systems, we use php5enmod to enable extension-specific configuration. This script is only present in php5 packages beginning with version 5.4. Furthermore, PHP 5.3 is not supported by upstream anymore.

We strongly suggest you use a recent PHP version, even if you're using an older though still supported distribution release. Our default is to have php::manage_repos enabled to add apt sources for Dotdeb on Debian and ppa:ondrej/php5 on Ubuntu with packages for the current stable PHP version closely tracking upstream.

Apache support

Apache with mod_php is not supported by this module. Please use puppetlabs/apache instead.

We prefer using php-fpm. You can find an example Apache vhost in manifests/apache_vhost.pp that shows you how to use mod_proxy_fcgi to connect to php-fpm.

Bugs & New Features

If you happen to stumble upon a bug, please feel free to create a pull request with a fix (optionally with a test), and a description of the bug and how it was resolved.

Or if you're not into coding, simply create an issue adding steps to let us reproduce the bug and we will happily fix it.

If you have a good idea for a feature or how to improve this module in general, please create an issue to discuss it. We are very open to feedback. Pull requests are always welcome.

We hate orphaned and unmaintained Puppet modules as much as you do and therefore promise that we will continue to maintain this module and keep response times to issues short. If we happen to lose interest, we will write a big fat warning into this README to let you know.

License

The project is released under the permissive MIT license.

The source can be found at github.com/Mayflower/puppet-php.

This Puppet module is being actively maintained by some fellow puppeteers at Mayflower GmbH.

puppet-php-1's People

Contributors

jippi avatar fpletz avatar globin avatar fdammeke avatar nyholm avatar igalic avatar leoc avatar dbeckham avatar jonhattan avatar ca-asm avatar xalopp avatar toote avatar justicel avatar haraldsk avatar dbellettini avatar sw0x2a avatar fadenb avatar dev-zero avatar smoriahnyt avatar peterbraden avatar blaind avatar sqmk avatar marten-cz avatar m3co-code avatar ltrebing avatar ukwm-deploy avatar im-bpriestman avatar extraordinaire avatar antaflos avatar

Watchers

James Cloos avatar Gpkfr avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.