From 2ac605800f20663aa8a9d9f09bc5d1713f11c62f Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 11 Jan 2018 18:07:40 +0100 Subject: [PATCH] Install PHP 7.1 from RedHat SCL refs #2989 --- .puppet/modules/php/manifests/init.pp | 11 +++++++++-- .puppet/modules/php/manifests/phpd.pp | 2 +- .puppet/modules/scl/manifests/init.pp | 19 +++++++++++++++++++ .../profiles/icingaweb2_dev/manifests/init.pp | 10 +++++++++- .../templates/icingaweb.conf.erb | 8 ++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 .puppet/modules/scl/manifests/init.pp diff --git a/.puppet/modules/php/manifests/init.pp b/.puppet/modules/php/manifests/init.pp index d6dd9e328..e903a1e30 100644 --- a/.puppet/modules/php/manifests/init.pp +++ b/.puppet/modules/php/manifests/init.pp @@ -9,6 +9,8 @@ # Requires: # # apache +# epel +# scl # # Sample Usage: # @@ -18,11 +20,16 @@ class php { include apache include epel + include scl - package { 'php': + package { 'rh-php71-php-fpm': ensure => latest, notify => Service['apache'], - require => Package['apache'], + require => [ Class['scl'], Package['apache'] ], + } + -> service { 'rh-php71-php-fpm': + ensure => running, + enable => true, } package { 'php-pecl-xdebug': diff --git a/.puppet/modules/php/manifests/phpd.pp b/.puppet/modules/php/manifests/phpd.pp index dab28aec1..f2e29a3d3 100644 --- a/.puppet/modules/php/manifests/phpd.pp +++ b/.puppet/modules/php/manifests/phpd.pp @@ -17,6 +17,6 @@ define php::phpd { file { "/etc/php.d/$name.ini": content => template("php/$name.ini.erb"), notify => Service['apache'], - require => Package['php'], + require => Package['rh-php71-php-fpm'], } } diff --git a/.puppet/modules/scl/manifests/init.pp b/.puppet/modules/scl/manifests/init.pp new file mode 100644 index 000000000..722e17946 --- /dev/null +++ b/.puppet/modules/scl/manifests/init.pp @@ -0,0 +1,19 @@ +# Class: scl +# +# This class installs centos-release-scl. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# include scl +# +class scl { + package { 'centos-release-scl': + ensure => latest, + } +} diff --git a/.puppet/profiles/icingaweb2_dev/manifests/init.pp b/.puppet/profiles/icingaweb2_dev/manifests/init.pp index 1192f5904..8d4e41d2f 100644 --- a/.puppet/profiles/icingaweb2_dev/manifests/init.pp +++ b/.puppet/profiles/icingaweb2_dev/manifests/init.pp @@ -21,7 +21,15 @@ class icingaweb2_dev ( } # TODO(el): icinga-gui is not a icingaweb2_dev package - package { [ 'php-gd', 'php-intl', 'php-pdo', 'php-ldap', 'php-phpunit-PHPUnit' ]: + package { [ + 'rh-php71-php-gd', + 'rh-php71-php-intl', + 'rh-php71-php-pdo', + 'rh-php71-php-mysqlnd', + 'rh-php71-php-pgsql', + 'rh-php71-php-ldap', + 'php-phpunit-PHPUnit' + ]: ensure => latest, notify => Service['apache'], require => Class['icinga_packages'], diff --git a/.puppet/profiles/icingaweb2_dev/templates/icingaweb.conf.erb b/.puppet/profiles/icingaweb2_dev/templates/icingaweb.conf.erb index c8b23e97a..62555a188 100644 --- a/.puppet/profiles/icingaweb2_dev/templates/icingaweb.conf.erb +++ b/.puppet/profiles/icingaweb2_dev/templates/icingaweb.conf.erb @@ -18,8 +18,10 @@ Alias /<%= @web_path %> "/vagrant/public" SetEnv ICINGAWEB_CONFIGDIR <%= @config %> + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 EnableSendfile Off + DirectoryIndex index.php RewriteEngine on @@ -31,6 +33,12 @@ Alias /<%= @web_path %> "/vagrant/public" RewriteRule ^.*$ index.php [NC,L] + + + SetHandler "proxy:fcgi://127.0.0.1:9000" + ErrorDocument 503 /icingaweb2/error_unavailable.html + + DirectoryIndex error_norewrite.html ErrorDocument 404 /error_norewrite.html