tripleo-heat-templates/firstboot/userdata_dev_rsync.yaml
Carlos Camacho 44ef2a3ec1 Change template names to rocky
The new master branch should point now to rocky.

So, HOT templates should specify that they might contain features
for rocky release [1]

Also, this submission updates the yaml validation to use only latest
heat_version alias. There are cases in which we will need to set
the version for specific templates i.e. mixed versions, so there
is added a variable to assign specific templates to specific heat_version
aliases, avoiding the introductions of error by bulk replacing the
the old version in new releases.

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#rocky
Change-Id: Ib17526d9cc453516d99d4659ee5fa51a5aa7fb4b
2018-05-09 08:28:42 +02:00

50 lines
1.3 KiB
YAML

heat_template_version: rocky
description: >
This is first boot configuration for development purposes. It allows
overriding contents of the deployed images via rsync before
configuration (e.g. Puppet) starts, speeding up the feedback loop
between making a change and seeing it applied.
To prepare the host, put something like this to /etc/rsyncd.conf:
[overcloudsync]
path = /root/overcloudsync
comment = overcloud pre-puppet customizations
Then run `rsync --daemon`.
parameters:
dev_rsync_host:
type: string
default: 192.168.122.1
description: Host to sync contents from via rsync
dev_rsync_module:
type: string
default: overcloudsync
description: Name of the module defined in rsyncd.conf on rsync_host
resources:
userdata:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: rsync_config}
subtype: 'x-shellscript'
rsync_config:
type: OS::Heat::SoftwareConfig
properties:
config:
str_replace:
template: |
#!/bin/bash
rsync -avr rsync://RSYNC_HOST/RSYNC_MODULE /
params:
RSYNC_HOST: {get_param: dev_rsync_host}
RSYNC_MODULE: {get_param: dev_rsync_module}
outputs:
OS::stack_id:
value: {get_resource: userdata}