Bump template version for all templates to "ocata"
[apex-tripleo-heat-templates.git] / extraconfig / all_nodes / random_string.j2.yaml
1 heat_template_version: ocata
2
3 description: >
4   Example extra config for cluster config
5   this example deploys a random string to all controller and compute
6   nodes, showing how data may be shared amongst nodes, vs the
7   other ExtraConfig interfaces which act only on individual nodes.
8
9 # Parameters passed from the parent template - note if you maintain
10 # out-of-tree templates they may require additional parameters if the
11 # in-tree templates add a new role.
12 parameters:
13   servers:
14     type: json
15 # Note extra parameters can be defined, then passed data via the
16 # environment parameter_defaults, without modifying the parent template
17
18 resources:
19
20   Random:
21     type: OS::Heat::RandomString
22
23   RandomConfig:
24     type: OS::Heat::SoftwareConfig
25     properties:
26       group: script
27       inputs:
28       - name: random_value
29       config: |
30         #!/bin/sh
31         echo $random_value > /root/random_value
32
33   RandomDeploymentsController:
34     type: OS::Heat::SoftwareDeployments
35     properties:
36       name: RandomDeploymentsController
37       servers:  {get_param: [servers, Controller]}
38       config: {get_resource: RandomConfig}
39       actions: ['CREATE'] # Only do this on CREATE
40       input_values:
41         random_value: {get_attr: [Random, value]}
42
43   RandomDeploymentsCompute:
44     type: OS::Heat::SoftwareDeployments
45     properties:
46       name: RandomDeploymentsCompute
47       servers:  {get_param: [servers, Compute]}
48       config: {get_resource: RandomConfig}
49       actions: ['CREATE'] # Only do this on CREATE
50       input_values:
51         random_value: {get_attr: [Random, value]}