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

default_attributes(
  :apt => {
    :sources => ["ubuntugis-unstable"]
  },
  :elasticsearch => {
    :cluster => {
      :routing => {
        :allocation => {
          :disk => {
            :watermark => {
              :low => "95%",
              :high => "98%"
            }
          }
        }
      }
    },
    :path => {
      :data => "/store/elasticsearch"
    }
  },
  :networking => {
    :interfaces => {
      :internal_ipv4 => {
        :interface => "bond0",
        :role => :internal,
        :family => :inet,
        :address => "10.0.48.10",
        :bond => {
          :slaves => %w[eth0 eth1]
        }
      },
      :external_ipv4 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet,
        :address => "192.168.127.12"
      },
      :external_ipv6 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet6,
        :address => "fdf8:f53e:61e4::18"
      }
    }
  },
  :openvpn => {
    :address => "10.0.16.2",
    :tunnels => {
      :ic2ucl => {
        :port => "1194",
        :mode => "server",
        :peer => {
          :host => "ridley.openstreetmap.org"
        }
      },
      :aws2ic => {
        :port => "1195",
        :mode => "server",
        :peer => {
          :host => "fafnir.openstreetmap.org"
        }
      },
      :ic2bm => {
        :port => "1196",
        :mode => "client",
        :peer => {
          :host => "grisu.openstreetmap.org",
          :port => "1194"
        }
      }
    }
  },
  :planet => {
    :replication => "disabled"
  },
  :rsyncd => {
    :modules => {
      :hosts => {
        :comment => "Host data",
        :path => "/home/hosts",
        :read_only => true,
        :write_only => false,
        :list => false,
        :uid => "tomh",
        :gid => "tomh",
        :transfer_logging => false,
        :hosts_allow => [
          "172.16.58.3",                      # shenron
          "fc00:e968:6179::de52:7100",                 # shenron
          "192.168.3.11"                      # grant
        ]
      },
      :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 => [
          "192.168.127.12/24",          # ucl external
          "10.0.48.0/20",             # equinix internal
          "172.16.17.32/27",          # equinix external
          "fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b/112", # equinix external
          "10.0.32.0/20",             # bytemark internal
          "172.16.58.3/28",          # bytemark external
          "2001:41c9:2:d6::/64",      # bytemark external
          "127.0.0.0/8",              # localhost
          "::1"                       # localhost
        ],
        :nodes_allow => "roles:tilecache"
      }
    }
  }
)

run_list(
  "role[equinix]",
  "role[gateway]",
  "role[web-storage]",
  "role[supybot]",
  "role[backup]",
  "role[stats]",
  "role[planet]",
  # "role[planetdump]",
  "role[logstash]",
  "recipe[rsyncd]",
  "recipe[openvpn]",
  "recipe[tilelog]"
)<commit_msg>Enable dhcpd on ironbelly<commit_after>name "ironbelly"
description "Master role applied to ironbelly"

default_attributes(
  :apt => {
    :sources => ["ubuntugis-unstable"]
  },
  :dhcpd => {
    :first_address => "10.0.63.1",
    :last_address => "10.0.63.254"
  },
  :elasticsearch => {
    :cluster => {
      :routing => {
        :allocation => {
          :disk => {
            :watermark => {
              :low => "95%",
              :high => "98%"
            }
          }
        }
      }
    },
    :path => {
      :data => "/store/elasticsearch"
    }
  },
  :networking => {
    :interfaces => {
      :internal_ipv4 => {
        :interface => "bond0",
        :role => :internal,
        :family => :inet,
        :address => "10.0.48.10",
        :bond => {
          :slaves => %w[eth0 eth1]
        }
      },
      :external_ipv4 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet,
        :address => "192.168.127.12"
      },
      :external_ipv6 => {
        :interface => "bond0.2",
        :role => :external,
        :family => :inet6,
        :address => "fdf8:f53e:61e4::18"
      }
    }
  },
  :openvpn => {
    :address => "10.0.16.2",
    :tunnels => {
      :ic2ucl => {
        :port => "1194",
        :mode => "server",
        :peer => {
          :host => "ridley.openstreetmap.org"
        }
      },
      :aws2ic => {
        :port => "1195",
        :mode => "server",
        :peer => {
          :host => "fafnir.openstreetmap.org"
        }
      },
      :ic2bm => {
        :port => "1196",
        :mode => "client",
        :peer => {
          :host => "grisu.openstreetmap.org",
          :port => "1194"
        }
      }
    }
  },
  :planet => {
    :replication => "disabled"
  },
  :rsyncd => {
    :modules => {
      :hosts => {
        :comment => "Host data",
        :path => "/home/hosts",
        :read_only => true,
        :write_only => false,
        :list => false,
        :uid => "tomh",
        :gid => "tomh",
        :transfer_logging => false,
        :hosts_allow => [
          "172.16.58.3",                      # shenron
          "fc00:e968:6179::de52:7100",                 # shenron
          "192.168.3.11"                      # grant
        ]
      },
      :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 => [
          "192.168.127.12/24",          # ucl external
          "10.0.48.0/20",             # equinix internal
          "172.16.17.32/27",          # equinix external
          "fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:0/112", # equinix external
          "10.0.32.0/20",             # bytemark internal
          "172.16.58.3/28",          # bytemark external
          "2001:41c9:2:d6::/64",      # bytemark external
          "127.0.0.0/8",              # localhost
          "::1"                       # localhost
        ],
        :nodes_allow => "roles:tilecache"
      }
    }
  }
)

run_list(
  "role[equinix]",
  "role[gateway]",
  "role[web-storage]",
  "role[supybot]",
  "role[backup]",
  "role[stats]",
  "role[planet]",
  # "role[planetdump]",
  "role[logstash]",
  "recipe[rsyncd]",
  "recipe[dhcpd]",
  "recipe[openvpn]",
  "recipe[tilelog]"
)
{'fraction_non_alphanumeric': 0.1840463458110517, 'fraction_numerical': 0.05837789661319073, 'mean_word_length': 1.4055019649874956, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 156, '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': '465313', 'n_tokens_mistral': 2568, 'n_tokens_neox': 2361, 'n_words': 363}