<commit_before>---
meta:
  # override this in your stub to set the environment name,
  # which is used for the deployment name
  #
  # i.e. cf-tabasco
  environment: ~

  syslog_aggregator: ~

properties:
  app_domains: (( merge ))
  domain: (( merge ))
  nats:
    user: (( merge ))
    password: (( merge ))
    port: (( merge ))
    machines: (( merge ))
  cf:
    api_url: (( "https://api." .properties.domain ))
    admin_username: (( merge ))
    admin_password: (( merge ))
    apps_domain: (( .properties.app_domains.[0] ))
    skip_ssl_validation: (( merge || nil ))

name: (( meta.environment "-mysql" ))
director_uuid: (( merge ))

releases:
- name: cf-mysql
  version: (( merge || "latest" ))

compilation:
  workers: 3
  network: services1
  reuse_compilation_vms: true
  cloud_properties: (( merge ))

update:
  canaries: 1
  canary_watch_time: 30000-600000
  update_watch_time: 30000-600000
  max_in_flight: 1

networks: (( merge ))

resource_pools:
- name: mysql_z1
  network: mysql1
  stemcell: (( merge ))
  cloud_properties: (( merge ))
- name: mysql_z2
  network: mysql2
  stemcell: (( merge ))
  cloud_properties: (( merge ))
- name: mysql_z3
  network: mysql3
  stemcell: (( merge ))
  cloud_properties: (( merge ))

disk_pools:
- name: mysql-persistent-disk
  disk_size: 100000
  cloud_properties:
    <<: (( merge || nil ))

jobs:
- name: mysql_z1
  release: cf-mysql
  template: mysql
  instances: (( merge || 1 ))
  resource_pool: mysql_z1
  persistent_disk_pool: (( disk_pools.[0].name ))
  networks:
  - name: mysql1
    static_ips: (( merge || static_ips(0) ))
  properties:
    <<: (( merge || nil ))
    admin_password: (( merge ))
    cluster_ips:
    - (( jobs.mysql_z1.networks.mysql1.static_ips.[0] ))
    - (( jobs.mysql_z2.networks.mysql2.static_ips.[0] ))
    - (( jobs.mysql_z3.networks.mysql3.static_ips.[0] ))
    seeded_databases: ~
    syslog_aggregator: (( meta.syslog_aggregator ))
    network_name: mysql1

- name: mysql_z2
  release: cf-mysql
  template: mysql
  instances: (( merge || 1 ))<commit_msg>Allow nil entries in mysql cluster ips<commit_after>---
meta:
  # override this in your stub to set the environment name,
  # which is used for the deployment name
  #
  # i.e. cf-tabasco
  environment: ~

  syslog_aggregator: ~

properties:
  app_domains: (( merge ))
  domain: (( merge ))
  nats:
    user: (( merge ))
    password: (( <PASSWORD> ))
    port: (( merge ))
    machines: (( merge ))
  cf:
    api_url: (( "https://api." .properties.domain ))
    admin_username: (( merge ))
    admin_password: (( <PASSWORD> ))
    apps_domain: (( .properties.app_domains.[0] ))
    skip_ssl_validation: (( merge || nil ))

name: (( meta.environment "-mysql" ))
director_uuid: (( merge ))

releases:
- name: cf-mysql
  version: (( merge || "latest" ))

compilation:
  workers: 3
  network: services1
  reuse_compilation_vms: true
  cloud_properties: (( merge ))

update:
  canaries: 1
  canary_watch_time: 30000-600000
  update_watch_time: 30000-600000
  max_in_flight: 1

networks: (( merge ))

resource_pools:
- name: mysql_z1
  network: mysql1
  stemcell: (( merge ))
  cloud_properties: (( merge ))
- name: mysql_z2
  network: mysql2
  stemcell: (( merge ))
  cloud_properties: (( merge ))
- name: mysql_z3
  network: mysql3
  stemcell: (( merge ))
  cloud_properties: (( merge ))

disk_pools:
- name: mysql-persistent-disk
  disk_size: 100000
  cloud_properties:
    <<: (( merge || nil ))

jobs:
- name: mysql_z1
  release: cf-mysql
  template: mysql
  instances: (( merge || 1 ))
  resource_pool: mysql_z1
  persistent_disk_pool: (( disk_pools.[0].name ))
  networks:
  - name: mysql1
    static_ips: (( merge || static_ips(0) ))
  properties:
    <<: (( merge || nil ))
    admin_password: (( merge ))
    cluster_ips:
    - (( jobs.mysql_z1.networks.mysql1.static_ips.[0] || nil ))
    - (( jobs.mysql_z2.networks.mysql2.static_ips.[0] || nil ))
    - (( jobs.mysql_z3.networks.mysql3.static_ips.[0] || nil ))
    seeded_databases: ~
    syslog_aggregator: (( meta.syslog_aggregator ))
    network_name: mysql1

- name: mysql_z2
  release: cf-mysql
  template: mysql
  instances: (( merge || 1 ))
{'fraction_non_alphanumeric': 0.14877226769378912, 'fraction_numerical': 0.0274434280211844, 'mean_word_length': 3.323621227887617, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1984816', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1450, 'n_words': 323}