Last active
August 29, 2015 14:24
-
-
Save pratikmallya/5a02d89653ae35b2667f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2014-10-16 | |
description: | | |
Single node linux server with swift signaling. | |
resources: | |
signal_handle: | |
type: "OS::Heat::SwiftSignalHandle" | |
linux_server: | |
type: OS::Nova::Server | |
properties: | |
image: 4b14a92e-84c8-4770-9245-91ecb8501cc2 | |
flavor: 1 GB Performance | |
user_data: | |
str_replace: | |
template: | | |
#!/bin/bash -x | |
# assume you are doing a long running operation here | |
sleep 10 | |
# Assuming long running operation completed successfully, notify success signal | |
wc_notify --data-binary '{"status": "SUCCESS"}' | |
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