<commit_before>#cloud-config

---
coreos:
  etcd2:
    name: etcd
    listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
    initial-cluster: etcd=http://$private_ipv4:2380
    initial-advertise-peer-urls: http://$private_ipv4:2380
    listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
    advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
    initial-cluster-state: new
  fleet:
    etcd-servers: http://0.0.0.0:4001
    public-ip: $private_ipv4
    metadata: "role=etcd"
  units:
    - name: format-ebs.service
      command: start
      content: |
        [Unit]
        Description=Formats the EBS drive
        [Service]
        Type=oneshot
        RemainAfterExit=yes
        ExecStart=/usr/sbin/wipefs -f ${format_docker_storage_mnt}
        ExecStart=/usr/sbin/mkfs.ext4 -F ${format_docker_storage_mnt}
    - name: var-lib-docker.mount
      command: start
      content: |
        [Unit]
        Description=Mount EBS to /var/lib/docker
        Requires=format-ebs.service
        After=format-ebs.service
        Before=docker.service
        [Mount]
        What=${format_docker_storage_mnt}
        Where=/var/lib/docker
        Type=ext4
    - name: fleet.service
      command: start
    - name: etcd2.service
      command: start
    - name: systemd-journal-gatewayd.socket
      command: start
      enable: yes<commit_msg>Use the ephemeral / ebs drive for /var/lib/etcd2 on etcd node<commit_after>#cloud-config

---
coreos:
  etcd2:
    name: etcd
    listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
    initial-cluster: etcd=http://$private_ipv4:2380
    initial-advertise-peer-urls: http://$private_ipv4:2380
    listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
    advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
    initial-cluster-state: new
  fleet:
    etcd-servers: http://0.0.0.0:4001
    public-ip: $private_ipv4
    metadata: "role=etcd"
  units:
    - name: format-ebs.service
      command: start
      content: |
        [Unit]
        Description=Formats the EBS drive
        [Service]
        Type=oneshot
        RemainAfterExit=yes
        ExecStart=/usr/sbin/wipefs -f ${format_docker_storage_mnt}
        ExecStart=/usr/sbin/mkfs.ext4 -F ${format_docker_storage_mnt}
    - name: var-lib-etcd2.mount
      command: start
      content: |
        [Unit]
        Description=Mount EBS to /var/lib/etcd2
        Requires=format-ebs.service
        After=format-ebs.service
        Before=etcd2.service
        [Mount]
        What=${format_docker_storage_mnt}
        Where=/var/lib/etcd2
        Type=ext4
    - name: set-etcd2-permissions.service
      command: start
      content: |
        [Unit]
        Before=etcd2.service
        [Service]
        ExecStart=/usr/bin/chown -R etcd:etcd /var/lib/etcd2
    - name: gen-etcd2-envfile.service
      command: start
      content: |
        [Unit]
        Description=generate env file for etcd2.service
        Before=etcd2.service

        [Service]
        ExecStartPre=/usr/bin/bash -c 'mkdir -p /opt/bin'
        ExecStart=/usr/bin/bash -c 'echo "GOMAXPROCS=$(nproc)" > /opt/bin/etcd2.env'
        RemainAfterExit=true
        Type=oneshot
    - name: fleet.service
      command: start
    - name: etcd2.service
      command: start
      drop-ins:
        - name: 30-gomaxprocs.conf
          content: |
            [Unit]
            Requires=gen-etcd2-envfile.service
            [Service]
            EnvironmentFile=/opt/bin/etcd2.env
    - name: systemd-journal-gatewayd.socket
      command: start
      enable: yes
{'fraction_non_alphanumeric': 0.12176308539944904, 'fraction_numerical': 0.03691460055096419, 'mean_word_length': 2.236185383244207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '7375745', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1285, 'n_words': 203}