Skip to content

Instantly share code, notes, and snippets.

heat_template_version: 2014-10-16
parameters:
flavor:
type: string
description: Flavor for the server to be created
default: 4353
hidden: true
resources:
test_server:
type: "OS::Nova::Server"
heat_template_version: 2014-10-16
parameters:
param_string:
type: string
description: Flavor for the server to be created
default: 4353
hidden: true
param_number:
type: number
description: Flavor for the server to be created
1. Two space soft indents (fake tabs) OR tabs... BUT NEVER BOTH - DO NOT MIX
2. Whitespace, Parens, Braces, Linebreaks
if/else/for/while/try always have spaces, braces and multiple lines.
--------------------------------------------------------------------
@pratikmallya
pratikmallya / bytesFilter.coffee
Last active August 29, 2015 14:02 — forked from thomseddon/gist:3511330
CoffeeScript Bytes Formatter
app.filter 'displayBytes', () ->
return (bytes, precision) ->
if isNaN(parseFloat(bytes)) || !isFinite(bytes))
return '-'
if typeof precision == 'undefined'
precision = 1
units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB']
number = Math.floor(Math.log(bytes) / Math.log(1024))
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
heat_template_version: '2013-05-23'
outputs:
public_ip:
description: public IP address of the deployed compute instance
value:
get_attr: [compute_instance, accessIPv4]
parameters:
count: {default: 1, type: number}
flavor: {default: 512MB Standard Instance, type: string}
image: {default: 7fd88211-ce43-41bf-9a85-e73df4066581, type: string}
heat_template_version: 2013-05-23
resources:
rg:
type: OS::Heat::ResourceGroup
properties:
count: 5
resource_def: {type: "https://gist.githubusercontent.com/pratikmallya/b6be647475a5f0aa2172/raw/bfa4eb693b7259275b835eb3c7e9590cf2aeae73/server_with_volume.yaml"}
load_balancer:
heat_template_version: 2013-05-23
resources:
volume:
type: OS::Cinder::Volume
properties:
size: 75
volume_attachment:
type: OS::Cinder::VolumeAttachment
heat_template_version: 2013-05-23
description: |
This is a Heat template to deploy a single Linux server running Drupal.
parameter_groups:
- label: Server Settings
parameters:
- image
heat_template_version: 2014-10-16
description: |
A template which demonstrates doing boot-time installation of the required
files for script based software deployments.
This template expects to be created with an environment which defines
the resource type Heat::InstallConfigAgent such as
../boot-config/fedora_pip_env.yaml
resources: