<commit_before>name "ironbelly"
description "Master role applied to ironbelly"

default_attributes(
  :bind => {
    :clients => "equinix-ams"
  },
  :dhcpd => {
    :first_address => "10.0.63.1",
    :last_address => "10.0.63.254"
  },
  :elasticsearch => {
    :cluster => {
      :routing => {
        :allocation => {
          :disk => {
            :watermark => {
              :low => "95%",
              :high => "98%",
              :flood_stage => "99%"
            }
          }
        }
      }
    },
    :path => {
      :data => "/store/elasticsearch"
    }
  },
  :networking => {
    :interfaces => {
      :internal_ipv4 => {
        :interface => "bond0",
        :role => :internal,
        :family => :inet,
        :address => "10.0.48.10",
        :bond => {
          :mode => "802.3ad",
          :lacprate => "fast",
          :xmithashpolicy => "layer3+4",
          :slaves => %w[eth0 eth1]
        }
      },
      :external_ipv4 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet,
        :address => "172.16.58.3"
      },
      :external_ipv6 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet6,
        :address => "fc00:db20:35b:7399::5"
      }
    }
  },
  :planet => {
    :replication => "enabled"
  },
  :prometheus => {
    :snmp => {
      "pdu1" => { :address => "10.0.48.100", :modules => %w[apcups], :labels => { "site" => "amsterdam" } },
      "pdu2" => { :address => "10.0.48.101", :modules => %w[apcups], :labels => { "site" => "amsterdam" } },
      "switch1" => { :address => "192.168.3.11", :modules => %w[if_mib juniper_ex4300], :labels => { "site" => "amsterdam" } }
    },
    :metrics => {
      :uplink_interface => {
        :help => "Site uplink interface name",
        :labels => { :site => "amsterdam", :name => "ae50" }
      }
    }
  },
  :rsyncd => {
    :modules => {
      :logs => {
        :comment => "Log files",
        :path => "/store/logs",
        :read_only => false,
        :write_only => true,
        :list => false,
        :uid => "www-data",
        :gid => "www-data",
        :transfer_logging => false,
        :hosts_allow => [
          "172.16.58.3/24",          # ucl external
          "10.0.48.0/20",             # amsterdam internal
          "172.16.31.10/27",          # amsterdam external
          "fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:0/112", # amsterdam external
          "10.0.64.0/20",             # dublin internal
          "192.168.127.12/27",        # dublin external<commit_msg>Fix uplink interface name for Amsterdam<commit_after>name "ironbelly"
description "Master role applied to ironbelly"

default_attributes(
  :bind => {
    :clients => "equinix-ams"
  },
  :dhcpd => {
    :first_address => "10.0.63.1",
    :last_address => "10.0.63.254"
  },
  :elasticsearch => {
    :cluster => {
      :routing => {
        :allocation => {
          :disk => {
            :watermark => {
              :low => "95%",
              :high => "98%",
              :flood_stage => "99%"
            }
          }
        }
      }
    },
    :path => {
      :data => "/store/elasticsearch"
    }
  },
  :networking => {
    :interfaces => {
      :internal_ipv4 => {
        :interface => "bond0",
        :role => :internal,
        :family => :inet,
        :address => "10.0.48.10",
        :bond => {
          :mode => "802.3ad",
          :lacprate => "fast",
          :xmithashpolicy => "layer3+4",
          :slaves => %w[eth0 eth1]
        }
      },
      :external_ipv4 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet,
        :address => "172.16.58.3"
      },
      :external_ipv6 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet6,
        :address => "fc00:db20:35b:7399::5"
      }
    }
  },
  :planet => {
    :replication => "enabled"
  },
  :prometheus => {
    :snmp => {
      "pdu1" => { :address => "10.0.48.100", :modules => %w[apcups], :labels => { "site" => "amsterdam" } },
      "pdu2" => { :address => "10.0.48.101", :modules => %w[apcups], :labels => { "site" => "amsterdam" } },
      "switch1" => { :address => "192.168.3.11", :modules => %w[if_mib juniper_ex4300], :labels => { "site" => "amsterdam" } }
    },
    :metrics => {
      :uplink_interface => {
        :help => "Site uplink interface name",
        :labels => { :site => "amsterdam", :name => "ge-[01]/2/0" }
      }
    }
  },
  :rsyncd => {
    :modules => {
      :logs => {
        :comment => "Log files",
        :path => "/store/logs",
        :read_only => false,
        :write_only => true,
        :list => false,
        :uid => "www-data",
        :gid => "www-data",
        :transfer_logging => false,
        :hosts_allow => [
          "172.16.58.3/24",          # ucl external
          "10.0.48.0/20",             # amsterdam internal
          "172.16.31.10/27",          # amsterdam external
          "fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:0/112", # amsterdam external
          "10.0.64.0/20",             # dublin internal
          "192.168.127.12/27",        # dublin external
{'fraction_non_alphanumeric': 0.19876376279698668, 'fraction_numerical': 0.06606142553602473, 'mean_word_length': 1.6567470497691124, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 153, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 24, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6299781', 'n_tokens_mistral': 2004, 'n_tokens_neox': 1845, 'n_words': 308}