From be47746a35163c14cf45b9b929e3f8a770addbb2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 20 Sep 2021 18:30:48 +0100 Subject: [PATCH] Add roles for Equinix Dublin machines --- roles/culebre.rb | 67 +++++++++++++++++++++++++++++++++++++++++++++++ roles/fafnir.rb | 37 ++++++++++++++++++++++++++ roles/idris.rb | 35 +++++++++++++++++++++++++ roles/konqi.rb | 35 +++++++++++++++++++++++++ roles/naga.rb | 35 +++++++++++++++++++++++++ roles/snap-03.rb | 44 +++++++++++++++++++++++++++++++ roles/spike-01.rb | 36 +++++++++++++++++++++++++ roles/spike-02.rb | 36 +++++++++++++++++++++++++ roles/spike-03.rb | 36 +++++++++++++++++++++++++ 9 files changed, 361 insertions(+) create mode 100644 roles/culebre.rb create mode 100644 roles/fafnir.rb create mode 100644 roles/idris.rb create mode 100644 roles/konqi.rb create mode 100644 roles/naga.rb create mode 100644 roles/snap-03.rb create mode 100644 roles/spike-01.rb create mode 100644 roles/spike-02.rb create mode 100644 roles/spike-03.rb diff --git a/roles/culebre.rb b/roles/culebre.rb new file mode 100644 index 000000000..20a4d2c79 --- /dev/null +++ b/roles/culebre.rb @@ -0,0 +1,67 @@ +name "culebre" +description "Master role applied to culebre" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.9", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.105" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::9" + } + } + }, + :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[equinix-dub]", + "role[tile]" +) diff --git a/roles/fafnir.rb b/roles/fafnir.rb new file mode 100644 index 000000000..8050e44a3 --- /dev/null +++ b/roles/fafnir.rb @@ -0,0 +1,37 @@ +name "fafnir" +description "Master role applied to fafnir" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.2", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.98" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::2" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]", + "role[gateway]", + "role[web-storage]" +) diff --git a/roles/idris.rb b/roles/idris.rb new file mode 100644 index 000000000..f683cd17e --- /dev/null +++ b/roles/idris.rb @@ -0,0 +1,35 @@ +name "idris" +description "Master role applied to idris" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.6", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.102" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::6" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]" +) diff --git a/roles/konqi.rb b/roles/konqi.rb new file mode 100644 index 000000000..9bc6d165c --- /dev/null +++ b/roles/konqi.rb @@ -0,0 +1,35 @@ +name "konqi" +description "Master role applied to konqi" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.7", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.103" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::7" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]" +) diff --git a/roles/naga.rb b/roles/naga.rb new file mode 100644 index 000000000..3582d5f15 --- /dev/null +++ b/roles/naga.rb @@ -0,0 +1,35 @@ +name "naga" +description "Master role applied to naga" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.8", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.104" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::8" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]" +) diff --git a/roles/snap-03.rb b/roles/snap-03.rb new file mode 100644 index 000000000..22f1d34ff --- /dev/null +++ b/roles/snap-03.rb @@ -0,0 +1,44 @@ +name "snap-03" +description "Master role applied to snap-03" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.50", + :bond => { + :slaves => %w[eno1 eno2 eno3 eno4] + } + } + } + }, + :postgresql => { + :settings => { + :defaults => { + :shared_buffers => "128GB", + :work_mem => "128MB", + :maintenance_work_mem => "2GB", + :effective_cache_size => "360GB", + :effective_io_concurrency => "256", + :random_page_cost => "1.1" + } + } + }, + :sysctl => { + :postgres => { + :comment => "Increase shared memory for postgres", + :parameters => { + "kernel.shmmax" => 132 * 1024 * 1024 * 1024, + "kernel.shmall" => 132 * 1024 * 1024 * 1024 / 4096 + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[db-slave]" +) diff --git a/roles/spike-01.rb b/roles/spike-01.rb new file mode 100644 index 000000000..78d63feb3 --- /dev/null +++ b/roles/spike-01.rb @@ -0,0 +1,36 @@ +name "spike-01" +description "Master role applied to spike-01" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.3", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.99" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::3" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]", + "role[web-frontend]" +) diff --git a/roles/spike-02.rb b/roles/spike-02.rb new file mode 100644 index 000000000..67af7fbcd --- /dev/null +++ b/roles/spike-02.rb @@ -0,0 +1,36 @@ +name "spike-02" +description "Master role applied to spike-02" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.4", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.100" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::4" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]", + "role[web-frontend]" +) diff --git a/roles/spike-03.rb b/roles/spike-03.rb new file mode 100644 index 000000000..8c39d559d --- /dev/null +++ b/roles/spike-03.rb @@ -0,0 +1,36 @@ +name "spike-03" +description "Master role applied to spike-03" + +default_attributes( + :networking => { + :interfaces => { + :internal_ipv4 => { + :interface => "bond0", + :role => :internal, + :family => :inet, + :address => "10.0.64.5", + :bond => { + :slaves => %w[eno1 eno2] + } + }, + :external_ipv4 => { + :interface => "bond0.2", + :role => :external, + :family => :inet, + :address => "184.104.226.101" + }, + :external_ipv6 => { + :interface => "bond0.2", + :role => :external, + :family => :inet6, + :address => "2001:470:1:b3b::5" + } + } + } +) + +run_list( + "role[equinix-dub]", + "role[hp-g9]", + "role[web-frontend]" +) -- 2.39.5