<commit_before>#cloud-config

---
write-files:
  - path: /etc/conf.d/nfs
    permissions: '0644'
    content: |
      OPTS_RPC_MOUNTD=""
  - path: /opt/bin/etcd-waiter.sh
    owner: root
    content: |
      #! /usr/bin/bash
      until curl http://__MASTER_IP__:4001/v2/machines; do sleep 2; done
  - path: /opt/bin/docker-cache-waiter.sh
    owner: root
    content: |
      #! /usr/bin/bash
      until curl http://__MASTER_IP__:5000; do sleep 2; done
  - path: /opt/bin/kube-apiserver-waiter.sh
    owner: root
    content: |
      #! /usr/bin/bash
      until curl http://__MASTER_IP__:8080; do sleep 2; done
coreos:
  fleet:
    public-ip: $public_ipv4
    etcd_servers: http://__MASTER_IP__:4001
    metadata: "role=minion"
  flannel:
    interface: eth1
  units:
    - name: etcd.service
      mask: true
    - name: etcd-waiter.service
      command: start
      content: |
        [Unit]
        Description=etcd waiter
        Wants=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=/usr/bin/chmod +x /opt/bin/etcd-waiter.sh
        ExecStart=/usr/bin/bash /opt/bin/etcd-waiter.sh
        RemainAfterExit=true
        Type=oneshot
    - name: docker-cache-waiter.service
      command: start
      content: |
        [Unit]
        Description=docker cache waiter
        Wants=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=/usr/bin/chmod +x /opt/bin/docker-cache-waiter.sh
        ExecStart=/usr/bin/bash /opt/bin/docker-cache-waiter.sh
        RemainAfterExit=true
        Type=oneshot
    - name: kube-apiserver-waiter.service
      command: start
      content: |
        [Unit]
        Description=Kubernetes API Server waiter
        Wants=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-apiserver-waiter.sh
        ExecStart=/usr/bin/bash /opt/bin/kube-apiserver-waiter.sh
        RemainAfterExit=true
        Type=oneshot
    - name: fleet.service
      command: start
      content: |
        [Unit]
        Description=fleet daemon
        Wants=fleet.socket
        After=fleet.socket
        Wants=etcd-waiter.service
        After=etcd-waiter.service
        [Service]
        ExecStart=/usr/bin/fleetd
        Restart=always
        RestartSec=10s
    - name: setup-network-environment.service
      command: start
      content: |
        [Unit]
        Description=Setup Network Environment
        Documentation=https://github.com/kelseyhightower/setup-network-environment
        Requires=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=-/usr/bin/mkdir -p /opt/bin
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/setup-network-environment
        ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment
        ExecStart=/opt/bin/setup-network-environment
        RemainAfterExit=yes
        Type=oneshot
    - name: flannel.service
      command: start
      content: |
        [Unit]
        Requires=setup-network-environment.service
        After=setup-network-environment.service
        Wants=etcd-waiter.service
        After=etcd-waiter.service
        [Service]
        Type=notify
        ExecStartPre=/usr/bin/mkdir -p /opt/bin
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld
        ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld
        ExecStart=/opt/bin/flanneld --iface=eth1 --etcd-endpoints http://__MASTER_IP__:4001
    - name: docker.service
      command: start
      content: |
        [Unit]
        After=flannel.service
        Wants=flannel.service
        Requires=docker-cache-waiter.service
        After=docker-cache-waiter.service
        Description=Docker Application Container Engine
        Documentation=http://docs.docker.io
        [Service]
        EnvironmentFile=/run/flannel/subnet.env
        ExecStartPre=/bin/mount --make-rprivate /
        ExecStart=/usr/bin/docker --registry-mirror=http://__MASTER_IP__:5000 -d --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU} -s=overlay -H fd://
        [Install]
        WantedBy=multi-user.target
    - name: cadvisor.service
      command: start
      content: |
        [Unit]
        Description=Google Container Advisor
        After=docker.service
        Requires=docker.service
        [Service]
        Restart=on-failure
        RestartSec=5
        ExecStartPre=-/usr/bin/docker kill cadvisor
        ExecStartPre=-/usr/bin/docker rm -f cadvisor
        ExecStartPre=/usr/bin/docker pull google/cadvisor
        ExecStart=/usr/bin/docker run --name cadvisor -v=/var/run:/var/run:rw -v=/sys:/sys:ro -v=/var/lib/docker/:/var/lib/docker:ro -p=4194:4194 google/cadvisor --logtostderr --port=4194
        ExecStop=/usr/bin/docker stop -t 2 cadvisor
    - name: kube-proxy.service
      command: start
      content: |
        [Unit]
        Description=Kubernetes Proxy Server
        Documentation=https://github.com/GoogleCloudPlatform/kubernetes
        After=cadvisor.service
        Requires=cadvisor.service
        Requires=kube-apiserver-waiter.service
        After=kube-apiserver-waiter.service
        
        [Service]
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/__RELEASE__/bin/linux/amd64/kube-proxy
        ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy
        ExecStart=/opt/bin/kube-proxy \
        --master=__MASTER_IP__:8080 \
        --logtostderr=true
        Restart=on-failure
        RestartSec=10
    - name: kube-kubelet.service
      command: start
      content: |
        [Unit]
        Description=Kubernetes Kubelet Server
        Documentation=https://github.com/GoogleCloudPlatform/kubernetes
        After=docker.service cadvisor.service
        Requires=docker.service
        Requires=kube-apiserver-waiter.service
        After=kube-apiserver-waiter.service

        [Service]
        EnvironmentFile=/etc/network-environment
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/__RELEASE__/bin/linux/amd64/kubelet
        ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet
        ExecStart=/opt/bin/kubelet \
        --address=0.0.0.0 \
        --port=10250 \
        --hostname_override=$public_ipv4 \
        --allow_privileged=true
        --api_servers=__MASTER_IP__:8080 \
        --logtostderr=true
        --v=0
        Restart=on-failure
        RestartSec=10
    - name: rpc-statd.service
      command: start
      enable: true
  update:
    group: __CHANNEL__
    reboot-strategy: off<commit_msg>fixed type on apiserver<commit_after>#cloud-config

---
write-files:
  - path: /etc/conf.d/nfs
    permissions: '0644'
    content: |
      OPTS_RPC_MOUNTD=""
  - path: /opt/bin/etcd-waiter.sh
    owner: root
    content: |
      #! /usr/bin/bash
      until curl http://__MASTER_IP__:4001/v2/machines; do sleep 2; done
  - path: /opt/bin/docker-cache-waiter.sh
    owner: root
    content: |
      #! /usr/bin/bash
      until curl http://__MASTER_IP__:5000; do sleep 2; done
  - path: /opt/bin/kube-apiserver-waiter.sh
    owner: root
    content: |
      #! /usr/bin/bash
      until curl http://__MASTER_IP__:8080; do sleep 2; done
coreos:
  fleet:
    public-ip: $public_ipv4
    etcd_servers: http://__MASTER_IP__:4001
    metadata: "role=minion"
  flannel:
    interface: eth1
  units:
    - name: etcd.service
      mask: true
    - name: etcd-waiter.service
      command: start
      content: |
        [Unit]
        Description=etcd waiter
        Wants=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=/usr/bin/chmod +x /opt/bin/etcd-waiter.sh
        ExecStart=/usr/bin/bash /opt/bin/etcd-waiter.sh
        RemainAfterExit=true
        Type=oneshot
    - name: docker-cache-waiter.service
      command: start
      content: |
        [Unit]
        Description=docker cache waiter
        Wants=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=/usr/bin/chmod +x /opt/bin/docker-cache-waiter.sh
        ExecStart=/usr/bin/bash /opt/bin/docker-cache-waiter.sh
        RemainAfterExit=true
        Type=oneshot
    - name: kube-apiserver-waiter.service
      command: start
      content: |
        [Unit]
        Description=Kubernetes API Server waiter
        Wants=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-apiserver-waiter.sh
        ExecStart=/usr/bin/bash /opt/bin/kube-apiserver-waiter.sh
        RemainAfterExit=true
        Type=oneshot
    - name: fleet.service
      command: start
      content: |
        [Unit]
        Description=fleet daemon
        Wants=fleet.socket
        After=fleet.socket
        Wants=etcd-waiter.service
        After=etcd-waiter.service
        [Service]
        ExecStart=/usr/bin/fleetd
        Restart=always
        RestartSec=10s
    - name: setup-network-environment.service
      command: start
      content: |
        [Unit]
        Description=Setup Network Environment
        Documentation=https://github.com/kelseyhightower/setup-network-environment
        Requires=network-online.target
        After=network-online.target
        [Service]
        ExecStartPre=-/usr/bin/mkdir -p /opt/bin
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/setup-network-environment
        ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment
        ExecStart=/opt/bin/setup-network-environment
        RemainAfterExit=yes
        Type=oneshot
    - name: flannel.service
      command: start
      content: |
        [Unit]
        Requires=setup-network-environment.service
        After=setup-network-environment.service
        Wants=etcd-waiter.service
        After=etcd-waiter.service
        [Service]
        Type=notify
        ExecStartPre=/usr/bin/mkdir -p /opt/bin
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld
        ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld
        ExecStart=/opt/bin/flanneld --iface=eth1 --etcd-endpoints http://__MASTER_IP__:4001
    - name: docker.service
      command: start
      content: |
        [Unit]
        After=flannel.service
        Wants=flannel.service
        Requires=docker-cache-waiter.service
        After=docker-cache-waiter.service
        Description=Docker Application Container Engine
        Documentation=http://docs.docker.io
        [Service]
        EnvironmentFile=/run/flannel/subnet.env
        ExecStartPre=/bin/mount --make-rprivate /
        ExecStart=/usr/bin/docker --registry-mirror=http://__MASTER_IP__:5000 -d --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU} -s=overlay -H fd://
        [Install]
        WantedBy=multi-user.target
    - name: cadvisor.service
      command: start
      content: |
        [Unit]
        Description=Google Container Advisor
        After=docker.service
        Requires=docker.service
        [Service]
        Restart=on-failure
        RestartSec=5
        ExecStartPre=-/usr/bin/docker kill cadvisor
        ExecStartPre=-/usr/bin/docker rm -f cadvisor
        ExecStartPre=/usr/bin/docker pull google/cadvisor
        ExecStart=/usr/bin/docker run --name cadvisor -v=/var/run:/var/run:rw -v=/sys:/sys:ro -v=/var/lib/docker/:/var/lib/docker:ro -p=4194:4194 google/cadvisor --logtostderr --port=4194
        ExecStop=/usr/bin/docker stop -t 2 cadvisor
    - name: kube-proxy.service
      command: start
      content: |
        [Unit]
        Description=Kubernetes Proxy Server
        Documentation=https://github.com/GoogleCloudPlatform/kubernetes
        After=cadvisor.service
        Requires=cadvisor.service
        Requires=kube-apiserver-waiter.service
        After=kube-apiserver-waiter.service

        [Service]
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/__RELEASE__/bin/linux/amd64/kube-proxy
        ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy
        ExecStart=/opt/bin/kube-proxy \
        --master=__MASTER_IP__:8080 \
        --logtostderr=true
        Restart=on-failure
        RestartSec=10
    - name: kube-kubelet.service
      command: start
      content: |
        [Unit]
        Description=Kubernetes Kubelet Server
        Documentation=https://github.com/GoogleCloudPlatform/kubernetes
        After=docker.service cadvisor.service
        Requires=docker.service
        Requires=kube-apiserver-waiter.service
        After=kube-apiserver-waiter.service

        [Service]
        EnvironmentFile=/etc/network-environment
        ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/__RELEASE__/bin/linux/amd64/kubelet
        ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet
        ExecStart=/opt/bin/kubelet \
        --address=0.0.0.0 \
        --port=10250 \
        --hostname_override=$public_ipv4 \
        --allow_privileged=true
        --api_server=__MASTER_IP__:8080 \
        --logtostderr=true
        --v=0
        Restart=on-failure
        RestartSec=10
    - name: rpc-statd.service
      command: start
      enable: true
  update:
    group: __CHANNEL__
    reboot-strategy: off
{'fraction_non_alphanumeric': 0.1118651651875606, 'fraction_numerical': 0.01193228428667313, 'mean_word_length': 2.182249644043664, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5947242', 'n_tokens_mistral': 4581, 'n_tokens_neox': 4280, 'n_words': 668}