heat_template_version: 2013-05-23
description: >
  This template demonstrates how to use OS::Heat::StructuredDeployment
  to apply config via os-apply-config. Note this requires your image to
  be built with the ntp element added (not included in the instructions
  in this repo by default, you'll have to add it and rebuild).
parameters:
  key_name:
    type: string
    default: default
  flavor:
    type: string
    default: m1.small
  image:
    type: string
    default: fedora-software-config
  ntp_server:
    type: string
    default: 0.uk.pool.ntp.org

resources:
  config:
    type: OS::Heat::StructuredConfig
    properties:
      group: os-apply-config
      config:
        ntp:
          servers:
            - {server: {get_param: ntp_server}, fudge: "stratum 0"}

  deployment:
    type: OS::Heat::StructuredDeployment
    properties:
      config:
        get_resource: config
      server:
        get_resource: server

  server:
    type: OS::Nova::Server
    properties:
      image: {get_param: image}
      flavor: {get_param: flavor}
      key_name: {get_param: key_name}
      user_data_format: SOFTWARE_CONFIG

Add example of SoftwareConfig driving os-apply-config
Add example of SoftwareConfig driving os-apply-config

Adds a minimal example of driving os-apply-config directly, e.g
with no heat-config hooks.  This is essentially how TripleO
currently uses SoftwareConfig resources, so it's useful for
reporoducing TripleO related problems.

Note, this needs rebuilding your image with the addition of the
"ntp" element, and currently the signalling won't work
https://review.openstack.org/#/c/145764/ is the update to
os-refresh-config which aims to fix that.

Change-Id: Id7a84655632da9fa6c4079954178f4abda787e4a
Related-Bug: #1389178
