From 75c9f5504e9cc222400cd60f3f34f19c3b674868 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 7 Nov 2020 16:13:01 +0000 Subject: [PATCH] Restore role for scorch --- roles/ovh.rb | 20 +++++++++++++ roles/scorch.rb | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 roles/ovh.rb create mode 100644 roles/scorch.rb diff --git a/roles/ovh.rb b/roles/ovh.rb new file mode 100644 index 000000000..f8391a2aa --- /dev/null +++ b/roles/ovh.rb @@ -0,0 +1,20 @@ +name "ovh" +description "Role applied to all servers at OVH" + +default_attributes( + :hosted_by => "OVH", + :location => "Roubaix, France" +) + +override_attributes( + :networking => { + :nameservers => ["213.186.33.99"] + }, + :ntp => { + :servers => ["0.fr.pool.ntp.org", "1.fr.pool.ntp.org", "europe.pool.ntp.org"] + } +) + +run_list( + "role[fr]" +) diff --git a/roles/scorch.rb b/roles/scorch.rb new file mode 100644 index 000000000..876fb6905 --- /dev/null +++ b/roles/scorch.rb @@ -0,0 +1,79 @@ +name "scorch" +description "Master role applied to scorch" + +default_attributes( + :devices => { + :ssd_system => { + :comment => "Tune scheduler for system disk", + :type => "block", + :bus => "scsi", + :serial => "3600605b009bbf5601fc3206407a43546", + :attrs => { + "queue/scheduler" => "noop", + "queue/nr_requests" => "256", + "queue/read_ahead_kb" => "2048" + } + } + }, + :hardware => { + :mcelog => { + :enabled => false + } + }, + :networking => { + :interfaces => { + :external_ipv4 => { + :interface => "eth0", + :role => :external, + :family => :inet, + :address => "176.31.235.79", + :prefix => "24", + :gateway => "176.31.235.254" + }, + :external_ipv6 => { + :interface => "eth0", + :role => :external, + :family => :inet6, + :address => "2001:41d0:2:fc4f::1", + :prefix => "64", + :gateway => "2001:41d0:2:fcff:ff:ff:ff:ff" + } + } + }, + :postgresql => { + :settings => { + :defaults => { + :shared_buffers => "8GB", + :maintenance_work_mem => "7144MB", + :effective_cache_size => "16GB" + } + } + }, + :sysctl => { + :postgres => { + :comment => "Increase shared memory for postgres", + :parameters => { + "kernel.shmmax" => 9 * 1024 * 1024 * 1024, + "kernel.shmall" => 9 * 1024 * 1024 * 1024 / 4096 + } + } + }, + :tile => { + :database => { + :cluster => "12/main", + :postgis => "3" + }, + :styles => { + :default => { + :tile_directories => [ + { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 } + ] + } + } + } +) + +run_list( + "role[ovh]", + "role[tile]" +) -- 2.39.5