diff options
author | Steven Hardy <shardy@redhat.com> | 2015-04-02 09:52:18 -0400 |
---|---|---|
committer | Steven Hardy <shardy@redhat.com> | 2015-04-24 10:18:31 +0100 |
commit | 723db1317cd62a8772c764847c80a339eae4c03f (patch) | |
tree | dc1161fb6db10d4317702366c9c903d5cd5c14c0 /firstboot/userdata_default.yaml | |
parent | 1781c64bfc9cc929355b28344d0e34b2347e6ffe (diff) |
Enable passing optional first-boot user-data
Currently all the OS::Nova::Server resource created don't pass any
user-data. It's possible to pass user-data as well as using heat
SoftwareConfig/SoftwareDeployment resources, and this can be useful
when you have simple "first boot" tasks which are possible either via
cloud-init, or via simple run-once scripts.
This enables passing such data by implementing a new provider resource
OS::TripleO::NodeUserData, which defaults to passing an empty mime
archive (thus it's a no-op). An example of non no-op usage is also
provided.
Change-Id: Id0caba69768630e3a10439ba1fc2547a609c0cfe
Diffstat (limited to 'firstboot/userdata_default.yaml')
-rw-r--r-- | firstboot/userdata_default.yaml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/firstboot/userdata_default.yaml b/firstboot/userdata_default.yaml new file mode 100644 index 00000000..140d2bf8 --- /dev/null +++ b/firstboot/userdata_default.yaml @@ -0,0 +1,20 @@ +heat_template_version: 2014-10-16 + +description: > + This is a default no-op template which provides empty user-data + which can be passed to the OS::Nova::Server resources. + This template can be replaced with a different implementation via + the resource registry, such that deployers may customize their + first-boot configuration. + +resources: + userdata: + type: OS::Heat::MultipartMime + +outputs: + # This means get_resource from the parent template will get the userdata, see: + # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent + # Note this is new-for-kilo, an alternative is returning a value then using + # get_attr in the parent template instead. + OS::stack_id: + value: {get_resource: userdata} |