1 heat_template_version: 2013-05-23
4 Test template using all resources supported on the Rackspace Public Cloud
11 description: Database access password
16 description: Flavor name for the devops server
17 default: 4 GB Performance
21 - 4GB Standard Instance
25 description: API Servers flavor id
26 default: performance1-1
30 - "3" # 1GB Standard Instance
35 type: OS::Heat::RandomString
40 type: OS::Nova::KeyPair
42 name: { get_resource: random_key_name }
43 save_private_key: true
46 type: OS::Heat::RandomString
49 type: Rackspace::Cloud::Network
55 type: OS::Cinder::Volume
60 image: CentOS 7 (PVHVM)
63 type: OS::Nova::Server
65 name: ksink-BFV-server
66 flavor: 2 GB Performance
67 block_device_mapping: [{volume_id: {get_resource: boot_from_vol_vol}, device_name: vda, delete_on_termination: false}]
70 # type: OS::Neutron::Net
72 # name: ksink-neutron-net
75 # type: OS::Neutron::Subnet
77 # name: ksink-subnet-1
78 # network: { get_resource: neutron_network }
79 # cidr: 192.168.0.0/24
83 # type: OS::Neutron::Port
86 # network: { get_resource: neutron_network }
88 gentoo_server: # Should create as long as there's no user_data
89 type: Rackspace::Cloud::Server
91 flavor: 1 GB Performance
92 image: 26c630fe-ba65-4cd2-ad69-1d808766a54b # Gentoo 14.4
95 type: OS::Nova::Server
97 name: kitchen_sink_ops01
99 rax-heat: { get_param: "OS::stack_id" }
100 image: 042395fc-728c-4763-86f9-9b0cacb00701 #CentOS 6.5
101 flavor: { get_param: devops_flavor }
102 key_name: { get_resource: access_key }
104 - uuid: "00000000-0000-0000-0000-000000000000"
105 - uuid: "11111111-1111-1111-1111-111111111111"
106 - uuid: { get_resource: priv_network }
108 ################################################################
109 #### THIS IS BROKEN ATM: https://jira.rax.io/browse/HEAT-789 ###
110 ################################################################
111 # devops_chefsolo_berkshelf:
112 # type: "OS::Heat::ChefSolo"
113 # depends_on: devops_chefsolo_kitchen_centos
115 # private_key: {get_attr: [access_key, private_key]}
116 # host: {get_attr: [devops_server, accessIPv4]}
117 # chef_version: "11.12.0"
126 # "locked_version": "2.3.8"
134 devops_chefsolo_kitchen_centos:
135 type: "OS::Heat::ChefSolo"
137 private_key: {get_attr: [access_key, private_key]}
138 host: {get_attr: [devops_server, accessIPv4]}
139 kitchen: "https://github.com/heat-ci/heat-templates.git"
144 type: OS::Cinder::Volume
146 name: kitchen_sink_devops_vol
148 rax-heat: { get_param: "OS::stack_id" }
150 description: Created from the kitchen_sink test Heat template
153 type: OS::Cinder::VolumeAttachment
155 instance_uuid: { get_resource: devops_server }
156 volume_id: { get_resource: devops_volume }
159 type: Rackspace::AutoScale::Group
162 name: kitchen_sink_api_asgroup
164 rax-heat: { get_param: "OS::stack_id" }
172 - loadBalancerId: { get_resource: api_loadbalancer }
175 name: kitchen_sink_api
176 flavorRef: { get_param: api_flavor_ref }
177 imageRef: ffd597d6-2cc4-4b43-b8f4-b1006715b84e
178 key_name: { get_resource: access_key }
180 /tmp/testfile: "testfile"
182 - uuid: "11111111-1111-1111-1111-111111111111"
183 - uuid: { get_resource: priv_network }
185 api_servers_no_personality:
186 type: Rackspace::AutoScale::Group
189 name: kitchen_sink_api_asgroup_no_personality
191 rax-heat: { get_param: "OS::stack_id" }
199 - loadBalancerId: { get_resource: api_loadbalancer }
202 name: kitchen_sink_api
203 flavorRef: { get_param: api_flavor_ref }
204 imageRef: df27d481-63a5-40ca-8920-3d132ed643d9
205 key_name: { get_resource: access_key }
207 - uuid: "11111111-1111-1111-1111-111111111111"
208 - uuid: { get_resource: priv_network }
211 type: Rackspace::AutoScale::ScalingPolicy
213 group: { get_resource: api_servers }
214 name: Scale up api servers
219 api_scale_up_webhook:
220 type: Rackspace::AutoScale::WebHook
222 name: triggerApiScaleUp
224 rax-heat: { get_param: "OS::stack_id" }
225 policy: { get_resource: api_scale_up_policy }
227 api_scale_down_policy:
228 type: Rackspace::AutoScale::ScalingPolicy
230 group: { get_resource: api_servers }
231 name: Scale down api servers
236 api_scale_down_webhook:
237 type: Rackspace::AutoScale::WebHook
239 name: triggerApiScaleUp
241 rax-heat: { get_param: "OS::stack_id" }
242 policy: { get_resource: api_scale_down_policy }
245 type: Rackspace::Cloud::LoadBalancer
247 name: kitchen_sink_api_lb
249 rax-heat: { get_param: "OS::stack_id" }
252 algorithm: ROUND_ROBIN
259 type: Rackspace::Cloud::LoadBalancer
261 name: ksink_shared_vip_https
263 rax-heat: { get_param: "OS::stack_id" }
266 algorithm: ROUND_ROBIN
269 - id: { get_attr: [ api_loadbalancer, virtualIps, 0, id ] }
272 type: OS::Heat::SwiftSignal
274 handle: {get_resource: wait_handle}
279 type: OS::Heat::SwiftSignalHandle
282 type: OS::Nova::Server
284 image: 4b14a92e-84c8-4770-9245-91ecb8501cc2 # CentOS
285 flavor: 1 GB Performance
286 key_name: { get_resource: access_key }
288 rax-heat: { get_param: "OS::stack_id" }
289 heat-stack-name: { get_param: "OS::stack_name" }
292 # - uuid: "11111111-1111-1111-1111-111111111111"
293 # - uuid: { get_resource: neutron_network }
294 user_data_format: RAW
299 # Below are some examples of the various ways signals
300 # can be sent to the Handle resource
302 # Simple success signal
303 wc_notify --data-binary '{"status": "SUCCESS"}'
305 # Or you optionally can specify any of the additional fields
306 wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal2"}'
307 wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal3", "data": "data3"}'
308 wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal4", "data": "data4"}'
310 # If you require control of the ID, you can pass it.
311 # The ID should be unique, unless you intend for duplicate
312 # signals to overrite each other. The following two calls
313 # do the exact same thing, and will be treated as one signal
314 # (You can prove this by changing count above to 7)
315 wc_notify --data-binary '{"status": "SUCCESS", "id": "5"}'
316 wc_notify --data-binary '{"status": "SUCCESS", "id": "5"}'
318 # Example of sending a failure signal, optionally
319 # reason, id, and data can be specified as above
320 # wc_notify --data-binary '{"status": "FAILURE"}'
323 wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
326 type: Rackspace::Cloud::DNS
327 depends_on: wait_on_server
331 template: "a%domain%.com"
333 "%domain%": { get_resource: domain_name }
336 template: "admin@{domain}"
340 template: "a%domain%.com"
342 "%domain%": { get_resource: domain_name }
346 template: "a%domain%.com"
348 "%domain%": { get_resource: domain_name }
350 data: { get_attr: [api_loadbalancer, PublicIp] }
353 type: OS::Heat::ResourceGroup
354 depends_on: service_db
358 type: Rackspace::Cloud::Server
360 name: "kitchen_sink_engine_%index%"
361 image: 2936a16d-ee01-452c-a6ab-7117df5196f8 # Ubuntu 13.10 (Saucy Salamander)
362 flavor: { get_param: devops_flavor }
363 key_name: { get_resource: access_key }
365 - uuid: { get_resource: priv_network }
366 - uuid: "00000000-0000-0000-0000-000000000000"
367 - uuid: "11111111-1111-1111-1111-111111111111"
370 echo "hello world" > /root/hello-world.txt
373 type: "Rackspace::Cloud::WinServer"
375 name: wordpress_windows_server
376 flavor: 4GB Standard Instance
377 image: Windows Server 2012
378 #### Commenting out because of memory issues ####
380 # $source = "http://download.microsoft.com/download/7/0/4/704CEB4C-9F42-4962-A2B0-5C84B0682C7A/WebPlatformInstaller_amd64_en-US.msi"
381 # $destination = "webpi.msi"
382 # $wc = New-Object System.Net.WebClient
383 # $wc.DownloadFile($source, $destination)
386 type: OS::Trove::Instance
388 name: kitchen_sink_db
392 - name: kitchen_sink_data
395 password: { get_param: db_pass }
396 databases: [ kitchen_sink_data ]
398 # This needs an image with heat_cfntools on it to use Metadata; basic
399 # test here to make sure we can actually pop the server and do simple
400 # user data and a signal
402 type: AWS::EC2::Instance
404 ImageId: 2936a16d-ee01-452c-a6ab-7117df5196f8 # Ubuntu 13.10 (Saucy Salamander)
405 InstanceType: { get_param: devops_flavor }
406 KeyName: { get_resource: access_key }
412 apt-get -y install curl
414 curl -i -X PUT --data-binary '{"status": "SUCCESS", "reason": "AWS Signal"}' "wc_notify"
416 wc_notify: { get_resource: aws_handle }
419 type: AWS::CloudFormation::WaitConditionHandle
422 type: AWS::CloudFormation::WaitCondition
424 Handle: { get_resource: aws_handle }
428 type: OS::Swift::Container
430 name: { get_resource: random_key_name }
433 type: AWS::ElasticLoadBalancing::LoadBalancer
435 AvailabilityZones: []
440 LoadBalancerPort: 8945,
447 UnhealthyThreshold: 10
452 type: https://raw.githubusercontent.com/heat-ci/heat-templates/master/dev/provider_resource.template
454 flavor: { get_param: devops_flavor }
455 image: 2936a16d-ee01-452c-a6ab-7117df5196f8 # Ubuntu 13.10 (Saucy Salamander)
456 key_name: { get_resource: access_key }
460 "Private Network ID":
461 value: { get_resource: priv_network }
462 description: Private Network ID
465 value: { get_resource: neutron_network }
467 "Wait Condition data":
468 value: { get_attr: [ wait_on_server, data ] }
471 value: { get_attr: [ random_key_name, value ] }
472 description: Random String
474 "Swift Container ID":
475 value: { get_resource: object_store }
476 description: Swift Container ID
479 value: { get_resource: devops_server }
480 description: Dev Ops Server ID
483 value: { get_resource: devops_volume }
484 description: Dev Ops Volume ID
486 "API servers auto scale group ID":
487 value: { get_resource: api_servers }
488 description: API servers auto scale group ID
490 "API servers auto scale group ID":
491 value: { get_resource: api_servers_no_personality }
492 description: API servers auto scale group ID
494 "Scale UP API servers webhook":
495 value: { get_attr: [ api_scale_up_webhook, executeUrl ] }
496 description: Scale UP API servers webhook
498 "Scale DOWN API servers webhook":
499 value: { get_attr: [ api_scale_down_webhook, executeUrl ] }
500 description: Scale DOWN API servers webhook
503 value: { get_resource: api_loadbalancer }
504 description: Load Balancer ID
507 value: { get_attr: [ api_loadbalancer, PublicIp ] }
508 description: Load Balancer IP
511 value: { get_resource: service_domain }
512 description: DNS Domain ID
515 value: { get_attr: [ engine_nodes, refs ] }
516 description: Engine Node IDs
519 value: { get_resource: service_db }
520 description: Database instance ID
522 "Access Private Key":
523 value: { get_attr: [ access_key, private_key ] }
524 description: SSH access private key
527 value: { get_resource: aws_server }
528 description: ID of the AWS::EC2::Instance resource
531 value: { get_attr: [ rs_windows_server, accessIPv4 ] }
532 description: Windows Server IP