Set up an instance of Mastodon for Kosmos

Refs #19

Use new application cookbook, update our cookbooks
This commit is contained in:
Greg Karékinian
2017-04-06 21:20:51 +02:00
parent a3f5c5f646
commit de11c0d691
345 changed files with 22591 additions and 3473 deletions

View File

@@ -51,7 +51,6 @@ Attributes
* `node['wordpress']['db']['port']` - Port of the WordPress MySQL database.
* `node['wordpress']['db']['charset']` - [Character set](http://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) of the WordPress MySQL database tables. Defaults to 'utf8'.
* `node['wordpress']['db']['collate']` - [Collation](http://dev.mysql.com/doc/refman/5.7/en/charset-collation-effect.html) of the WordPress MySQL database tables.
* `node['wordpress']['db']['mysql_version']` - Version of MySQL to install (for supporting community cookbook version 6+)
* `node['wordpress']['allow_multisite']` - Enable [multisite](http://codex.wordpress.org/Create_A_Network) features (default: false).
* `node['wordpress']['wp_config_options']` - A hash of options to define in wp_config.php, output as key value pairs into a PHP constant e.g. `define( '<%= @key %>', <%= @value %> );`. Note: for values you will need to add single quotes around text but omit them for booleans and numbers. (default: {}).

View File

@@ -35,25 +35,6 @@ default['wordpress']['db']['host'] = 'localhost'
default['wordpress']['db']['port'] = '3306' # Must be a string
default['wordpress']['db']['charset'] = 'utf8'
default['wordpress']['db']['collate'] = ''
case node['platform']
when 'ubuntu'
case node['platform_version']
when '10.04'
default['wordpress']['db']['mysql_version'] = '5.1'
else
default['wordpress']['db']['mysql_version'] = '5.5'
end
when 'centos', 'redhat', 'amazon', 'scientific'
if node['platform_version'].to_i < 6
default['wordpress']['db']['mysql_version'] = '5.0'
elsif node['platform_version'].to_i < 7
default['wordpress']['db']['mysql_version'] = '5.1'
else
default['wordpress']['db']['mysql_version'] = '5.5'
end
else
default['wordpress']['db']['mysql_version'] = '5.5'
end
default['wordpress']['allow_multisite'] = false

View File

@@ -16,7 +16,7 @@ end
depends "apache2", ">= 2.0.0"
depends "database", ">= 1.6.0"
depends "mysql", ">= 6.0"
depends "mysql2_chef_gem", "~> 1.0.1"
depends "mysql2_chef_gem", ">= 1.0.1"
depends "build-essential"
depends "iis", ">= 1.6.2"
depends "tar", ">= 0.3.1"

View File

@@ -44,7 +44,6 @@ if is_local_host? db['host']
mysql_service db['instance_name'] do
port db['port']
version db['mysql_version']
initial_root_password db['root_password']
action [:create, :start]
end
@@ -52,6 +51,11 @@ if is_local_host? db['host']
socket = "/var/run/mysql-#{db['instance_name']}/mysqld.sock"
if node['platform_family'] == 'debian'
directory "/var/run/mysqld" do
action :create
owner "mysql"
group "mysql"
end
link '/var/run/mysqld/mysqld.sock' do
to socket
not_if 'test -f /var/run/mysqld/mysqld.sock'