#cloud-config

coreos:
    units:
      - name: cloudstack-ssh-key.service
        command: restart
        runtime: yes
        content: |
          [Unit]
          Description=Sets SSH key from metadata

          [Service]
          Type=oneshot
          StandardOutput=journal+console
          ExecStart=/usr/share/oem/bin/cloudstack-ssh-key
      - name: cloudstack-hostname.service
        command: restart
        runtime: yes
        content: |
          [Unit]
          Description=Sets hostname from metadata

          [Service]
          Type=oneshot
          StandardOutput=journal+console
          ExecStart=/usr/share/oem/bin/cloudstack-hostname
      - name: cloudstack-cloudinit.service
        command: restart
        runtime: yes
        content: |
          [Unit]
          Description=Cloudinit from CloudStack-style metadata
          Requires=coreos-setup-environment.service
          After=coreos-setup-environment.service

          [Service]
          Type=oneshot
          EnvironmentFile=/etc/environment
          ExecStart=/usr/share/oem/bin/cloudstack-coreos-cloudinit
      - name: etcd.service
        command: start
      - name: fleet.service
        command: start
    oem:
      id: cloudstack
      name: CloudStack
      version-id: 0.0.1-r3
      home-url: http://cloudstack.apache.org/
      bug-report-url: https://github.com/coreos/coreos-overlay
    etcd:
      discovery: <tokens>
      addr: $private_ipv4:4001
      peer-addr: $private_ipv4:7001
    fleet:
      public-ip: $private_ipv4
