<commit_before>#cloud-config

repo_update: true
repo_upgrade: all

apt_sources:
  - source: "deb https://apt.dockerproject.org/repo ubuntu-wily main"
    key: |
      -----BEGIN PGP PUBLIC KEY BLOCK-----
      <KEY>gA/Zxc
      jk6Y1ZvIm8Mt8wLRFH9Nww+FVsCtaCXJLP8DlJLASMD9rl5QS9Ku3u7ZNrr5HWXP
      HXITX660jglyshch6CWeiUATqjIAzkEQom/kEnOrvJAtkypRJ59vYQOedZ1sFVEL
      MXg2UCkD/FwojfnVtjzYaTCeGwFQeqzHmM241iuOmBYPeyTY5veF49aBJA1gEJOQ
      TvBR8Q==
      =Fm3p
      -----END PGP PUBLIC KEY BLOCK-----

packages:
  - curl
  - docker-engine

write_files:

  - path: /usr/local/bin/kubernetes-anywhere-toolbox
    permissions: '0755'
    owner: root
    content: |
      #!/bin/bash
      source /etc/kubernetes-anywhere-secure-config-images.env

      export HOME=/root

      sudo docker pull ${KUBERNETES_ANYWHERE_TOOLS_SECURE_CONFIG_IMAGE}

      ## TODO: find a way to avoid garbage
      secure_config_container=$(sudo docker run --detach ${KUBERNETES_ANYWHERE_TOOLS_SECURE_CONFIG_IMAGE})

      args="--volume=/var/run/weave/weave.sock:/docker.sock --volumes-from=${secure_config_container}"

      if [ -n "${SSH_AUTH_SOCK}" ] ; then
        args="${args} --volume=${SSH_AUTH_SOCK}:/agent.sock --env=SSH_AUTH_SOCK=/agent.sock"
      fi

      exec sudo docker --host="unix:///var/run/weave/weave.sock" run \
        --tty --interactive ${args} \
          weaveworks/kubernetes-anywhere:tools $@

  - path: /etc/kubernetes-anywhere.env
    permissions: '0600'
    owner: root
    content: |
      WEAVE_DEBUG=1
      WEAVE_VERSION="awh1"
      WEAVEPROXY_ARGS="--log-level=debug"
      WEAVE_INIT_PEER_COUNT="--init-peer-count 7"
      WEAVE_SCRIPT_VERSION="v1.4.4"
      ETCD_CLUSTER_SIZE="3"
      CLOUD_PROVIDER="aws"
      DOCKER_ARGS="--host=fd:// --storage-driver=overlay"

  - path: /etc/systemd/system/docker.socket
    permissions: '0644'
    owner: root
    content: |
      [Unit]
      Description=Docker Socket for the API
      PartOf=docker.service
      [Socket]
      ListenStream=/var/run/docker.sock
      SocketMode=0660
      [Install]
      WantedBy=sockets.target

  - path: /etc/systemd/system/docker.service
    permissions: '0644'<commit_msg>Get rid of `WEAVE_DEBUG`, as it screws the the proxy<commit_after>#cloud-config

repo_update: true
repo_upgrade: all

apt_sources:
  - source: "deb https://apt.dockerproject.org/repo ubuntu-wily main"
    key: |
      -----BEGIN PGP PUBLIC KEY BLOCK-----
      <KEY>
      <KEY>
      dHM7ZTqlA1tHIG+agyPf3Rae0jPMsHR6q+arXVwMccyOi+ULU0z8mHUJ3iEMIrpT
      X+80KaN/ZjibfsBOCjcfiJSB/acn4nxQQgNZigna32velafhQivsNREFeJpzENiG
      HOoyC<KEY>
      0C0V9yqtdPdRWVIEhHxyNHATaVYOafTj/EF0lDxLl6zDT6trRV5n9F1VCEh4Aal8
      L5MxVPcIZVO7NHT2EkQgn8CvWjV3oKl2GopZF8V4XdJRl90U/WDv/6cmfI08GkzD
      YBHhS8ULWRFwGKobsSTyIvnbk4NtKdnTGyTJCQ8+6i52s+C54PiNgfj2ieNn6oOR
      7d+bNCcG1CdOYY+ZXVOcsjl73UYvtJrO0Rl/NpYERkZ5d/tzw4jZ6FCXgggA/Zxc
      jk6Y1ZvIm8Mt8wLRFH9Nww+FVsCtaCXJLP8DlJLASMD9rl5QS9Ku3u7ZNrr5HWXP
      HXITX660jglyshch6CWeiUATqjIAzkEQom/kEnOrvJAtkypRJ59vYQOedZ1sFVEL
      MXg2UCkD/FwojfnVtjzYaTCeGwFQeqzHmM241iuOmBYPeyTY5veF49aBJA1gEJOQ
      TvBR8Q==
      =Fm3p
      -----END PGP PUBLIC KEY BLOCK-----

packages:
  - curl
  - docker-engine

write_files:

  - path: /usr/local/bin/kubernetes-anywhere-toolbox
    permissions: '0755'
    owner: root
    content: |
      #!/bin/bash
      source /etc/kubernetes-anywhere-secure-config-images.env

      export HOME=/root

      sudo docker pull ${KUBERNETES_ANYWHERE_TOOLS_SECURE_CONFIG_IMAGE}

      ## TODO: find a way to avoid garbage
      secure_config_container=$(sudo docker run --detach ${KUBERNETES_ANYWHERE_TOOLS_SECURE_CONFIG_IMAGE})

      args="--volume=/var/run/weave/weave.sock:/docker.sock --volumes-from=${secure_config_container}"

      if [ -n "${SSH_AUTH_SOCK}" ] ; then
        args="${args} --volume=${SSH_AUTH_SOCK}:/agent.sock --env=SSH_AUTH_SOCK=/agent.sock"
      fi

      exec sudo docker --host="unix:///var/run/weave/weave.sock" run \
        --tty --interactive ${args} \
          weaveworks/kubernetes-anywhere:tools $@

  - path: /etc/kubernetes-anywhere.env
    permissions: '0600'
    owner: root
    content: |
      WEAVE_VERSION="awh1"
      WEAVEPROXY_ARGS="--log-level=debug"
      WEAVE_INIT_PEER_COUNT="--init-peer-count 7"
      WEAVE_SCRIPT_VERSION="v1.4.4"
      ETCD_CLUSTER_SIZE="3"
      CLOUD_PROVIDER="aws"
      DOCKER_ARGS="--host=fd:// --storage-driver=overlay"

  - path: /etc/systemd/system/docker.socket
    permissions: '0644'
    owner: root
    content: |
      [Unit]
      Description=Docker Socket for the API
      PartOf=docker.service
      [Socket]
      ListenStream=/var/run/docker.sock
      SocketMode=0660
      [Install]
      WantedBy=sockets.target

  - path: /etc/systemd/system/docker.service
    permissions: '0644'
{'fraction_non_alphanumeric': 0.11602324616023246, 'fraction_numerical': 0.034454130344541305, 'mean_word_length': 3.009151414309484, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3624388', 'n_tokens_mistral': 2140, 'n_tokens_neox': 1951, 'n_words': 253}