pavlo/heatit

View on GitHub
fixtures/engine/complete/result.yaml

Summary

Maintainability
Test Coverage
heat_template_version: 2014-10-16
parameters:
  flavor:
    type: string
    default: 1GB Standard Instance
    constraints:
      - allowed_values:
        - 512MB Standard Instance
        - 2 GB Performance
        - 4 GB Performance
        - 8 GB Performance
        - 15 GB Performance
        - 30 GB Performance
        - 1GB Standard Instance
        - 2GB Standard Instance
        - 4GB Standard Instance
        - 8GB Standard Instance
        - 15GB Standard Instance
        - 30GB Standard Instance
  ssh_key_name:
    type: string
    label: SSH Key name
    description: User name to be configured for the application
    default: pavlo
resources:
  servers:
    type: OS::Heat::ResourceGroup
    properties:
      count: "@param:servers-count"
      resource_def:
        type: "OS::Nova::Server"
        properties:
          name: coreos-%index%
          key_name: { get_param: ssh_key_name }
          flavor: { get_param: flavor }
          image: "44aff7ff-29f3-443d-8da8-9353d47b4b17"
          networks:
            - { uuid: 00000000-0000-0000-0000-000000000000 }
            - { uuid: 11111111-1111-1111-1111-111111111111 }
            - { uuid: "@param:private-network-uuid" }
          user_data_format: "RAW"
          config_drive: "true"
          user_data: |
            #cloud-config
            coreos:
              units:
                - name: etcd-env-generator.service
                  command: start
                  content: |
                    [Unit]
                    Description=Creates an EnvironmentFile with etcd2 setup on private network to be injected into etcd2 service
                    Documentation=https://github.com/pavlo/coreos-utils/etcd-env-generator
                    Requires=network.target
                    After=network.target
                    [Service]
                    ExecStartPre=-/usr/bin/mkdir -p /opt/bin
                    ExecStartPre=/usr/bin/wget -N -P /opt/bin https://raw.githubusercontent.com/pavlo/coreos-utils/master/etcd-env-generator/etcd-env-generator.sh
                    ExecStartPre=/usr/bin/chmod +x /opt/bin/etcd-env-generator.sh
                    ExecStart=/opt/bin/etcd-env-generator.sh @param:network-interface @param:coreos-token
                    RemainAfterExit=yes
                    Type=oneshot
                - name: etcd2.service
                  drop-ins:
                    - name: "timeout.conf"
                      content: |
                        [Service]
                        TimeoutStartSec=0
                    - name: "private-networking.conf"
                      content: |
                        [Unit]
                        Requires=etcd-env-generator.service
                        After=etcd-env-generator.service
                        [Service]
                        EnvironmentFile=/etc/etcd2-environment
                  command: start
                - name: fleet.service
                  command: start