---
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:
    proxy: on
    listen-client-urls: http://127.0.0.1:2379
    initial-cluster: etcdserver=http://172.18.18.101: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
