From be63bf3c3aa367f19f14facde6476cea4cda9b19 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 6 Nov 2021 14:41:45 +0000 Subject: [PATCH] Add role for nidhogg --- roles/nidhogg.rb | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ roles/umu.rb | 25 ++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 roles/nidhogg.rb create mode 100644 roles/umu.rb diff --git a/roles/nidhogg.rb b/roles/nidhogg.rb new file mode 100644 index 000000000..a2bbb2436 --- /dev/null +++ b/roles/nidhogg.rb @@ -0,0 +1,68 @@ +name "nidhogg" +description "Master role applied to nidhogg" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :external, + :family => :inet, + :address => "194.71.11.111", + :prefix => "25", + :gateway => "194.71.11.1", + :bond => { + :mode => "802.3ad", + :lacprate => "fast", + :xmithashpolicy => "layer3+4", + :slaves => %w[enp68s0f0 enp68s0f1 enp68s0f2 enp68s0f3] + } + }, + :external_ipv6 => { + :interface => "bond0", + :role => :external, + :family => :inet6, + :address => "2001:6b0:19:2::111", + :prefix => "64", + :gateway => "2001:6b0:19:2::1" + } + } + }, + :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" + }, + :mapnik => "3.1", + :styles => { + :default => { + :tile_directories => [ + { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 } + ] + } + } + } +) + +run_list( + "role[umu]", + "role[tile]" +) diff --git a/roles/umu.rb b/roles/umu.rb new file mode 100644 index 000000000..9e783264d --- /dev/null +++ b/roles/umu.rb @@ -0,0 +1,25 @@ +name "umu" +description "Role applied to all servers at Umeå University" + +default_attributes( + :accounts => { + :users => { + :maswan => { :status => :administrator } + } + }, + :hosted_by => "Academic Computer Club, Umeå University", + :location => "Umeå, Sweden" +) + +override_attributes( + :networking => { + :nameservers => ["130.239.18.251", "130.239.18.252", "130.239.1.90"] + }, + :ntp => { + :servers => ["0.se.pool.ntp.org", "1.se.pool.ntp.org", "europe.pool.ntp.org"] + } +) + +run_list( + "role[se]" +) -- 2.39.5