]> git.openstreetmap.org Git - chef.git/commitdiff
Configure katla as a database slave
authorTom Hughes <tom@compton.nu>
Thu, 28 Nov 2013 18:02:52 +0000 (18:02 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Nov 2013 18:02:52 +0000 (18:02 +0000)
roles/katla.rb

index ece28c5224b02a7d96866e22513abee5f3afd3ad..4be8aae1d48439d7b392f8bb8c000413a9837c12 100644 (file)
@@ -2,6 +2,31 @@ name "katla"
 description "Master role applied to katla"
 
 default_attributes(
+  :db => {
+    :cluster => "9.1/main"
+  },
+  :devices => {
+    :store_slow => {
+      :comment => "RAID array mounted on /store/arrays/slow",
+      :type => "block",
+      :bus => "scsi",
+      :serial => "3600605b005a0609019290f178be8de77",
+      :attrs => {
+        "queue/scheduler" => "deadline",
+        "queue/nr_requests" => "975"
+      }
+    },
+    :store_fast => {
+      :comment => "RAID array mounted on /store/arrays/fast",
+      :type => "block",
+      :bus => "scsi",
+      :serial => "3600605b005a0726019d062ae23b426fd",
+      :attrs => {
+        "queue/scheduler" => "deadline",
+        "queue/nr_requests" => "975"
+      }
+    }
+  },
   :networking => {
     :interfaces => {
       :internal_ipv4 => {
@@ -12,9 +37,29 @@ default_attributes(
         :hwaddress => "00:25:90:94:91:00"
       }
     }
+  },
+  :postgresql => {
+    :settings => {
+      :defaults => {
+        :shared_buffers => "64GB",
+        :work_mem => "64MB",
+        :maintenance_work_mem => "1GB",
+        :effective_cache_size => "180GB"
+      }
+    }
+  },
+  :sysctl => {
+    :postgres => {
+      :comment => "Increase shared memory for postgres",
+      :parameters => {
+        "kernel.shmmax" => 66 * 1024 * 1024 * 1024,
+        "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096
+      }
+    }
   }
 );
 
 run_list(
-  "role[ic]"
+  "role[ic]",
+  "role[db-slave]"
 )