<commit_before>---
name: <%= properties.name || "bat" %>
director_uuid: <%= properties.uuid %>

release:
  name: bat
  version: <%= properties.release || "latest" %>

compilation:
  workers: 2
  network: default
  reuse_compilation_vms: true
  cloud_properties:
    instance_type: c1.medium
    <% if properties.key_name %>
    key_name: <%= properties.key_name %>
    <% end %>

update:
  canaries: <%= properties.canaries || 1 %>
  canary_watch_time: 3000-90000
  update_watch_time: 3000-90000
  max_in_flight: <%= properties.max_in_flight || 1 %>
  max_errors: 1

networks:

- name: static
  type: vip
  cloud_properties: {}

- name: default
<% if p('network.subnet', false) %>
  type: manual
  subnets:
  - range: <%= properties.network.cidr %>
    reserved:
      <% properties.network.reserved.each do |range| %>
      - <%= range %>
      <% end %>
    static:
      <% properties.network.static.each do |range| %>
      - <%= range %>
      <% end %>
    gateway: <%= properties.network.gateway %>
    dns:
      <% if_p('dns_nameserver') do |dns_nameserver| %>
      - <%= dns_nameserver %>
      <% end %>
      <% if_p('network.dns') do |dns| %>
      - <%= dns %>
      <% end %>
    cloud_properties:
      security_groups: <%= p('network.security_groups') %>
      subnet: <%= p('network.subnet') %>
<% else %>
  type: dynamic
  <% if_p('dns_nameserver') do |dns_nameserver| %>
  dns:
    - <%= dns_nameserver %>
  <% end %>
  <% if properties.security_groups %>
  cloud_properties:
    security_groups:
      - <%= properties.security_groups %>
  <% else %>
  cloud_properties: {}
  <% end %>
<% end %>

resource_pools:
  - name: common
    network: default
    size: <%= properties.pool_size %>
    stemcell:
      name: <%= properties.stemcell.name %>
      version: <%= properties.stemcell.version %>
    cloud_properties:
      instance_type: c1.medium
      <% if properties.key_name %>
      key_name: <%= properties.key_name %>
      <% end %>
    <% if properties.password %>
    env:
      bosh:
        password: <%= properties.password %>
    <% end %>

jobs:
  - name: <%= properties.job || "batlight" %>
    template: <%= properties.template || properties.job || "batlight" %>
    instances: <%= properties.instances %>
    resource_pool: common
    <% if properties.persistent_disk %>
    persistent_disk: <%= properties.persistent_disk %>
    <% end %>
    networks:
      - name: default
        default: [dns, gateway]
      <% if properties.use_static_ip %>
      - name: static
        static_ips:
          - <%= properties.static_ip %>
      <% end %>

properties:
  mbus: <%= properties.mbus %>
  batlight:
    <% if properties.batlight.fail %>
    fail: <%= properties.batlight.fail %><commit_msg>Revert "Switch to c1.medium to gather logs."<commit_after>---
name: <%= properties.name || "bat" %>
director_uuid: <%= properties.uuid %>

release:
  name: bat
  version: <%= properties.release || "latest" %>

compilation:
  workers: 2
  network: default
  reuse_compilation_vms: true
  cloud_properties:
    instance_type: m1.small
    <% if properties.key_name %>
    key_name: <%= properties.key_name %>
    <% end %>

update:
  canaries: <%= properties.canaries || 1 %>
  canary_watch_time: 3000-90000
  update_watch_time: 3000-90000
  max_in_flight: <%= properties.max_in_flight || 1 %>
  max_errors: 1

networks:

- name: static
  type: vip
  cloud_properties: {}

- name: default
<% if p('network.subnet', false) %>
  type: manual
  subnets:
  - range: <%= properties.network.cidr %>
    reserved:
      <% properties.network.reserved.each do |range| %>
      - <%= range %>
      <% end %>
    static:
      <% properties.network.static.each do |range| %>
      - <%= range %>
      <% end %>
    gateway: <%= properties.network.gateway %>
    dns:
      <% if_p('dns_nameserver') do |dns_nameserver| %>
      - <%= dns_nameserver %>
      <% end %>
      <% if_p('network.dns') do |dns| %>
      - <%= dns %>
      <% end %>
    cloud_properties:
      security_groups: <%= p('network.security_groups') %>
      subnet: <%= p('network.subnet') %>
<% else %>
  type: dynamic
  <% if_p('dns_nameserver') do |dns_nameserver| %>
  dns:
    - <%= dns_nameserver %>
  <% end %>
  <% if properties.security_groups %>
  cloud_properties:
    security_groups:
      - <%= properties.security_groups %>
  <% else %>
  cloud_properties: {}
  <% end %>
<% end %>

resource_pools:
  - name: common
    network: default
    size: <%= properties.pool_size %>
    stemcell:
      name: <%= properties.stemcell.name %>
      version: <%= properties.stemcell.version %>
    cloud_properties:
      instance_type: m1.small
      <% if properties.key_name %>
      key_name: <%= properties.key_name %>
      <% end %>
    <% if properties.password %>
    env:
      bosh:
        password: <%= properties.password %>
    <% end %>

jobs:
  - name: <%= properties.job || "batlight" %>
    template: <%= properties.template || properties.job || "batlight" %>
    instances: <%= properties.instances %>
    resource_pool: common
    <% if properties.persistent_disk %>
    persistent_disk: <%= properties.persistent_disk %>
    <% end %>
    networks:
      - name: default
        default: [dns, gateway]
      <% if properties.use_static_ip %>
      - name: static
        static_ips:
          - <%= properties.static_ip %>
      <% end %>

properties:
  mbus: <%= properties.mbus %>
  batlight:
    <% if properties.batlight.fail %>
    fail: <%= properties.batlight.fail %>
{'fraction_non_alphanumeric': 0.16330241862156755, 'fraction_numerical': 0.008910711038370612, 'mean_word_length': 2.73387644263408, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '2940610', 'n_tokens_mistral': 2079, 'n_tokens_neox': 1745, 'n_words': 344}