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

default_attributes(
  :networking => {
    :interfaces => {
      :external_ipv4 => {
        :interface => "ens5",
        :role => :external,
        :family => :inet,
        :address => "172.31.37.101",
        :prefix => "20",
        :gateway => "172.31.32.1",
        :public_address => "172.16.58.3"
      }
    }
  }
)

override_attributes(
  :networking => {
    :nameservers => ["172.31.0.2"]
  }
)

run_list(
  "role[aws-us-east-2]"
)<commit_msg>Configure palulukon as a tile server<commit_after>name "palulukon"
description "Master role applied to palulukon"

default_attributes(
  :networking => {
    :interfaces => {
      :external_ipv4 => {
        :interface => "ens5",
        :role => :external,
        :family => :inet,
        :address => "172.31.37.101",
        :prefix => "20",
        :gateway => "172.31.32.1",
        :public_address => "172.16.58.3"
      }
    }
  },
  :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 => "14/main",
      :postgis => "3"
    },
    :mapnik => "3.1",
    :styles => {
      :default => {
        :tile_directories => [
          { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 }
        ]
      }
    }
  }
)

override_attributes(
  :networking => {
    :nameservers => ["172.31.0.2"]
  }
)

run_list(
  "role[aws-us-east-2]",
  "role[tile]"
)
{'fraction_non_alphanumeric': 0.18379554105492116, 'fraction_numerical': 0.06579662860250136, 'mean_word_length': 2.0213464696223316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '6915660', 'n_tokens_mistral': 749, 'n_tokens_neox': 674, 'n_words': 116}