Merge "Passthrough{Specific} and allNodesConfig for BlockStorage nodes"
[apex-tripleo-heat-templates.git] / block-storage.yaml
1 heat_template_version: 2013-05-23
2 description: 'Common Block Storage Configuration'
3 parameters:
4   BlockStorageImage:
5     type: string
6     default: overcloud-cinder-volume
7   OvercloudBlockStorageFlavor:
8     default: baremetal
9     description: Flavor for block storage nodes to request when deploying.
10     type: string
11   BlockStorageExtraConfig:
12     default: {}
13     description: |
14       Controller specific configuration to inject into the cluster. Same
15       structure as ExtraConfig.
16     type: json
17 resources:
18   BlockStorage0:
19     type: OS::Nova::Server
20     properties:
21       image:
22         {get_param: BlockStorageImage}
23       flavor: {get_param: OvercloudBlockStorageFlavor}
24       key_name: {get_param: KeyName}
25       user_data_format: SOFTWARE_CONFIG
26   BlockStorage0AllNodesDeployment:
27     depends_on: [BlockStorage0Deployment,BlockStorage0PassthroughSpecific]
28     type: OS::Heat::StructuredDeployment
29     properties:
30       config: {get_resource: allNodesConfig}
31       server: {get_resource: BlockStorage0}
32   BlockStorage0Deployment:
33     type: OS::Heat::StructuredDeployment
34     properties:
35       server: {get_resource: BlockStorage0}
36       config: {get_resource: BlockStorageConfig}
37       input_values:
38         controller_virtual_ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
39         cinder_dsn: {"Fn::Join": ['', ['mysql://cinder:unset@', {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} , '/cinder']]}
40       signal_transport: NO_SIGNAL
41   BlockStorage0Passthrough:
42     type: OS::Heat::StructuredDeployment
43     properties:
44       config: {get_resource: BlockStoragePassthrough}
45       server: {get_resource: BlockStorage0}
46       signal_transport: NO_SIGNAL
47       input_values:
48         passthrough_config: {get_param: ExtraConfig}
49   BlockStorage0PassthroughSpecific:
50     depends_on: [BlockStorage0Passthrough]
51     type: OS::Heat::StructuredDeployment
52     properties:
53       config: {get_resource: BlockStoragePassthroughSpecific}
54       server: {get_resource: BlockStorage0}
55       signal_transport: NO_SIGNAL
56       input_values:
57         passthrough_config_specific: {get_param: BlockStorageExtraConfig}
58   BlockStorageConfig:
59     type: OS::Heat::StructuredConfig
60     properties:
61       group: os-apply-config
62       config:
63         admin-password: {get_param: AdminPassword}
64         keystone:
65           host: {get_input: controller_virtual_ip}
66         cinder:
67           db: {get_input: cinder_dsn}
68           volume_size_mb:
69             get_param: CinderLVMLoopDeviceSize
70           service-password:
71             get_param: CinderPassword
72           iscsi-helper:
73             get_param: CinderISCSIHelper
74         rabbit:
75           host: {get_input: controller_virtual_ip}
76           username: {get_param: RabbitUserName}
77           password: {get_param: RabbitPassword}
78         glance:
79           host: {get_input: controller_virtual_ip}
80           port: {get_param: GlancePort}
81   BlockStoragePassthrough:
82     type: OS::Heat::StructuredConfig
83     properties:
84       group: os-apply-config
85       config: {get_input: passthrough_config}
86   BlockStoragePassthroughSpecific:
87     type: OS::Heat::StructuredConfig
88     properties:
89       group: os-apply-config
90       config: {get_input: passthrough_config_specific}