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 type: OS::Nova::Server
91 image: {get_param: Image}
92 flavor: {get_param: Flavor}
93 key_name: {get_param: KeyName}
96 user_data_format: SOFTWARE_CONFIG
97 user_data: {get_resource: UserData}
98 name: {get_param: Hostname}
100 # Combine the NodeAdminUserData and NodeUserData mime archives
102 type: OS::Heat::MultipartMime
105 - config: {get_resource: NodeAdminUserData}
107 - config: {get_resource: NodeUserData}
110 # Creates the "heat-admin" user if configured via the environment
111 # Should return a OS::Heat::MultipartMime reference via OS::stack_id
113 type: OS::TripleO::NodeAdminUserData
115 # For optional operator additional userdata
116 # Should return a OS::Heat::MultipartMime reference via OS::stack_id
118 type: OS::TripleO::NodeUserData
121 type: OS::TripleO::SwiftStorage::Ports::InternalApiPort
123 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
126 type: OS::TripleO::SwiftStorage::Ports::StoragePort
128 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
131 type: OS::TripleO::SwiftStorage::Ports::StorageMgmtPort
133 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
136 type: OS::TripleO::ObjectStorage::Net::SoftwareConfig
138 ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
139 InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
140 StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
141 StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
144 type: OS::TripleO::Network::Ports::NetIpMap
146 ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
147 InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
148 StorageIp: {get_attr: [StoragePort, ip_address]}
149 StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
152 type: OS::TripleO::SoftwareDeployment
154 config: {get_resource: NetworkConfig}
155 server: {get_resource: SwiftStorage}
156 actions: {get_param: NetworkDeploymentActions}
158 SwiftStorageHieraConfig:
159 type: OS::Heat::StructuredConfig
161 group: os-apply-config
166 - heat_config_%{::deploy_config_name}
170 - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
171 - all_nodes # provided by allNodesConfig
176 raw_data: {get_file: hieradata/common.yaml}
178 mapped_data: {get_param: ObjectStorageExtraConfig}
180 mapped_data: {get_param: ExtraConfig}
182 raw_data: {get_file: hieradata/object.yaml}
183 mapped_data: # data supplied directly to this deployment configuration, etc
184 swift::swift_hash_suffix: { get_input: swift_hash_suffix }
185 tripleo::ringbuilder::part_power: { get_input: swift_part_power }
186 tripleo::ringbuilder::replicas: {get_input: swift_replicas }
188 swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
189 swift_mount_check: {get_input: swift_mount_check }
190 tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours }
191 ntp::servers: {get_input: ntp_servers}
192 # NOTE(dprince): build_ring support is currently not wired in.
193 # See: https://review.openstack.org/#/c/109225/
194 tripleo::ringbuilder::build_ring: True
195 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
196 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
197 tripleo::packages::enable_install: {get_input: enable_package_install}
198 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
201 SwiftStorageHieraDeploy:
202 type: OS::Heat::StructuredDeployment
203 depends_on: NetworkDeployment
205 server: {get_resource: SwiftStorage}
206 config: {get_resource: SwiftStorageHieraConfig}
208 local_ip: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
209 snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
210 snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
211 swift_hash_suffix: {get_param: HashSuffix}
212 swift_mount_check: {get_param: MountCheck}
213 swift_min_part_hours: {get_param: MinPartHours}
214 swift_part_power: {get_param: PartPower}
215 swift_replicas: { get_param: Replicas}
216 ntp_servers: {get_param: NtpServer}
217 enable_package_install: {get_param: EnablePackageInstall}
218 enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
219 swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
221 # Hook for site-specific additional pre-deployment config,
222 # applying to all nodes, e.g node registration/unregistration
224 depends_on: SwiftStorageHieraDeploy
225 type: OS::TripleO::NodeExtraConfig
227 server: {get_resource: SwiftStorage}
230 type: OS::TripleO::Tasks::PackageUpdate
233 type: OS::Heat::SoftwareDeployment
235 config: {get_resource: UpdateConfig}
236 server: {get_resource: SwiftStorage}
239 get_param: UpdateIdentifier
245 template: "IP HOST.localdomain HOST"
247 IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ObjectStorageHostnameResolveNetwork]}]}
248 HOST: {get_attr: [SwiftStorage, name]}
249 nova_server_resource:
250 description: Heat resource handle for the swift storage server
252 {get_resource: SwiftStorage}
254 description: Swift device formatted for swift-ring-builder
257 template: 'r1z1-IP:%PORT%/d1'
259 IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
260 internal_api_ip_address:
261 description: IP address of the server in the internal_api network
262 value: {get_attr: [InternalApiPort, ip_address]}
264 description: IP address of the server in the storage network
265 value: {get_attr: [StoragePort, ip_address]}
266 storage_mgmt_ip_address:
267 description: IP address of the server in the storage_mgmt network
268 value: {get_attr: [StorageMgmtPort, ip_address]}
270 description: identifier which changes if the node configuration may need re-applying
274 - - {get_attr: [SwiftStorageHieraDeploy, deploy_stdout]}
275 - {get_param: UpdateIdentifier}