Skip to content

Instantly share code, notes, and snippets.

@pratikmallya
Created September 1, 2015 18:29
Show Gist options
  • Save pratikmallya/978d1f6d41de1b72038c to your computer and use it in GitHub Desktop.
Save pratikmallya/978d1f6d41de1b72038c to your computer and use it in GitHub Desktop.
heat_template_version: 2014-10-16
description: |
Single node linux server with swift signaling.
resources:
signal_handle:
type: "OS::Heat::SwiftSignalHandle"
linux_server:
type:
get_file: https://gist.githubusercontent.com/pratikmallya/47cf721ecf0822555990/raw/869107a0084c528e50bed449a520a650d14fb2a0/gistfile1.txt
properties:
image: Debian 7 (Wheezy) (PVHVM)
flavor: 1 GB Performance
user_data:
str_replace:
template: |
#!/bin/bash -x
# assume you are doing a long running operation here
sleep 300
params:
wc_notify: { get_attr: ['signal_handle', 'curl_cli'] }
wait_on_server:
type: OS::Heat::SwiftSignal
properties:
handle: {get_resource: signal_handle}
count: 1
timeout: 600
outputs:
signal_url:
value: { get_attr: ['signal_handle', 'curl_cli'] }
description: Swift signal URL
server_public_ip:
value: { get_attr: [ linux_server, accessIPv4 ] }
description: Linux server public IP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment