OpenStack:Nova
Nova
Nova Orchestrates the cloud by managing compute resources and provisioning of VMs.
Nova-API
The API is a sub component of Nova the provides endpoint for the API requests.
Scheduler and Conductor
The scheduler and conductor takes requests from the message queue and determined which node a VM will be run on, based on the parameters of the request and the resources available on the physical nodes. The scheduler uses a two phase process of filtering and weighting to determine the physical node.
Filtering
When a request is recieved it first applies a filter to determine which hosts are eligabale based on various factors such as CPU cores or disk space.
Weighting
Each of the remaining systems then have a weighting applied which is combined with a cost of running the instance of the system. This allows certain systems to be more likely to be used. The system with the highest score is then used.
Nova Compute
The compute part of the nova service starts and stops VMs, interacts with the message queue and database sub systems.
While Nova can make use of a number of hypervisors, within piston the KVM hypervisor is used with QEMU.
Instances
Instances are compute resources that are created from VM images stored in Glance and managed by Nova. Each instance is sized acording to it flavor. Instances can be configured to restrict access, or a snap shot cna be taken to create a new image.
Flavors
Flavors specify the amount of VCPUs, RAM and storage can be allocated to an instance. By default Openstack provide 5 flours ranging from tiny to xlarge.
Launch Sequence
There is a great deal that happens automatically when launching an instance:
- The user requests to launch an instance through the API.
- Keystone performs authentication and authorization of the user.
- The nova-scheduler service selects an appropriate host through filtering and weighting.
- The nova-scheduler service sends a request to the nova-compute service to launch an instance on the selected host.
- The nova-conductor service retrieves information about the instance, such as the host ID and flavor.
- The nova-compute service retrieves the image from the Glance registry and launches it.
- The nova-compute service requests the allocation and configuration of the network such that the instance is assigned an IP address on the appropriate network.
- The nova-compute service requests the attaching of any volumes to the instance.
- The nova-compute service generates data for the hypervisor driver and executes the request on the hypervisor through a libvirt daemon or the API.