]> git.openstreetmap.org Git - chef.git/commitdiff
Add role for fafnir
authorTom Hughes <tom@compton.nu>
Tue, 3 May 2016 08:11:36 +0000 (09:11 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 3 May 2016 08:16:43 +0000 (09:16 +0100)
roles/aws.rb [new file with mode: 0644]
roles/fafnir.rb [new file with mode: 0644]
roles/ie.rb [new file with mode: 0644]

diff --git a/roles/aws.rb b/roles/aws.rb
new file mode 100644 (file)
index 0000000..eabb762
--- /dev/null
@@ -0,0 +1,26 @@
+name "aws"
+description "Role applied to all servers on AWS"
+
+default_attributes(
+  :networking => {
+    :nameservers => ["172.31.0.2"],
+    :roles => {
+      :internal => {
+        :inet => {
+          :prefix => "20",
+          :gateway => "172.31.0.1"
+        }
+      }
+    }
+  }
+)
+
+override_attributes(
+  :ntp => {
+    :servers => ["0.ie.pool.ntp.org", "1.ie.pool.ntp.org", "europe.pool.ntp.org"]
+  }
+)
+
+run_list(
+  "role[ie]"
+)
diff --git a/roles/fafnir.rb b/roles/fafnir.rb
new file mode 100644 (file)
index 0000000..2a8a1d1
--- /dev/null
@@ -0,0 +1,42 @@
+name "fafnir"
+description "Master role applied to fafnir"
+
+default_attributes(
+  :db => {
+    :cluster => "9.1/main"
+  },
+  :networking => {
+    :interfaces => {
+      :internal_ipv4 => {
+        :interface => "eth0",
+        :role => :internal,
+        :family => :inet,
+        :address => "172.31.10.210",
+        :hwaddress => "02:c1:c5:8b:5f:1d"
+      }
+    }
+  },
+  :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[aws]"
+)
diff --git a/roles/ie.rb b/roles/ie.rb
new file mode 100644 (file)
index 0000000..812ba6b
--- /dev/null
@@ -0,0 +1,10 @@
+name "ie"
+description "Role applied to all servers located in Ireland"
+
+override_attributes(
+  :country => "ie"
+)
+
+run_list(
+  "role[base]"
+)