All about instances
Everything you wanted to know about instances.
© 2010-2011 Google
Use under GPLv2+ or CC-by-SA
Some images borrowed/modified from Lance Albertson and Iustin Pop
The importance of instances
Running instances is the only purpose of Ganeti. As such Instances are the most
important entity that we care about: everything else exists purely for their
purpose.
What makes an instance
In order to define an instance we need the following:
- Virtual memory
- Virtual cpus
- Backend Storage
- Network interfaces
- Operating System
- Console access
Virtual memory and cpus
These are provided by the hypervisor (Xen or KVM). With Ganeti we just
configure their size.
Backend storage
Ganeti will manage the backend storage for instances. The most common backend storages are:
- plain (LVM logical volume device)
- drbd (drbd device insisting on an LVM logical volume, with redundancy on a secondary node)
Ganeti also supports:
- file (image file on a node)
- sharedfile (image file on a shared mount point)
- RBD (radon block device)
Network interfaces
Each instance nic has:
- a mode, routed, bridged or openvswitch
- a link, the network entity on the host node it is connected to
- a MAC address, which is unique on the cluster (or more, if you set it so)
- an IP address (optional), which can be used by the network setup code or by hooks
Operating system
The Operating System is what Ganeti uses to initialize the instance. It
implements the Ganeti OS API, and is made up as a series of executables that
format the instance disks and initialize them appropriately.
At minimum it can do nothing (for an instance that will later be installed from
the network), and at most it sets up partitions, system, and configuration for
an instance.
Currently OS scripts run as root on the target node, and so must be "trusted".
Work is ongoing to allow untrusted OS images.
Main OS implementations
- 'debootstrap' reference OS implementation
- 'image' implementation that installs arbitrary images
- 'snf image' implementation that provides an insulated environment for the
installation
OS API
A definition of an OS that can be installed on an instance
- create, import, export, rename (+x): instance operations
- verify (+x): check the OS parameters
- ganeti_api_version the OS conforms to (current one: 20)
- variants.list: supported variants of the os (eg. +squeeze, for debootstrap)
- parameters.list: extra parameters supported (name description)
Console Access
Instance console access is provided through the following means:
- Serial/Xen console (via gnt-instance console <name>)
- VNC (if set up instances listen on a node port for VNC access)
- Spice (KVM supports the spice remote desktop protocol)
Conclusion
Questions?
© 2010-2011 Google
Use under GPLv2+ or CC-by-SA
Some images borrowed/modified from Lance Albertson and Iustin Pop