Merge "Add user_data_format"
[apex-tripleo-heat-templates.git] / block-storage.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
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   NeutronNetworkType:
12     Type: String
13     Default: 'gre'
14   NeutronEnableTunnelling:
15     Type: String
16     Default: True
17 Resources:
18   BlockStorage0:
19     Type: OS::Nova::Server
20     Properties:
21       image:
22         {Ref: BlockStorageImage}
23       flavor: {Ref: OvercloudBlockStorageFlavor}
24       key_name: {Ref: KeyName}
25       user_data_format: SOFTWARE_CONFIG
26   BlockStorage0Deployment:
27     Type: OS::Heat::StructuredDeployment
28     Properties:
29       server: {Ref: BlockStorage0}
30       config: {Ref: BlockStorageConfig}
31       input_values:
32         controller_host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
33         cinder_dsn: {"Fn::Join": ['', ['mysql://cinder:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } , '/cinder']]}
34         neutron_local_ip: {"Fn::Select": [0, "Fn::Select": [ctlplane, {"Fn::GetAtt": [BlockStorage0 , networks]}]]}
35   BlockStorageConfig:
36     Type: OS::Heat::StructuredConfig
37     Properties:
38       group: os-apply-config
39       config:
40         admin-password: {Ref: AdminPassword}
41         keystone:
42           host: {get_input: controller_host}
43         cinder:
44           db: {get_input: cinder_dsn}
45           volume_size_mb:
46             Ref: CinderLVMLoopDeviceSize
47           service-password:
48             Ref: CinderPassword
49           iscsi-helper:
50             Ref: CinderISCSIHelper
51         admin-password: {Ref: AdminPassword}
52         rabbit:
53           host: {get_input: controller_host}
54           username: {Ref: RabbitUserName}
55           password: {Ref: RabbitPassword}
56         interfaces:
57           control: {Ref: NeutronPublicInterface}
58         neutron:
59           ovs:
60             local_ip: {get_input: neutron_local_ip}
61             tenant_network_type: {Ref: NeutronNetworkType}
62             enable_tunneling: {Ref: NeutronEnableTunnelling}
63           service-password:
64             Ref: NeutronPassword
65         config:
66           keystone:
67             host: {get_input: controller_host}
68           cinder:
69             db: {get_input: cinder_dsn}
70             volume_size_mb:
71               Ref: CinderLVMLoopDeviceSize
72             service-password:
73               Ref: CinderPassword
74             iscsi-helper:
75               Ref: CinderISCSIHelper
76           admin-password: {Ref: AdminPassword}
77           rabbit:
78             host: {get_input: controller_host}
79             username: {Ref: RabbitUserName}
80             password: {Ref: RabbitPassword}
81           interfaces:
82             control: {Ref: NeutronPublicInterface}
83           neutron:
84             ovs:
85               local_ip: { get_input: neutron_local_ip }
86               tenant_network_type: {Ref: NeutronNetworkType}
87               enable_tunneling: {Ref: NeutronEnableTunnelling}
88             service-password:
89               Ref: NeutronPassword