Merge "Use 'public' instead of 'nova' as default floating pool name"
[apex-tripleo-heat-templates.git] / cinder-storage.yaml
1 heat_template_version: 2015-04-30
2 description: 'Common Block Storage Configuration'
3 parameters:
4   Image:
5     default: overcloud-cinder-volume
6     type: string
7   CinderEnableIscsiBackend:
8     default: true
9     description: Whether to enable or not the Iscsi backend for Cinder
10     type: boolean
11   CinderISCSIHelper:
12     default: tgtadm
13     description: The iSCSI helper to use with cinder.
14     type: string
15   CinderLVMLoopDeviceSize:
16     default: 5000
17     description: The size of the loopback file used by the cinder LVM driver.
18     type: number
19   CinderPassword:
20     default: unset
21     description: The password for the cinder service and db account, used by cinder-api.
22     type: string
23     hidden: true
24   VirtualIP:
25     default: ''
26     type: string
27   ExtraConfig:
28     default: {}
29     description: |
30       Additional configuration to inject into the cluster. The JSON should have
31       the following structure:
32         {"FILEKEY":
33           {"config":
34             [{"section": "SECTIONNAME",
35               "values":
36                 [{"option": "OPTIONNAME",
37                   "value": "VALUENAME"
38                  }
39                 ]
40              }
41             ]
42           }
43         }
44       For instance:
45         {"nova":
46           {"config":
47             [{"section": "default",
48               "values":
49                 [{"option": "force_config_drive",
50                   "value": "always"
51                  }
52                 ]
53              },
54              {"section": "cells",
55               "values":
56                 [{"option": "driver",
57                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
58                  }
59                 ]
60              }
61             ]
62           }
63         }
64     type: json
65   BlockStorageExtraConfig:
66     default: {}
67     description: |
68       Role specific additional configuration to inject into the cluster.
69     type: json
70   Flavor:
71     description: Flavor for block storage nodes to request when deploying.
72     type: string
73     constraints:
74       - custom_constraint: nova.flavor
75   GlancePort:
76     default: "9292"
77     description: Glance port.
78     type: string
79   GlanceProtocol:
80     default: http
81     description: Protocol to use when connecting to glance, set to https for SSL.
82     type: string
83   KeyName:
84     default: default
85     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
86     type: string
87   RabbitPassword:
88     default: 'guest'
89     type: string
90   RabbitUserName:
91     default: 'guest'
92     type: string
93   RabbitClientUseSSL:
94     default: false
95     description: >
96         Rabbit client subscriber parameter to specify
97         an SSL connection to the RabbitMQ host.
98     type: string
99   RabbitClientPort:
100     default: 5672
101     description: Set rabbit subscriber port, change this if using SSL
102     type: number
103   SnmpdReadonlyUserName:
104     default: ro_snmp_user
105     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
106     type: string
107   SnmpdReadonlyUserPassword:
108     default: unset
109     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
110     type: string
111     hidden: true
112   UpdateIdentifier:
113     default: ''
114     type: string
115     description: >
116       Setting to a previously unused value during stack-update will trigger
117       package update on all nodes
118   Hostname:
119     type: string
120     default: '' # Defaults to Heat created hostname
121   ServiceNetMap:
122     default: {}
123     description: Mapping of service_name -> network name. Typically set
124                  via parameter_defaults in the resource registry.
125     type: json
126   GlanceApiVirtualIP:
127     type: string
128     default: ''
129   MysqlVirtualIP:
130     type: string
131     default: ''
132
133 resources:
134   BlockStorage:
135     type: OS::Nova::Server
136     properties:
137       image:
138         {get_param: Image}
139       flavor: {get_param: Flavor}
140       key_name: {get_param: KeyName}
141       networks:
142         - network: ctlplane
143       user_data_format: SOFTWARE_CONFIG
144       user_data: {get_resource: NodeUserData}
145       name: {get_param: Hostname}
146
147   NodeUserData:
148     type: OS::TripleO::NodeUserData
149
150   InternalApiPort:
151     type: OS::TripleO::BlockStorage::Ports::InternalApiPort
152     properties:
153       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
154
155   StoragePort:
156     type: OS::TripleO::BlockStorage::Ports::StoragePort
157     properties:
158       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
159
160   StorageMgmtPort:
161     type: OS::TripleO::BlockStorage::Ports::StorageMgmtPort
162     properties:
163       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
164
165   NetworkConfig:
166     type: OS::TripleO::BlockStorage::Net::SoftwareConfig
167     properties:
168       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
169       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
170       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
171
172   NetworkDeployment:
173     type: OS::TripleO::SoftwareDeployment
174     properties:
175       config: {get_resource: NetworkConfig}
176       server: {get_resource: BlockStorage}
177
178   BlockStorageDeployment:
179     type: OS::Heat::StructuredDeployment
180     properties:
181       server: {get_resource: BlockStorage}
182       config: {get_resource: BlockStorageConfig}
183       input_values:
184         controller_virtual_ip: {get_param: VirtualIP}
185         cinder_dsn: {list_join: ['', ['mysql://cinder:', {get_param: CinderPassword}, '@', {get_param: VirtualIP} , '/cinder']]}
186         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
187         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
188       signal_transport: NO_SIGNAL
189   BlockStorageConfig:
190     type: OS::Heat::StructuredConfig
191     properties:
192       group: os-apply-config
193       config:
194         keystone:
195           host: {get_input: controller_virtual_ip}
196         cinder:
197           db: {get_input: cinder_dsn}
198           volume_size_mb:
199             get_param: CinderLVMLoopDeviceSize
200           iscsi-helper:
201             get_param: CinderISCSIHelper
202         snmpd:
203           export_MIB: UCD-SNMP-MIB
204           readonly_user_name: {get_input: snmpd_readonly_user_name}
205           readonly_user_password: {get_input: snmpd_readonly_user_password}
206         rabbit:
207           host: {get_input: controller_virtual_ip}
208           username: {get_param: RabbitUserName}
209           password: {get_param: RabbitPassword}
210         glance:
211           host: {get_input: controller_virtual_ip}
212           port: {get_param: GlancePort}
213 outputs:
214   hosts_entry:
215     value:
216       str_replace:
217         template: "IP HOST"
218         params:
219           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
220           HOST: {get_attr: [BlockStorage, name]}
221   internal_api_ip_address:
222     description: IP address of the server in the internal_api network
223     value: {get_attr: [InternalApiPort, ip_address]}
224   storage_ip_address:
225     description: IP address of the server in the storage network
226     value: {get_attr: [StoragePort, ip_address]}
227   storage_mgmt_ip_address:
228     description: IP address of the server in the storage_mgmt network
229     value: {get_attr: [StorageMgmtPort, ip_address]}
230   config_identifier:
231     description: identifier which changes if the node configuration may need re-applying
232     value: "None - NO_SIGNAL"