Update the mediawiki cookbook and upstream cookbooks
Compatibility with Chef 14
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
"mysql": ">= 0.0.0",
|
||||
"database": ">= 0.0.0",
|
||||
"nginx": ">= 0.0.0",
|
||||
"mysql2_chef_gem": ">= 0.0.0",
|
||||
"php-fpm": ">= 0.0.0"
|
||||
},
|
||||
"providing": {
|
||||
|
||||
@@ -10,7 +10,6 @@ depends 'php'
|
||||
depends 'mysql'
|
||||
depends 'database'
|
||||
depends 'nginx'
|
||||
depends 'mysql2_chef_gem'
|
||||
depends 'php-fpm'
|
||||
|
||||
attribute 'mediawiki/version',
|
||||
|
||||
@@ -1,19 +1,27 @@
|
||||
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
|
||||
|
||||
node.set_unless['mediawiki']['db']['pass'] = secure_password
|
||||
package('libmysqlclient-dev') { action :nothing }.run_action(:install)
|
||||
|
||||
build_essential 'mediawiki' do
|
||||
compile_time true
|
||||
end
|
||||
|
||||
chef_gem 'mysql2' do
|
||||
compile_time true
|
||||
end
|
||||
|
||||
node.normal['mediawiki']['db']['pass'] = secure_password
|
||||
node.save unless Chef::Config[:solo]
|
||||
|
||||
db = node["mediawiki"]["db"]
|
||||
|
||||
mysql_client "default" do
|
||||
version '5.7'
|
||||
action :create
|
||||
end
|
||||
|
||||
mysql2_chef_gem "default" do
|
||||
action :install
|
||||
end
|
||||
|
||||
mysql_service db["instance_name"] do
|
||||
version '5.7'
|
||||
port db["port"]
|
||||
initial_root_password db["root_password"]
|
||||
action [:create, :start]
|
||||
|
||||
@@ -11,19 +11,7 @@ include_recipe "apt"
|
||||
|
||||
include_recipe "php::default"
|
||||
|
||||
if node['platform'] == 'ubuntu' and node['platform_version'] >= '16.04'
|
||||
# APC is now apcu in PHP 7
|
||||
include_recipe "php::module_apcu"
|
||||
# Dependency
|
||||
package "php7.0-mbstring"
|
||||
else
|
||||
if node['platform_version'] == '15.04'
|
||||
node.override['php']['apc']['package'] = 'php-apc'
|
||||
node.override['php']['apcu']['package'] = 'php5-apcu'
|
||||
end
|
||||
include_recipe "php::module_apc"
|
||||
end
|
||||
include_recipe "php::module_mysql"
|
||||
package %w(php-apcu php-mysql php-mbstring)
|
||||
|
||||
include_recipe "mediawiki::database"
|
||||
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
# Recipe:: nginx
|
||||
#
|
||||
|
||||
node.set_unless['php-fpm']['pools'] = []
|
||||
node.default['php-fpm']['pools'] = []
|
||||
node.override['php-fpm']['package_name'] = "php-fpm"
|
||||
node.override['php-fpm']['service_name'] = "php7.2-fpm"
|
||||
node.override['php-fpm']['conf_dir'] = "/etc/php/7.2/fpm/conf.d"
|
||||
node.override['php-fpm']['pool_conf_dir'] = "/etc/php/7.2/fpm/pool.d"
|
||||
node.override['php-fpm']['conf_file'] = "/etc/php/7.2/fpm/php-fpm.conf"
|
||||
|
||||
include_recipe "php-fpm"
|
||||
include_recipe 'php-fpm::repository' unless node['php-fpm']['skip_repository_install']
|
||||
@@ -24,7 +29,6 @@ php_fpm_pool "mediawiki" do
|
||||
enable true
|
||||
end
|
||||
|
||||
include_recipe "php::module_mysql"
|
||||
include_recipe "nginx"
|
||||
|
||||
directory node["mediawiki"]["docroot_dir"] do
|
||||
|
||||
Reference in New Issue
Block a user