Schema Reference

Tuono Schema

Schema Reference

Overview

The Tuono Schema defines the infrastructure resources you can describe in blueprints.

Content Types

The Tuono Schema defines a number of content types for different properties.

boolean

The value of a boolean can be true or false.

certificate

This property expects an OpenSSH certificate beginning with the text, -----BEGIN CERTIFICATE-----.

cidr

An IP address block typically used in subnetting and firewall rules.

The general format of a CIDR is an IP address followed by a slash, then a mask (number) representing how many "bits" are relevant in the IP address. This is true for both IPv4 and IPv6 addresses. We recommend you use a CIDR Calculator to assist you with choosing the correct CIDR.

10.0.0.0/16 is an IPv4 CIDR with 65,536 addresses 10.0.0.0 through 10.0.255.255.

10.0.100.224/27 is an IPv4 CIDR with 32 addresses 10.0.100.224 through 10.0.100.255.

2001:db8:1234:1a00::/64 is an IPv6 CIDR with 18,446,744,073,709,551,616 addresses from 2001:db8:1234:1a00:0000:0000:0000:0000 through 2001:db8:1234:1a00:ffff:ffff:ffff:ffff.

dict

A property of type dict means the contents within are indented and structured similarly to the rest of the schema. When a property is a dict the allowed keys and values are specified in the schema documentation. In the example below, default_policy is a dict property:

networking:
network:
my-network:
default_policy:
inbound: false
outbound: true
range: 10.0.0.0/16

integer

This is a whole number (a number without fractions). Some properties have minimum and maximum limits on integers.

iso8601

This is a globally accepted time format based on international standards:

YYYY-MM-DDTHH:MM:SSZ
YYYY = year (4 digit)
MM = month (2 digit, 01-12)
DD = day of month (2 digit, 01-31)
HH = hour (2 digit, 00-23)
MM = minute (2 digit, 00-59)
SS = second (2 digit, 00-59)

ip

This is an IPv4 or IPv6 address.

list

An ordered sequence of one or more items, each of which will have a specific type. For example, you may have a list of cidr for a network range:

networking:
network:
my-network:
range:
- 10.0.0.0/16
- 10.0.100.0/16

In this case the network range is expressed as a list. In the previous example the range is expressed as a string. For this property, the schema will accept either.

mac

This is an IEEE EUI-48 standard MAC Address that has the form XX:XX:XX:XX:XX:XX or XX-XX-XX-XX-XX-XX where X is a hexadecimal. There's a very good chance you will never need to know the discovered MAC address for a NIC.

port_range

A single port number or range range of port numbers within 1-65535 is allowed.

private_key

This property expects an OpenSSH private key beginning with the text, -----BEGIN RSA PRIVATE KEY-----.

ref

A reference to another resource in the environment. For example in the following example, the location.folder.myapp.region property is a ref to location.region.preferred:

location:
region:
preferred:
country: USA
area: northwest
folder:
myapp:
region: preferred

If the ref type is a single class, simply using the name is allowed (as shown). For ref types that accept more than one type, for example the depends_on property, you must use the fully-qualified blueprint name.

size

A representation of a size, either memory or storage. It can be expressed in a variety of ways. Both the traditional binary or decimal forms are rounded to the values that the venues use, which is the binary system. In other words, although 1 MB is equal to 1,000,000 bytes, it will be interpreted as 1 MiB which is 1,048,576 bytes.

The following all equate to one tebibyte (102441024^4) or 1 TiB. Those of us who have been in the industry long enough may recognize this as a "terabyte".

1tb
1Tb
1TB
1 tb
1 Tb
1 TB
1tib
1Tib
1TiB
1 tib
1 Tib

string

A text string, for example description is a string:

variables:
cores:
description: The number of cores.

It is not normally necessary to quote a text string unless a special character is used at the beginning of the string. For example if a string begins with a hyphen the interpreter would consider it a list, so it must be quoted:

variables:
cores:
description: "- The number of cores -"

Longer strings require YAML syntax called "block scalars". It sounds scary, but it's pretty easy to remember once you have used them a few times. We recommend that anything that cannot fit on a line, like a SSH Public Key, be turned into a variable, since it is easier to paste a variable into the portal than to write it into a blueprint. Plus, making it a variable makes the blueprint more reusable.

If you need to insert a long string, you can use the folded block scalar to convert line breaks in the indented block into spaces:

variables:
cores:
description: >-
This is the number of cores to assign to each virtual machine
instance in the blueprint.

The description then turns into:

"This is the number of cores to assign to each virtual machine in the blueprint."

If you use |- instead of >- then the line breaks are kept in the string. If you omit the - then the final line break will also be kept.

We have found the YAML Multiline site to be quite helpful in choosing the right block scalar to use.

throughput

Throughput is expressed just like size, but is done so over time, so it becomes a rate of transfer. For example, 40 MiB/s is 40 mebibytes (most of us say megabytes) per second.

url

This is a uniform resource locator, which looks like string in the address bar at the top of your browser.

uuid

This is a universally unique identifier, also sometimes referred to as a GUID.