aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-05-22 12:22:02 +0000
committerGerrit Code Review <review@openstack.org>2015-05-22 12:22:02 +0000
commit631b1afee180317e4eca5980e82238265f1a7049 (patch)
tree780521006fb5f758afb3db88ffbf613158e9d169
parent2c09ad590c05e6fd614f9ea78c43638c2a901930 (diff)
parent91e80992d4f44b004dfc152dc4a12bbdba005c7a (diff)
Merge "Firstboot rsync for development purposes"
-rw-r--r--firstboot/userdata_dev_rsync.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/firstboot/userdata_dev_rsync.yaml b/firstboot/userdata_dev_rsync.yaml
new file mode 100644
index 00000000..7dc7bd4d
--- /dev/null
+++ b/firstboot/userdata_dev_rsync.yaml
@@ -0,0 +1,49 @@
+heat_template_version: 2014-10-16
+
+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}