Commit 7836b955c26826ddbd8698cb225fe6802d50e76d
1 parent
baae975d
Bump to v0.5.0. Add support for PHP5.6-FPM on Ubuntu. Add some cosmetic changes.
Showing
7 changed files
with
59 additions
and
12 deletions
1 | +## 0.5.0 - 2016-11-22 | |
2 | +### Added | |
3 | +- PHP-FPM recipe: Add support for PHP5.6-FPM on Ubuntu. On other platforms, setting the version to '5.6' will generate a fatal error. | |
4 | + | |
5 | +### Changed | |
6 | +- Nginx recipe: Shorten filenames of included config files (remove "inc" prefix). | |
7 | + | |
1 | 8 | ## 0.4.4 - 2016-11-09 |
2 | 9 | ### Added |
3 | 10 | - Nginx recipe: Add template file customization for the main site config and for all site types. | ... | ... |
... | ... | @@ -27,7 +27,13 @@ Ubuntu 14.04 |
27 | 27 | <td><tt>['cfe-nginx-php-fpm']['php-fpm']['exts']</tt></td> |
28 | 28 | <td>Array</td> |
29 | 29 | <td>PHP extension packages to be installed. Without the "php5-" or "php-" prefix.</td> |
30 | - <td><tt>['mysqlnd', 'cli', 'curl']</tt></td> | |
30 | + <td><tt>['mysqlnd', 'cli', 'curl', 'zip']</tt></td> | |
31 | + </tr> | |
32 | + <tr> | |
33 | + <td><tt>['cfe-nginx-php-fpm']['php-fpm']['version']</tt></td> | |
34 | + <td>String</td> | |
35 | + <td>PHP version. Can only be either '5.5' (the default) or '5.6'.</td> | |
36 | + <td><tt>'5.5'</tt></td> | |
31 | 37 | </tr> |
32 | 38 | <tr> |
33 | 39 | <td><tt>['cfe-nginx-php-fpm']['openssl']['dh_modulus']</tt></td> | ... | ... |
... | ... | @@ -23,12 +23,14 @@ |
23 | 23 | default['cfe-nginx-php-fpm']['postfix']['update_cacert'] = true |
24 | 24 | default['cfe-nginx-php-fpm']['postfix']['email_domain'] = 'example.com' |
25 | 25 | |
26 | +# Version is either '5.5' (default) or '5.6' | |
27 | +default['cfe-nginx-php-fpm']['php-fpm']['version'] = '5.5' | |
26 | 28 | # If your php-fpm pool is not named 'www', then delete |
27 | 29 | # the default one ('www'), which is automatically installed by php-fpm |
28 | 30 | default['cfe-nginx-php-fpm']['php-fpm']['delete_pool_www'] = true |
29 | -default['cfe-nginx-php-fpm']['php-fpm']['exts'] = [ | |
30 | - 'mysqlnd', 'cli', 'curl' | |
31 | -] | |
31 | +default['cfe-nginx-php-fpm']['php-fpm']['exts'] = %w{ | |
32 | + mysqlnd cli curl zip | |
33 | +} | |
32 | 34 | |
33 | 35 | default['cfe-nginx-php-fpm']['openssl']['dh_modulus'] = 4096 |
34 | 36 | |
... | ... | @@ -262,6 +264,17 @@ default['php-fpm']['pools'] = [ |
262 | 264 | } |
263 | 265 | ] |
264 | 266 | |
267 | +if node['cfe-nginx-php-fpm']['php-fpm']['version'] == '5.6' | |
268 | + case node['platform'] | |
269 | + when 'ubuntu' | |
270 | + default['php-fpm']['conf_file'] = '/etc/php/5.6/fpm/php-fpm.conf' | |
271 | + default['php-fpm']['conf_dir'] = '/etc/php/5.6/fpm/conf.d' | |
272 | + default['php-fpm']['pool_conf_dir'] = '/etc/php/5.6/fpm/pool.d' | |
273 | + default['php-fpm']['package_name'] = 'php5.6-fpm' | |
274 | + default['php-fpm']['service_name'] = 'php5.6-fpm' | |
275 | + end | |
276 | +end | |
277 | + | |
265 | 278 | # |
266 | 279 | # mariadb cookbook |
267 | 280 | # | ... | ... |
... | ... | @@ -37,8 +37,14 @@ define :php_ext, :action => :install do |
37 | 37 | end |
38 | 38 | |
39 | 39 | when 'debian' |
40 | + str = '' | |
41 | + str = if node['platform'] == 'ubuntu' && | |
42 | + node['cfe-nginx-php-fpm']['php-fpm']['version'] == '5.6' | |
43 | + '.6' | |
44 | + end | |
45 | + | |
40 | 46 | unless rhel_only.include?(params[:name]) |
41 | - package "php5-#{params[:name]}" do | |
47 | + package "php5#{str}-#{params[:name]}" do | |
42 | 48 | action params[:action] |
43 | 49 | end |
44 | 50 | ... | ... |
... | ... | @@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com' |
4 | 4 | license 'Apache License' |
5 | 5 | description 'Simplifies setup of Nginx+PHP-FPM in Chromedia.' |
6 | 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) |
7 | -version '0.4.4' | |
7 | +version '0.5.0' | |
8 | 8 | |
9 | 9 | { |
10 | 10 | 'openssl' => '4.4.0', | ... | ... |
... | ... | @@ -213,17 +213,17 @@ node[cb]['nginx']['sites'].each do |site| |
213 | 213 | stype.has_key?(:fastcgi_intercept_errors) ? |
214 | 214 | stype[:fastcgi_intercept_errors] : false |
215 | 215 | |
216 | - template "#{inc_dir}/inc_type_wordpress_#{site_sname}" do | |
216 | + template "#{inc_dir}/type_wordpress_#{site_sname}" do | |
217 | 217 | source stype[:source] || 'inc_type_wordpress.erb' |
218 | 218 | cookbook stype[:cookbook] || cb |
219 | 219 | mode 0644 |
220 | 220 | variables vars |
221 | 221 | end |
222 | - site_includes.push("#{inc_dir}/inc_type_wordpress_#{site_sname}") | |
222 | + site_includes.push("#{inc_dir}/type_wordpress_#{site_sname}") | |
223 | 223 | |
224 | 224 | # REVERSE PROXY WEBSERVER WITH WEBSOCKET |
225 | 225 | when 'webserver', 'webserver_ws' |
226 | - template "#{inc_dir}/inc_type_webserver_ws_#{site_sname}" do | |
226 | + template "#{inc_dir}/type_webserver_ws_#{site_sname}" do | |
227 | 227 | source stype[:source] || 'inc_type_webserver.erb' |
228 | 228 | cookbook stype[:cookbook] || cb |
229 | 229 | mode 0644 |
... | ... | @@ -233,17 +233,17 @@ node[cb]['nginx']['sites'].each do |site| |
233 | 233 | " default upgrade;\n"\ |
234 | 234 | " '' close;\n"\ |
235 | 235 | "}") |
236 | - site_includes.push("#{inc_dir}/inc_type_webserver_ws_#{site_sname}") | |
236 | + site_includes.push("#{inc_dir}/type_webserver_ws_#{site_sname}") | |
237 | 237 | |
238 | 238 | # GENERIC REVERSE PROXY WEBSERVER |
239 | 239 | when 'webserver_basic' |
240 | - template "#{inc_dir}/inc_type_webserver_basic_#{site_sname}" do | |
240 | + template "#{inc_dir}/type_webserver_basic_#{site_sname}" do | |
241 | 241 | source stype[:source] || 'inc_type_webserver_basic.erb' |
242 | 242 | cookbook stype[:cookbook] || cb |
243 | 243 | mode 0644 |
244 | 244 | variables vars |
245 | 245 | end |
246 | - site_includes.push("#{inc_dir}/inc_type_webserver_basic_#{site_sname}") | |
246 | + site_includes.push("#{inc_dir}/type_webserver_basic_#{site_sname}") | |
247 | 247 | |
248 | 248 | else |
249 | 249 | Chef::Log.error("Unknown site type: #{stype[:type]}") | ... | ... |
... | ... | @@ -30,6 +30,21 @@ end |
30 | 30 | node.default['php-fpm']['user'] = node['nginx']['user'] |
31 | 31 | node.default['php-fpm']['group'] = node['nginx']['group'] |
32 | 32 | |
33 | +if node['cfe-nginx-php-fpm']['php-fpm']['version'] == '5.6' | |
34 | + case node['platform'] | |
35 | + when 'ubuntu' | |
36 | + apt_repository 'ondrej-php' do | |
37 | + uri 'ppa:ondrej/php' | |
38 | + distribution node['lsb']['codename'] | |
39 | + components ['main'] | |
40 | + keyserver 'keyserver.ubuntu.com' | |
41 | + key 'E5267A6C' | |
42 | + end | |
43 | + else | |
44 | + Chef::Application.fatal!("No support for PHP5.6-FPM on #{node['platform']}") | |
45 | + end | |
46 | +end | |
47 | + | |
33 | 48 | if node['php-fpm']['pools'] |
34 | 49 | def_pm = value_for_platform( |
35 | 50 | 'ubuntu' => { '10.04' => 'dynamic' }, | ... | ... |