Frieze is a python frontend for Ansible that makes orchestrating hardware, services and configuration slightly less maddening by allowing you to gather groups of machines into sites and securely route traffic between them.
Here is a sample Frieze session:
import frieze
# Set domain
domain = frieze.set_domain('anserinae.net')
# Define a new compute node
host = frieze.host({
'name' : 'ascendantjustice',
'type' : 'node'
})
# Define a sitebastion for the site
sitebastion = frieze.host({
'name' : 'instatllation01',
'type' : 'sitebastion'
})
# Create a site definition
site = frieze.site([sitebastion, host])
# Add some storage
storage = frieze.host({
'name' : 'unyieldinghierophant',
'type' : 'storage'
})
site.add_host(storage)
domain.add_site(site)
domain.deploy('QA')host, sitebastion and storage are all objects derived from FriezeNode, which encapsulates a machine's hardware, network links, services and certificates.
site is a FriezeSite object, which represents a set of FriezeNodes which can talk to each other without any additional routing beyond that provided by the site's sitebastion(see below).
frieze.host() can be initiated with any of these types:
- node: a compute unit, represented by
FriezeNodeand used to hostFriezeService-s. Can be either a physical machine or virtual construct (see hvnode below). - hvnode: a hypervisor node represented in code by
FriezeHV, used to host one or more nodes. - storage: a node that uses ZFS trickery to store
sitestate. It is represented in code by objects of typeFriezeStorage. - sitebastion: a special node used to route traffic between multiple nodes on the same network. Collectively, a
sitebastionand its child nodes form a site. There is precisely onesitebastionpersite. - siterouter: a node used to route traffic between sites. Collectively, a group of sites forms a domain.
siteroutersonly accept connections fromsitebastions. While there may be more than onesiterouterdefined for a domain, only one will be active at any given time; the rest are there for failover purposes only.
It is possible to define highly complex topologies using these primitives.