Merge "Haproxy configuration"
[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   BlockStorage0Deployment:
26     Type: OS::Heat::StructuredDeployment
27     Properties:
28       server: {Ref: BlockStorage0}
29       config: {Ref: BlockStorageConfig}
30       input_values:
31         controller_host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
32         cinder_dsn: {"Fn::Join": ['', ['mysql://cinder:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } , '/cinder']]}
33         neutron_local_ip: {"Fn::Select": [0, "Fn::Select": [ctlplane, [{"Fn::GetAtt": [BlockStorage0 , networks]}]]]}
34   BlockStorageConfig:
35     Type: OS::Heat::StructuredConfig
36     Properties:
37       group: os-apply-config
38       config:
39         admin-password: {Ref: AdminPassword}
40         keystone:
41           host: {get_input: controller_host}
42         cinder:
43           db: {get_input: cinder_dsn}
44           volume_size_mb:
45             Ref: CinderLVMLoopDeviceSize
46           service-password:
47             Ref: CinderPassword
48           iscsi-helper:
49             Ref: CinderISCSIHelper
50         admin-password: {Ref: AdminPassword}
51         rabbit:
52           host: {get_input: controller_host}
53           username: {Ref: RabbitUserName}
54           password: {Ref: RabbitPassword}
55         interfaces:
56           control: {Ref: NeutronPublicInterface}
57         neutron:
58           ovs:
59             local_ip: {get_input: neutron_local_ip}
60             tenant_network_type: {Ref: NeutronNetworkType}
61             enable_tunneling: {Ref: NeutronEnableTunnelling}
62           service-password:
63             Ref: NeutronPassword
64         config:
65           keystone:
66             host: {get_input: controller_host}
67           cinder:
68             db: {get_input: cinder_dsn}
69             volume_size_mb:
70               Ref: CinderLVMLoopDeviceSize
71             service-password:
72               Ref: CinderPassword
73             iscsi-helper:
74               Ref: CinderISCSIHelper
75           admin-password: {Ref: AdminPassword}
76           rabbit:
77             host: {get_input: controller_host}
78             username: {Ref: RabbitUserName}
79             password: {Ref: RabbitPassword}
80           interfaces:
81             control: {Ref: NeutronPublicInterface}
82           neutron:
83             ovs:
84               local_ip: { get_input: neutron_local_ip }
85               tenant_network_type: {Ref: NeutronNetworkType}
86               enable_tunneling: {Ref: NeutronEnableTunnelling}
87             service-password:
88               Ref: NeutronPassword