---
layout: null
---
#cloud-config
# Calico Version {{site.data.versions[page.version].first.title}}
# https://docs.projectcalico.org/{{page.version}}/releases#{{site.data.versions[page.version].first.title}}
# This manifest includes the following component versions:
#   calico/node:{{site.data.versions[page.version].first.components["calico/node"].version}}
---
coreos:
  update:
    reboot-strategy: off
  etcd2:
    name: "etcdserver"
    listen-client-urls: http://0.0.0.0:2379
    advertise-client-urls: http://$private_ipv4:2379
    initial-cluster: etcdserver=http://$private_ipv4:2380
    initial-advertise-peer-urls: http://$private_ipv4:2380
    listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
    listen-peer-urls: http://0.0.0.0:2380
  units:
    - name: "etcd2.service"
      command: "start"
    - name: calico-download.service
      runtime: true
      command: start
      content: |
        [Unit]
        Description=Download calico
        After=network-online.target
        Requires=network-online.target

        [Service]
        User=root
        ExecStartPre=/usr/bin/mkdir -p /opt/bin
        ExecStartPre=/usr/bin/mkdir -p /etc/rkt/net.d
        ExecStartPre=/usr/bin/mkdir -p /var/run/calico
        ExecStartPre=/usr/bin/mkdir -p /var/log/calico
        ExecStartPre=/usr/bin/wget -N -O /opt/bin/calicoctl {{site.data.versions[page.version].first.components.calicoctl.download_url}}
        ExecStartPre=/usr/bin/wget -N -P /etc/rkt/net.d {{site.data.versions[page.version].first.components["calico/cni"].download_calico_url}}
        ExecStartPre=/usr/bin/wget -N -P /etc/rkt/net.d {{site.data.versions[page.version].first.components["calico/cni"].download_calico_ipam_url}}
        ExecStartPre=/usr/bin/chmod a+w -R /etc/rkt/net.d
        ExecStartPre=/usr/bin/chmod +x /etc/rkt/net.d/calico
        ExecStartPre=/usr/bin/chmod +x /etc/rkt/net.d/calico-ipam
        ExecStartPre=/usr/bin/chmod +x /opt/bin/calicoctl
        ExecStartPre=/usr/bin/rkt --insecure-options=image fetch docker://busybox
        ExecStartPre=/usr/bin/rkt --insecure-options=image fetch quay.io/calico/node:{{site.data.versions[page.version].first.components["calico/node"].version}}
        ExecStart=/usr/bin/true
        RemainAfterExit=yes
        Type=oneshot

        [Install]
        WantedBy=multi-user.target


