name "web-frontend"
description "Role applied to all web/api frontend servers"

default_attributes(
  :apache => {
    :mpm => "event",
    :event => {
      :server_limit => 40,
      :max_clients => 1000,
      :min_spare_threads => 50,
      :max_spare_threads => 150,
      :threads_per_child => 50,
      :max_requests_per_child => 10000
    }
  },
  :passenger => {
    :max_pool_size => 50
  },
  :exim => {
    :local_domains => ["messages.openstreetmap.org"],
    :trusted_users => ["rails"],
    :routes => {
      :messages => {
        :comment => "messages.openstreetmap.org",
        :domains => ["messages.openstreetmap.org"],
        :command => "/srv/www.openstreetmap.org/rails/script/deliver-message $local_part",
        :user => "rails",
        :group => "rails",
        :home_directory => "/srv/www.openstreetmap.org/rails"
      }
    }
  }
)

run_list(
  "role[web]",
  "recipe[web::frontend]"
)

name "web-frontend"
description "Role applied to all web/api frontend servers"

default_attributes(
  :apache => {
    :mpm => "event",
    :event => {
      :server_limit => 40,
      :max_clients => 1000,
      :min_spare_threads => 50,
      :max_spare_threads => 150,
      :threads_per_child => 50,
      :max_requests_per_child => 10000
    }
  },
  :passenger => {
    :version => 4,
    :max_pool_size => 50
  },
  :exim => {
    :local_domains => ["messages.openstreetmap.org"],
    :trusted_users => ["rails"],
    :routes => {
      :messages => {
        :comment => "messages.openstreetmap.org",
        :domains => ["messages.openstreetmap.org"],
        :command => "/srv/www.openstreetmap.org/rails/script/deliver-message $local_part",
        :user => "rails",
        :group => "rails",
        :home_directory => "/srv/www.openstreetmap.org/rails"
      }
    }
  }
)

run_list(
  "role[web]",
  "recipe[web::frontend]"
)

Revert to passenger 4 on frontend servers
Revert to passenger 4 on frontend servers
