neutron: enable nova-event-callback by default
[apex-tripleo-heat-templates.git] / os-apply-config / 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     hidden: true
91   RabbitUserName:
92     default: 'guest'
93     type: string
94   RabbitClientUseSSL:
95     default: false
96     description: >
97         Rabbit client subscriber parameter to specify
98         an SSL connection to the RabbitMQ host.
99     type: string
100   RabbitClientPort:
101     default: 5672
102     description: Set rabbit subscriber port, change this if using SSL
103     type: number
104   SnmpdReadonlyUserName:
105     default: ro_snmp_user
106     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
107     type: string
108   SnmpdReadonlyUserPassword:
109     default: unset
110     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
111     type: string
112     hidden: true
113   UpdateIdentifier:
114     default: ''
115     type: string
116     description: >
117       Setting to a previously unused value during stack-update will trigger
118       package update on all nodes
119   Hostname:
120     type: string
121     default: '' # Defaults to Heat created hostname
122   ServiceNetMap:
123     default: {}
124     description: Mapping of service_name -> network name. Typically set
125                  via parameter_defaults in the resource registry.
126     type: json
127   GlanceApiVirtualIP:
128     type: string
129     default: ''
130   MysqlVirtualIP:
131     type: string
132     default: ''
133
134 resources:
135   BlockStorage:
136     type: OS::Nova::Server
137     properties:
138       image:
139         {get_param: Image}
140       flavor: {get_param: Flavor}
141       key_name: {get_param: KeyName}
142       networks:
143         - network: ctlplane
144       user_data_format: SOFTWARE_CONFIG
145       user_data: {get_resource: NodeUserData}
146       name: {get_param: Hostname}
147
148   NodeUserData:
149     type: OS::TripleO::NodeUserData
150
151   InternalApiPort:
152     type: OS::TripleO::BlockStorage::Ports::InternalApiPort
153     properties:
154       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
155
156   StoragePort:
157     type: OS::TripleO::BlockStorage::Ports::StoragePort
158     properties:
159       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
160
161   StorageMgmtPort:
162     type: OS::TripleO::BlockStorage::Ports::StorageMgmtPort
163     properties:
164       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
165
166   NetworkConfig:
167     type: OS::TripleO::BlockStorage::Net::SoftwareConfig
168     properties:
169       ControlPlaneIp: {get_attr: [BlockStorage, networks, ctlplane, 0]}
170       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
171       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
172       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
173
174   NetworkDeployment:
175     type: OS::TripleO::SoftwareDeployment
176     properties:
177       config: {get_resource: NetworkConfig}
178       server: {get_resource: BlockStorage}
179
180   BlockStorageDeployment:
181     type: OS::Heat::StructuredDeployment
182     properties:
183       server: {get_resource: BlockStorage}
184       config: {get_resource: BlockStorageConfig}
185       input_values:
186         controller_virtual_ip: {get_param: VirtualIP}
187         cinder_dsn: {list_join: ['', ['mysql://cinder:', {get_param: CinderPassword}, '@', {get_param: VirtualIP} , '/cinder']]}
188         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
189         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
190       signal_transport: NO_SIGNAL
191   BlockStorageConfig:
192     type: OS::Heat::StructuredConfig
193     properties:
194       group: os-apply-config
195       config:
196         keystone:
197           host: {get_input: controller_virtual_ip}
198         cinder:
199           db: {get_input: cinder_dsn}
200           volume_size_mb:
201             get_param: CinderLVMLoopDeviceSize
202           iscsi-helper:
203             get_param: CinderISCSIHelper
204         snmpd:
205           export_MIB: UCD-SNMP-MIB
206           readonly_user_name: {get_input: snmpd_readonly_user_name}
207           readonly_user_password: {get_input: snmpd_readonly_user_password}
208         rabbit:
209           host: {get_input: controller_virtual_ip}
210           username: {get_param: RabbitUserName}
211           password: {get_param: RabbitPassword}
212         glance:
213           host: {get_input: controller_virtual_ip}
214           port: {get_param: GlancePort}
215 outputs:
216   hosts_entry:
217     value:
218       str_replace:
219         template: "IP HOST"
220         params:
221           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
222           HOST: {get_attr: [BlockStorage, name]}
223   internal_api_ip_address:
224     description: IP address of the server in the internal_api network
225     value: {get_attr: [InternalApiPort, ip_address]}
226   storage_ip_address:
227     description: IP address of the server in the storage network
228     value: {get_attr: [StoragePort, ip_address]}
229   storage_mgmt_ip_address:
230     description: IP address of the server in the storage_mgmt network
231     value: {get_attr: [StorageMgmtPort, ip_address]}
232   config_identifier:
233     description: identifier which changes if the node configuration may need re-applying
234     value: "None - NO_SIGNAL"