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.
85 type: OS::Nova::Server
87 image: {get_param: Image}
88 flavor: {get_param: Flavor}
89 key_name: {get_param: KeyName}
92 user_data_format: SOFTWARE_CONFIG
93 user_data: {get_resource: UserData}
94 name: {get_param: Hostname}
96 # Combine the NodeAdminUserData and NodeUserData mime archives
98 type: OS::Heat::MultipartMime
101 - config: {get_resource: NodeAdminUserData}
103 - config: {get_resource: NodeUserData}
106 # Creates the "heat-admin" user if configured via the environment
107 # Should return a OS::Heat::MultipartMime reference via OS::stack_id
109 type: OS::TripleO::NodeAdminUserData
111 # For optional operator additional userdata
112 # Should return a OS::Heat::MultipartMime reference via OS::stack_id
114 type: OS::TripleO::NodeUserData
117 type: OS::TripleO::SwiftStorage::Ports::InternalApiPort
119 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
122 type: OS::TripleO::SwiftStorage::Ports::StoragePort
124 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
127 type: OS::TripleO::SwiftStorage::Ports::StorageMgmtPort
129 ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
132 type: OS::TripleO::ObjectStorage::Net::SoftwareConfig
134 ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
135 InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
136 StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
137 StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
140 type: OS::TripleO::Network::Ports::NetIpMap
142 ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
143 InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
144 StorageIp: {get_attr: [StoragePort, ip_address]}
145 StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
148 type: OS::TripleO::SoftwareDeployment
150 config: {get_resource: NetworkConfig}
151 server: {get_resource: SwiftStorage}
153 SwiftStorageHieraConfig:
154 type: OS::Heat::StructuredConfig
156 group: os-apply-config
161 - heat_config_%{::deploy_config_name}
165 - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
166 - all_nodes # provided by allNodesConfig
171 raw_data: {get_file: hieradata/common.yaml}
173 mapped_data: {get_param: ObjectStorageExtraConfig}
175 mapped_data: {get_param: ExtraConfig}
177 raw_data: {get_file: hieradata/object.yaml}
178 mapped_data: # data supplied directly to this deployment configuration, etc
179 swift::swift_hash_suffix: { get_input: swift_hash_suffix }
180 tripleo::ringbuilder::part_power: { get_input: swift_part_power }
181 tripleo::ringbuilder::replicas: {get_input: swift_replicas }
183 swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
184 swift_mount_check: {get_input: swift_mount_check }
185 tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours }
186 ntp::servers: {get_input: ntp_servers}
187 # NOTE(dprince): build_ring support is currently not wired in.
188 # See: https://review.openstack.org/#/c/109225/
189 tripleo::ringbuilder::build_ring: True
190 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
191 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
192 tripleo::packages::enable_install: {get_input: enable_package_install}
193 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
196 SwiftStorageHieraDeploy:
197 type: OS::Heat::StructuredDeployment
198 depends_on: NetworkDeployment
200 server: {get_resource: SwiftStorage}
201 config: {get_resource: SwiftStorageHieraConfig}
203 local_ip: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
204 snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
205 snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
206 swift_hash_suffix: {get_param: HashSuffix}
207 swift_mount_check: {get_param: MountCheck}
208 swift_min_part_hours: {get_param: MinPartHours}
209 swift_part_power: {get_param: PartPower}
210 swift_replicas: { get_param: Replicas}
211 ntp_servers: {get_param: NtpServer}
212 enable_package_install: {get_param: EnablePackageInstall}
213 enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
214 swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
216 # Hook for site-specific additional pre-deployment config,
217 # applying to all nodes, e.g node registration/unregistration
219 depends_on: SwiftStorageHieraDeploy
220 type: OS::TripleO::NodeExtraConfig
222 server: {get_resource: SwiftStorage}
225 type: OS::TripleO::Tasks::PackageUpdate
228 type: OS::Heat::SoftwareDeployment
230 config: {get_resource: UpdateConfig}
231 server: {get_resource: SwiftStorage}
234 get_param: UpdateIdentifier
240 template: "IP HOST.localdomain HOST"
242 IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ObjectStorageHostnameResolveNetwork]}]}
243 HOST: {get_attr: [SwiftStorage, name]}
244 nova_server_resource:
245 description: Heat resource handle for the swift storage server
247 {get_resource: SwiftStorage}
249 description: Swift device formatted for swift-ring-builder
252 template: 'r1z1-IP:%PORT%/d1'
254 IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
255 internal_api_ip_address:
256 description: IP address of the server in the internal_api network
257 value: {get_attr: [InternalApiPort, ip_address]}
259 description: IP address of the server in the storage network
260 value: {get_attr: [StoragePort, ip_address]}
261 storage_mgmt_ip_address:
262 description: IP address of the server in the storage_mgmt network
263 value: {get_attr: [StorageMgmtPort, ip_address]}
265 description: identifier which changes if the node configuration may need re-applying
269 - - {get_attr: [SwiftStorageHieraDeploy, deploy_stdout]}
270 - {get_param: UpdateIdentifier}