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

default_attributes(
  :apt => {
    :sources => ["postgresql"]
  },
  :devices => {
    :ssd_samsung => {
      :comment => "Tune scheduler for SSD",
      :type => "block",
      :bus => "ata",
      :serial => "SAMSUNG_MZ7LM960HCHP-*",
      :attrs => {
        "queue/scheduler" => "noop",
        "queue/nr_requests" => "256",
        "queue/read_ahead_kb" => "2048"
      }
    }
  },
  :hardware => {
    :modules => %w[nct6775],
    :sensors => {
      "nct6779-isa-0290" => {
        :volts => {
          "in1" => { :ignore => true },
          "in4" => { :ignore => true },
          "in5" => { :ignore => true },
          "in6" => { :ignore => true },
          "in9" => { :ignore => true },
          "in10" => { :ignore => true },
          "in11" => { :ignore => true },
          "in12" => { :ignore => true },
          "in13" => { :ignore => true },
          "in14" => { :ignore => true }
        },
        :fans => {
          "fan1" => { :ignore => true },
          "fan2" => { :ignore => true }
        },
        :temps => {
          "temp7" => { :ignore => true },
          "temp8" => { :ignore => true },
          "temp9" => { :ignore => true },
          "temp10" => { :ignore => true }
        }
      }
    }
  },
  :munin => {
    :plugins => {
      :sensors_temp => {
        :temp1 => { :warning => 96, :critical => 100 },
        :temp2 => { :warning => 96, :critical => 100 },
        :temp3 => { :warning => 96, :critical => 100 },
        :temp4 => { :warning => 96, :critical => 100 },
        :temp5 => { :warning => 96, :critical => 100 },
        :temp6 => { :warning => 96, :critical => 100 },
        :temp7 => { :warning => 96, :critical => 100 }
      }
    }
  },
  :networking => {
    :interfaces => {
      :external_ipv4 => {
        :interface => "eth0",
        :role => :external,
        :family => :inet,
        :address => "172.16.58.3",
        :prefix => "26",
        :gateway => "192.168.3.11"
      },
      :external_ipv6 => {
        :interface => "eth0",
        :role => :external,
        :family => :inet6,
        :address => "fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b",
        :prefix => "64",
        :gateway => "fe80::1"
      }
    }
  },
  :postgresql => {
    :versions => ["9.6"],
    :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 => "9.6/main"
    },
    :node_file => "/store/database/nodes",
    :styles => {
      :default => {
        :tile_directories => [
          { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 }
        ]
      }
    }
  }
)

run_list(
  "role[hetzner]",
  "role[tile]"
)
<commit_msg>Revert "Adjust CPU temperature warning thresholds for vial"<commit_after>name "vial"
description "Master role applied to vial"

default_attributes(
  :apt => {
    :sources => ["postgresql"]
  },
  :devices => {
    :ssd_samsung => {
      :comment => "Tune scheduler for SSD",
      :type => "block",
      :bus => "ata",
      :serial => "SAMSUNG_MZ7LM960HCHP-*",
      :attrs => {
        "queue/scheduler" => "noop",
        "queue/nr_requests" => "256",
        "queue/read_ahead_kb" => "2048"
      }
    }
  },
  :hardware => {
    :modules => %w[nct6775],
    :sensors => {
      "nct6779-isa-0290" => {
        :volts => {
          "in1" => { :ignore => true },
          "in4" => { :ignore => true },
          "in5" => { :ignore => true },
          "in6" => { :ignore => true },
          "in9" => { :ignore => true },
          "in10" => { :ignore => true },
          "in11" => { :ignore => true },
          "in12" => { :ignore => true },
          "in13" => { :ignore => true },
          "in14" => { :ignore => true }
        },
        :fans => {
          "fan1" => { :ignore => true },
          "fan2" => { :ignore => true }
        },
        :temps => {
          "temp7" => { :ignore => true },
          "temp8" => { :ignore => true },
          "temp9" => { :ignore => true },
          "temp10" => { :ignore => true }
        }
      }
    }
  },
  :networking => {
    :interfaces => {
      :external_ipv4 => {
        :interface => "eth0",
        :role => :external,
        :family => :inet,
        :address => "172.16.58.3",
        :prefix => "26",
        :gateway => "192.168.3.11"
      },
      :external_ipv6 => {
        :interface => "eth0",
        :role => :external,
        :family => :inet6,
        :address => "fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b",
        :prefix => "64",
        :gateway => "fe80::1"
      }
    }
  },
  :postgresql => {
    :versions => ["9.6"],
    :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 => "9.6/main"
    },
    :node_file => "/store/database/nodes",
    :styles => {
      :default => {
        :tile_directories => [
          { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 }
        ]
      }
    }
  }
)

run_list(
  "role[hetzner]",
  "role[tile]"
)

{'fraction_non_alphanumeric': 0.20696827873114926, 'fraction_numerical': 0.054775524354307506, 'mean_word_length': 1.6787372330547818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 207, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6365243', 'n_tokens_mistral': 2239, 'n_tokens_neox': 2037, 'n_words': 375}