da5f9edcb03f02fcacb19e05a1d044539a202f72
[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       signal_transport: NO_SIGNAL
36   BlockStorageConfig:
37     Type: OS::Heat::StructuredConfig
38     Properties:
39       group: os-apply-config
40       config:
41         admin-password: {Ref: AdminPassword}
42         keystone:
43           host: {get_input: controller_host}
44         cinder:
45           db: {get_input: cinder_dsn}
46           volume_size_mb:
47             Ref: CinderLVMLoopDeviceSize
48           service-password:
49             Ref: CinderPassword
50           iscsi-helper:
51             Ref: CinderISCSIHelper
52         admin-password: {Ref: AdminPassword}
53         rabbit:
54           host: {get_input: controller_host}
55           username: {Ref: RabbitUserName}
56           password: {Ref: RabbitPassword}
57         interfaces:
58           control: {Ref: NeutronPublicInterface}
59         neutron:
60           ovs:
61             local_ip: {get_input: neutron_local_ip}
62             tenant_network_type: {Ref: NeutronNetworkType}
63             enable_tunneling: {Ref: NeutronEnableTunnelling}
64           service-password:
65             Ref: NeutronPassword
66         config:
67           keystone:
68             host: {get_input: controller_host}
69           cinder:
70             db: {get_input: cinder_dsn}
71             volume_size_mb:
72               Ref: CinderLVMLoopDeviceSize
73             service-password:
74               Ref: CinderPassword
75             iscsi-helper:
76               Ref: CinderISCSIHelper
77           admin-password: {Ref: AdminPassword}
78           rabbit:
79             host: {get_input: controller_host}
80             username: {Ref: RabbitUserName}
81             password: {Ref: RabbitPassword}
82           interfaces:
83             control: {Ref: NeutronPublicInterface}
84           neutron:
85             ovs:
86               local_ip: { get_input: neutron_local_ip }
87               tenant_network_type: {Ref: NeutronNetworkType}
88               enable_tunneling: {Ref: NeutronEnableTunnelling}
89             service-password:
90               Ref: NeutronPassword