Skip to content

Instantly share code, notes, and snippets.

@BeenzSyed
Created December 16, 2014 22:32
Show Gist options
  • Save BeenzSyed/92707306db840d296445 to your computer and use it in GitHub Desktop.
Save BeenzSyed/92707306db840d296445 to your computer and use it in GitHub Desktop.
Solum template with lb
---
heat_template_version: 2013-05-23
parameters:
flavor:
constraints:
-
allowed_values:
- "2 GB Performance"
- "4 GB Performance"
- "8 GB Performance"
- "15 GB Performance"
- "30 GB Performance"
- "2GB Standard Instance"
- "4GB Standard Instance"
- "8GB Standard Instance"
- "15GB Standard Instance"
- "30GB Standard Instance"
description: |
Must be a valid Rackspace Cloud Server flavor for the region you have
selected to deploy into.
default: "4 GB Performance"
type: string
name:
default: CoreOS-stable
description: "Name of each CoreOS machine booted"
type: string
count:
type: number
docker_line:
type: string
default: "docker run -p 80:5000 -d 23.253.106.198:5042/nodeus-1"
resources:
compute_instance:
type: "OS::Nova::Server"
properties:
config_drive: "true"
flavor:
get_param: flavor
image: 7fd88211-ce43-41bf-9a85-e73df4066581
name: "Single Server Stack"
user_data:
str_replace:
params:
count:
get_param: count
docker_line:
get_param: docker_line
template: |
#!/bin/bash -x
# Invoke the container
docker_line
user_data_format: RAW
lb:
type: Rackspace::Cloud::LoadBalancer
properties:
name: LB-Compute Load Balancer
nodes:
- addresses: { get_attr: [compute_instance, networks, accessIPv4, 0] }
port: 80
condition: ENABLED
protocol: HTTPS
port: 80
virtualIps:
- type: PUBLIC
ipVersion: IPV4
outputs:
"Load Balancer IP":
value: { get_attr: [ lb, PublicIp ] }
description: Load Balancer IP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment