1 heat_template_version: 2015-04-30
2 description: 'OpenStack swift storage node configured by Puppet'
5 description: Flavor for Swift storage nodes to request when deploying.
8 - custom_constraint: nova.flavor
11 description: A random string to be used as a salt when hashing to determine mappings
16 default: overcloud-swift-storage
20 description: Name of an existing EC2 KeyPair to enable SSH access to the instances
24 description: Value of mount_check in Swift account/container/object -server.conf
29 description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
32 description: Partition Power to use when building Swift rings
37 description: How many replicas to use in the swift rings.
38 SnmpdReadonlyUserName:
40 description: The user name for SNMPd with readonly rights running on all Overcloud nodes
42 SnmpdReadonlyUserPassword:
44 description: The user password for SNMPd with readonly rights running on all Overcloud nodes
49 description: Comma-separated list of ntp servers
50 type: comma_delimited_list
53 description: Set to true to enable package installation via Puppet
59 Setting to a previously unused value during stack-update will trigger
60 package update on all nodes
63 description: Mapping of service_name -> network name. Typically set
64 via parameter_defaults in the resource registry.
68 default: '' # Defaults to Heat created hostname
72 Additional hiera configuration to inject into the cluster. Note
73 that ObjectStorageExtraConfig takes precedence over ExtraConfig.
75 ObjectStorageExtraConfig:
78 Role specific additional hiera configuration to inject into the cluster.
80 NetworkDeploymentActions:
81 type: comma_delimited_list
83 Heat action when to apply network configuration changes
89 The DNS domain used for the hosts. This should match the dhcp_domain
90 configured in the Undercloud neutron. Defaults to localdomain.
94 Extra properties or metadata passed to Nova for the created nodes in
95 the overcloud. It's accessible via the Nova metadata API.
102 type: OS::Nova::Server
104 image: {get_param: Image}
105 flavor: {get_param: Flavor}
106 key_name: {get_param: KeyName}
109 user_data_format: SOFTWARE_CONFIG
110 user_data: {get_resource: UserData}
111 name: {get_param: Hostname}
112 metadata: {get_param: ServerMetadata}
114 # Combine the NodeAdminUserData and NodeUserData mime archives
116 type: OS::Heat::MultipartMime
119 - config: {get_resource: NodeAdminUserData}
121 - config: {get_resource: NodeUserData}
124 # Creates the "heat-admin" user if configured via the environment
125 # Should return a OS::Heat::MultipartMime reference via OS::stack_id
127 type: OS::TripleO::NodeAdminUserData
129 # For optional operator additional userdata
130 # Should return a OS::Heat::MultipartMime reference via OS::stack_id
132 type: OS::TripleO::NodeUserData
135 type: OS::TripleO::SwiftStorage::Ports::InternalApiPort
137 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
140 type: OS::TripleO::SwiftStorage::Ports::StoragePort
142 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
145 type: OS::TripleO::SwiftStorage::Ports::StorageMgmtPort
147 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
150 type: OS::TripleO::ObjectStorage::Net::SoftwareConfig
152 ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
153 InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
154 StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
155 StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
158 type: OS::TripleO::Network::Ports::NetIpMap
160 ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
161 InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
162 StorageIp: {get_attr: [StoragePort, ip_address]}
163 StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
166 type: OS::TripleO::SoftwareDeployment
168 config: {get_resource: NetworkConfig}
169 server: {get_resource: SwiftStorage}
170 actions: {get_param: NetworkDeploymentActions}
172 SwiftStorageHieraConfig:
173 type: OS::Heat::StructuredConfig
175 group: os-apply-config
180 - heat_config_%{::deploy_config_name}
184 - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
185 - all_nodes # provided by allNodesConfig
190 raw_data: {get_file: hieradata/common.yaml}
192 mapped_data: {get_param: ObjectStorageExtraConfig}
194 mapped_data: {get_param: ExtraConfig}
196 raw_data: {get_file: hieradata/object.yaml}
197 mapped_data: # data supplied directly to this deployment configuration, etc
198 swift::swift_hash_suffix: { get_input: swift_hash_suffix }
199 tripleo::ringbuilder::part_power: { get_input: swift_part_power }
200 tripleo::ringbuilder::replicas: {get_input: swift_replicas }
202 swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
203 swift_mount_check: {get_input: swift_mount_check }
204 tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours }
205 ntp::servers: {get_input: ntp_servers}
206 # NOTE(dprince): build_ring support is currently not wired in.
207 # See: https://review.openstack.org/#/c/109225/
208 tripleo::ringbuilder::build_ring: True
209 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
210 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
211 tripleo::packages::enable_install: {get_input: enable_package_install}
212 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
215 SwiftStorageHieraDeploy:
216 type: OS::Heat::StructuredDeployment
217 depends_on: NetworkDeployment
219 server: {get_resource: SwiftStorage}
220 config: {get_resource: SwiftStorageHieraConfig}
222 local_ip: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
223 snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
224 snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
225 swift_hash_suffix: {get_param: HashSuffix}
226 swift_mount_check: {get_param: MountCheck}
227 swift_min_part_hours: {get_param: MinPartHours}
228 swift_part_power: {get_param: PartPower}
229 swift_replicas: { get_param: Replicas}
230 ntp_servers: {get_param: NtpServer}
231 enable_package_install: {get_param: EnablePackageInstall}
232 enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
233 swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
235 # Resource for site-specific injection of root certificate
237 depends_on: SwiftStorageHieraDeploy
238 type: OS::TripleO::NodeTLSCAData
240 server: {get_resource: SwiftStorage}
242 # Hook for site-specific additional pre-deployment config,
243 # applying to all nodes, e.g node registration/unregistration
245 depends_on: NodeTLSCAData
246 type: OS::TripleO::NodeExtraConfig
248 server: {get_resource: SwiftStorage}
251 type: OS::TripleO::Tasks::PackageUpdate
254 type: OS::Heat::SoftwareDeployment
256 config: {get_resource: UpdateConfig}
257 server: {get_resource: SwiftStorage}
260 get_param: UpdateIdentifier
266 template: "IP HOST.DOMAIN HOST"
268 IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ObjectStorageHostnameResolveNetwork]}]}
269 DOMAIN: {get_param: CloudDomain}
270 HOST: {get_attr: [SwiftStorage, name]}
271 nova_server_resource:
272 description: Heat resource handle for the swift storage server
274 {get_resource: SwiftStorage}
276 description: Swift device formatted for swift-ring-builder
279 template: 'r1z1-IP:%PORT%/d1'
281 IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
282 internal_api_ip_address:
283 description: IP address of the server in the internal_api network
284 value: {get_attr: [InternalApiPort, ip_address]}
286 description: IP address of the server in the storage network
287 value: {get_attr: [StoragePort, ip_address]}
288 storage_mgmt_ip_address:
289 description: IP address of the server in the storage_mgmt network
290 value: {get_attr: [StorageMgmtPort, ip_address]}
292 description: identifier which changes if the node configuration may need re-applying
296 - - {get_attr: [SwiftStorageHieraDeploy, deploy_stdout]}
297 - {get_attr: [NodeTLSCAData, deploy_stdout]}
298 - {get_param: UpdateIdentifier}