X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/fb1f1d56e8d8a6a86b79c71546e6c114fec2640c..91556e0a1247fa7877b55a95ba29016a715e0ce0:/cookbooks/dev/recipes/default.rb diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 039f5b204..b5b864ffc 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -24,6 +24,7 @@ include_recipe "apache" include_recipe "passenger" include_recipe "git" include_recipe "mysql" +include_recipe "nodejs" include_recipe "postgresql" package "php-apc" @@ -41,6 +42,9 @@ package "php5-mysql" package "php5-pgsql" package "php5-sqlite" +package "pngcrush" +package "pngquant" + package "python" package "python-argparse" package "python-beautifulsoup" @@ -48,6 +52,9 @@ package "python-cheetah" package "python-dateutil" package "python-magic" package "python-psycopg2" +package "python-gdal" + +nodejs_package "svgo" easy_install_package "geojson" @@ -57,6 +64,7 @@ apache_module "proxy" apache_module "proxy_fcgi" apache_module "rewrite" apache_module "wsgi" +apache_module "headers" gem_package "sqlite3" @@ -128,11 +136,19 @@ search(:accounts, "*:*").each do |account| end end -if node[:postgresql][:clusters][:"9.1/main"] +if node[:postgresql][:clusters][:"9.3/main"] postgresql_user "apis" do cluster "9.3/main" end + template "/usr/local/bin/cleanup-rails-assets" do + cookbook "web" + source "cleanup-assets.erb" + owner "root" + group "root" + mode 0755 + end + node[:dev][:rails].each do |name, details| database_name = details[:database] || "apis_#{name}" site_name = "#{name}.apis.dev.openstreetmap.org" @@ -174,7 +190,7 @@ if node[:postgresql][:clusters][:"9.1/main"] group "apis" mode 0644 variables :site => site_name - notifies :touch, "file[#{rails_directory}/tmp/restart.txt]" + notifies :run, "execute[#{rails_directory}]" end apache_site site_name do @@ -191,7 +207,7 @@ if node[:postgresql][:clusters][:"9.1/main"] recursive true end - file "/etc/cron.daily/rails-#{name}" do + file "/etc/cron.daily/rails-#{site_name.tr('.', '-')}" do action :delete end