X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/fa944e2e8867e9f861c8da8535e856851b1c27e4..d5f8a18658e100abeba9f8fcdf7d9e4cbcaea3a6:/cookbooks/osqa/recipes/default.rb diff --git a/cookbooks/osqa/recipes/default.rb b/cookbooks/osqa/recipes/default.rb index 3a229531f..4cbd677a6 100644 --- a/cookbooks/osqa/recipes/default.rb +++ b/cookbooks/osqa/recipes/default.rb @@ -20,6 +20,7 @@ include_recipe "accounts" include_recipe "apache" include_recipe "memcached" +include_recipe "postgresql" include_recipe "python" include_recipe "tools" @@ -79,11 +80,22 @@ node[:osqa][:sites].each do |site| site_user = Etc.getpwuid(site_user).name if site_user.is_a?(Integer) site_group = site[:group] || node[:osqa][:group] || Etc.getpwnam(site_user).gid site_group = Etc.getgrgid(site_group).name if site_group.is_a?(Integer) + database_cluster = site[:database_cluster] || node[:osqa][:database_cluster] database_name = site[:database_name] || node[:osqa][:database_name] database_user = site[:database_user] || node[:osqa][:database_user] database_password = site[:database_user] || node[:osqa][:database_password] backup_name = site[:backup] + postgresql_user database_user do + cluster database_cluster + password database_password + end + + postgresql_database database_name do + cluster database_cluster + owner database_user + end + ssl_certificate site_name do domains [site_name] + site_aliases notifies :reload, "service[apache2]" @@ -144,7 +156,7 @@ node[:osqa][:sites].each do |site| line.gsub!(/^CACHE_BACKEND = .*/, "CACHE_BACKEND = 'memcached://127.0.0.1:11211/'") line.gsub!(%r{^APP_URL = 'http://'}, "APP_URL = 'https://#{site_name}'") line.gsub!(%r{^TIME_ZONE = 'America/New_York'}, "TIME_ZONE = 'Europe/London'") - line.gsub!(/^DISABLED_MODULES = \[([^\]]+)\]/, "DISABLED_MODULES = [\\1, 'localauth', 'facebookauth', 'oauthauth']") + line.gsub!(/^DISABLED_MODULES = \[([^\]]+)\]/, "DISABLED_MODULES = [\\1, 'localauth', 'facebookauth', 'oauthauth', 'mysqlfulltext']") line end