Skip to content

Instantly share code, notes, and snippets.

@pratikmallya
Last active September 1, 2015 11:02
Show Gist options
  • Save pratikmallya/5232cd4547a2fcecb1c8 to your computer and use it in GitHub Desktop.
Save pratikmallya/5232cd4547a2fcecb1c8 to your computer and use it in GitHub Desktop.
heat_template_version: 2013-05-23
parameters:
count:
type: number
default: 4
description: number of servers
resources:
rg:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: count}
resource_def:
type:
get_file:
'https://gist.githubusercontent.com/pratikmallya/41bf51caa8b0d6b7acae/raw/81b9ed6feb8e1e203ec9b698502820727fc7e7af/gistfile1.txt'
load_balancer:
type: Rackspace::Cloud::LoadBalancer
properties:
port: 80
protocol: HTTP
algorithm: "ROUND_ROBIN"
virtualIps:
- type: PUBLIC
ipVersion: IPV4
nodes:
- addresses: { get_attr: [rg, server_public_ip] }
port: 80
condition: ENABLED
healthMonitor:
attemptsBeforeDeactivation: 3
delay: 1
timeout: 30
type: HTTP
path: "/"
statusRegex: "."
bodyRegex: "."
outputs:
service_ip:
description: IP of the service
value: { get_attr: [load_balancer, PublicIp] }
node_ips:
description: Node Service IPs
value: { get_attr: [rg, server_public_ip] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment