GuidesAPI ReferenceChangelogDiscussions
GuidesAPIAPI (old)Log In
Guides
These docs are for v0.8.3. Click to read the latest docs for v0.9.3.

This section explains the detail view for packages

General

1297

The General tab shows the basic information of a package and the provided resources. You can also see the org resources this package claims.

Requirements

2734

The Requirements tab shows all additional requirements a package enforces.

Creation

1150

This lets you create a new package the attributes are the following:

  • Name: name of the package
  • CPU: percentage of a core, (100% means 1 core)
  • Memory: memory in megabyte, for KVM's 1024MB will be added during creation time.
  • Disk: Disk quota, for KVM's the dataset's size will be added as this is provided as a secondary disk for KVM's (usually this is 10GB)
  • IO Priroty (optional): this will be auto-computed based on memory shares (between 0 and 1024), but can be overwritten.
  • Block Size (optional): For KVM the block size of the zvol provided to it.
1165
  • Compression (optional): Compression of the ZFS dataset/volume (won't affect existing data).\
  • Rules (optional): Additional rules that can be set for the package.
1156
  • Org resources: That are claimed from the Org upon creating.

Rules

Rules can access all of the hypervisors information by passing the path to it as a JSON path, an example of the hypervisor object is provided at the end of this section.

{
	"alias": "dev01",
	"characteristics": {
    "cold-aisle-containment":  "yes",
    "cpu-cores": 6,
    "colocation-cabinet": "16D",
    "disk-drives-in-pool":  10
  },
	"etherstubs": [],
	"host": "192.168.221.101",
	"last_seen": 1454961452,
	"metadata": {},
	"networks": ["admin", "external", "fifo"],
	"path": [{
		"cost": 1,
		"name": "0d9aa97d-806b-4e1e-b4dc-c4f9502004d3"
	}],
	"pools": {
		"zones": {
			"dedup": 100,
			"free": 2241547,
			"health": "ONLINE",
			"size": 2273280,
			"used": 31733
		}
	},
	"port": 4200,
	"resources": {
		"free-memory": 24541.0,
		"l1hits": 234074094,
		"l1miss": 11119753,
		"l1size": 3095,
		"l2hits": 0,
		"l2miss": 0,
		"l2size": 0,
		"provisioned-memory": 40960,
		"reserved-memory": 0.0,
		"total-memory": 65501
	},
	"services": {
		"lrc:/etc/rc2_d/S20sysetup": "legacy_run"
	},
	"sysinfo": {
		"Boot Parameters": {
			"module_name_0": "etc/system",
			"smartos": "true"
		},
		"Boot Time": "1454619930",
		"CPU Physical Cores": 2,
		"CPU Total Cores": 16,
		"CPU Type": "Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz",
		"CPU Virtualization": "vmx",
		"Disks": {
			"c0t50011731001DF1ACd0": {
				"Size in GB": 480
			}
		},
		"HW Family": "To be filled by O.E.M.",
		"HW Version": "0123456789",
		"Hostname": "dev01",
		"Link Aggregations": {},
		"Live Image": "20160204T080230Z",
		"Manufacturer": "Supermicro",
		"MiB of Memory": "65501",
		"Network Interfaces": {
			"ixgbe0": {
				"Link Status": "up",
				"MAC Address": "00:07:43:13:e3:90",
				"NIC Names": ["external", "fifo"],
				"ip4addr": ""
			},
			"igb0": {
				"Link Status": "up",
				"MAC Address": "00:25:90:78:7c:d8",
				"NIC Names": ["admin"],
				"ip4addr": "192.168.241.101"
			},
			"igb1": {
				"Link Status": "down",
				"MAC Address": "00:25:90:78:7c:d9",
				"NIC Names": [],
				"ip4addr": ""
			}
		},
		"Product": "X9DRT",
		"SDC Version": "7.0",
		"SKU Number": "To be filled by O.E.M.",
		"Serial Number": "0123456789",
		"Setup": "false",
		"System Type": "SunOS",
		"UUID": "00000000-0000-0000-0000-002590787cd8",
		"VM Capable": true,
		"Virtual Network Interfaces": {
			"external0": {
				"Host Interface": "cxgbe0",
				"Link Status": "up",
				"MAC Address": "02:08:20:71:b4:44",
				"VLAN": "0",
				"ip4addr": "192.168.201.101"
			},
			"fifo0": {
				"Host Interface": "cxgbe0",
				"Link Status": "up",
				"MAC Address": "02:08:20:8b:02:ab",
				"VLAN": "0",
				"ip4addr": "192.168.221.101"
			}
		},
		"Zpool": "zones",
		"Zpool Creation": 1438105335,
		"Zpool Disks": "c0t50011731001DF1ACd0",
		"Zpool Profile": "mirror",
		"Zpool Size in GiB": 2150
	},
	"uuid": "0d9aa97d-806b-4e1e-b4dc-c4f9502004d3",
	"version": "dev-b9976f9, Fri Feb 5 16:57:47 2016 -0500",
	"virtualisation": ["zone", "kvm"]
}

Package Rules

When defining new packages you have the option to define specific package rules. These rules are very powerful and can be used in conjunction with hypervisor characteristics to dictate fine grained provisioning logic at zone creation time.

A simple example of a basic package rule, would be to deploy a machine on a specific hypervisor at provisioning time.

969

Sample package rule seen under the package's "requirement" tab

This rule was simply associated with the package when it was added. As shown below:

993

The above "simplistic" example shows the general workflow with associating provisioning rules with a package.

For more advanced rule combinations, hypervisor characteristics can be used in conjunction with package rules to facilitate complex package provisioning scenarios.

777

Looking at the above characteristics, one could use a combination of the hypervisor characteristics in conjunction with package rules at machine provisioning time. e.g. only deploy if the hypervisor satisfies these requirements:

characteristics.cold-aisle-containment =:= yes
characteristics.cpu-cores =< 6
characteristics.colocation-cabinet =:= 16D
characteristics.disk-drives-in-pool > 10

Package Rule Parameters

WEIGHT

mustThe hypervisor MUST satisfy this requirement or be discarded
cantThe hypervisor CAN’T satisfy this requirement or be discarded
N (integer)If this rule matches the weight of this hypervisor is adjusted with N (0 is the base value for all hypervisors)

CONDITION

>=The value of the hypervisor must be greater or equal then the comparison value
>The value of the hypervisor must be greater then the comparison value
=<The value of the hypervisor must be lower or equal then the comparison value
<The value of the hypervisor must be lower then the comparison value
=:=The value of the hypervisor must be equal to the comparison value
=/=The value of the hypervisor can’t be equal to the comparison value
subsetThe the comparison value must be a subset of the hypervisor value
supersetThe the comparison value must be a superset of the hypervisor value
disjointThe the comparison value must be a disjoint with the hypervisor value
elementThe the comparison value must be an element of the hypervisor value

ATTRIBUTE

An attribute is any JSON path as string - This describes how the hypervisor value will be found (i.e. “resources.free-memory”). A value is integer, string, array - the value that will be tested against.

USABLE ATTRIBUTES

resources.free-memoryamount of free memory available
resources.total-memorytotal memory on the node
resources.provisioned-memorynode memory allocated for both running and stopped vm’s
resources.freefree disk storage available on the pool in MB e.g. 11871
resources.sizethe size of the zpool in MB e.g. 20352
resources.usedused disk space on the pool in MB e.g. 8481
pools.*.freefree size in pool zones e.g. 8481
healththe status of the zpool e.g. ONLINE
networksname of the network tag e.g. admin
uuiduuid of the hypervisor
aliashypervisor name, e.g. 00-0c-29-18-ec-10 or compute-node-2
virtualisationnode virtualisation type capability e.g. zone or kvm