Merge "Add converted version of block and object storage"
[apex-tripleo-heat-templates.git] / cinder-storage.yaml
1 heat_template_version: 2014-10-16
2 description: 'Common Block Storage Configuration'
3 parameters:
4   AdminPassword:
5     default: ''
6     type: string
7   Image:
8     default: overcloud-cinder-volume
9     type: string
10   CinderISCSIHelper:
11     default: tgtadm
12     description: The iSCSI helper to use with cinder.
13     type: string
14   CinderLVMLoopDeviceSize:
15     default: 5000
16     description: The size of the loopback file used by the cinder LVM driver.
17     type: number
18   CinderPassword:
19     default: unset
20     description: The password for the cinder service account, used by cinder-api.
21     hidden: true
22     type: string
23   ControllerIP:
24     default: ''
25     type: string
26   ExtraConfig:
27     default: {}
28     description: |
29       Additional configuration to inject into the cluster. The JSON should have
30       the following structure:
31         {"FILEKEY":
32           {"config":
33             [{"section": "SECTIONNAME",
34               "values":
35                 [{"option": "OPTIONNAME",
36                   "value": "VALUENAME"
37                  }
38                 ]
39              }
40             ]
41           }
42         }
43       For instance:
44         {"nova":
45           {"config":
46             [{"section": "default",
47               "values":
48                 [{"option": "force_config_drive",
49                   "value": "always"
50                  }
51                 ]
52              },
53              {"section": "cells",
54               "values":
55                 [{"option": "driver",
56                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
57                  }
58                 ]
59              }
60             ]
61           }
62         }
63     type: json
64   Flavor:
65     default: baremetal
66     description: Flavor for block storage nodes to request when deploying.
67     type: string
68   GlancePort:
69     default: "9292"
70     description: Glance port.
71     type: string
72   KeyName:
73     default: default
74     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
75     type: string
76   NeutronEnableTunnelling:
77     default: "True"
78     type: string
79   NeutronNetworkType:
80     default: gre
81     type: string
82   NeutronPassword:
83     default: ''
84     type: string
85   NeutronPublicInterface:
86     default: eth0
87     type: string
88   RabbitPassword:
89     default: ''
90     type: string
91   RabbitUserName:
92     default: ''
93     type: string
94   SnmpdReadonlyUserName:
95     default: ro_snmp_user
96     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
97     type: string
98   SnmpdReadonlyUserPassword:
99     default: unset
100     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
101     type: string
102     hidden: true
103
104 resources:
105   BlockStorage:
106     type: OS::Nova::Server
107     properties:
108       image:
109         {get_param: Image}
110       flavor: {get_param: Flavor}
111       key_name: {get_param: KeyName}
112       user_data_format: SOFTWARE_CONFIG
113       networks:
114         - network: ctlplane
115   BlockStorageDeployment:
116     type: OS::Heat::StructuredDeployment
117     properties:
118       server: {get_resource: BlockStorage}
119       config: {get_resource: BlockStorageConfig}
120       input_values:
121         controller_host: {get_param: ControllerIP}
122         cinder_dsn: {list_join: ['', ['mysql://cinder:unset@', {get_param: ControllerIP} , '/cinder']]}
123         neutron_local_ip: {get_attr: [BlockStorage , networks, ctlplane, 0]}
124         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
125         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
126       signal_transport: NO_SIGNAL
127   BlockStorageConfig:
128     type: OS::Heat::StructuredConfig
129     properties:
130       group: os-apply-config
131       config:
132         admin-password: {get_param: AdminPassword}
133         keystone:
134           host: {get_input: controller_host}
135         cinder:
136           db: {get_input: cinder_dsn}
137           volume_size_mb:
138             get_param: CinderLVMLoopDeviceSize
139           service-password:
140             get_param: CinderPassword
141           iscsi-helper:
142             get_param: CinderISCSIHelper
143         snmpd:
144           export_MIB: UCD-SNMP-MIB
145           readonly_user_name: {get_input: snmpd_readonly_user_name}
146           readonly_user_password: {get_input: snmpd_readonly_user_password}
147         rabbit:
148           host: {get_input: controller_host}
149           username: {get_param: RabbitUserName}
150           password: {get_param: RabbitPassword}
151         glance:
152           host: {get_input: controller_host}
153           port: {get_param: GlancePort}
154         interfaces:
155           control: {get_param: NeutronPublicInterface}
156         neutron:
157           ovs:
158             local_ip: {get_input: neutron_local_ip}
159             tenant_network_type: {get_param: NeutronNetworkType}
160             enable_tunneling: {get_param: NeutronEnableTunnelling}
161           service-password:
162             get_param: NeutronPassword
163         config:
164           keystone:
165             host: {get_input: controller_host}
166           cinder:
167             db: {get_input: cinder_dsn}
168             volume_size_mb:
169               get_param: CinderLVMLoopDeviceSize
170             service-password:
171               get_param: CinderPassword
172             iscsi-helper:
173               get_param: CinderISCSIHelper
174           admin-password: {get_param: AdminPassword}
175           rabbit:
176             host: {get_input: controller_host}
177             username: {get_param: RabbitUserName}
178             password: {get_param: RabbitPassword}
179           interfaces:
180             control: {get_param: NeutronPublicInterface}
181           neutron:
182             ovs:
183               local_ip: { get_input: neutron_local_ip }
184               tenant_network_type: {get_param: NeutronNetworkType}
185               enable_tunneling: {get_param: NeutronEnableTunnelling}
186             service-password:
187               get_param: NeutronPassword
188 outputs:
189   hosts_entry:
190     value:
191       str_replace:
192         template: "IP HOST HOST.novalocal"
193         params:
194           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
195           HOST: {get_attr: [BlockStorage, name]}