Thursday, June 26, 2014

VM Provisioning flow in OpenStack

In my earlier article OpenStack Components , I had given an overview of components that make up the OpenStack cloud . These components work in an integrated way to fulfill service requests like VM provisioning. In this article I will be explaining the backend steps that happen when a user launches an instance from OpenStack Dashboard or though CLI (Command line client).

Just to heads up , below command is used to boot an instance in OpenStack through CLI :

nova boot --image <<glance image id>> --flavor <<flavor id>> <<server name>> --nic net-id=<<network id to boot upon>>

When an instance is launched , OpenStack components work together in a cohesive manner to fulfill the request. Following steps happen in the backend :-

1. Dashboard or CLI sends authenticates the user credentials provided in request from Keystone.
2. Keystone returns an authentication token which will be used for interacting and authenticating with other components.
3. Request then goes to nova-api which make DB entry for the new instance to be created and lines up an entry in queue.
4. nova-api then forward the request to nova-scheduler which picks up the entry from queue . It then applies scheduler algorithms and filters to find a suitable host on which the instance will be created.
5. nova-scheduler return the entry from DB with updated host id in it .
6. nova-scheduler forwards the request to nova-compute for launching instance on host.
7.nova-compute passes the request to nova-conductor to find information about flavor (RAM,CPU required).
8. nova-conductor queries DB to find the required information and returns it to nova-compute.
9. nova-compute creates a REST call out of all the information and hits glance service to find the image details from which the instance will boot.
10. nova-compute then passes REST call to neutron/quantum to get IP address for the instance.
11. Next the request is forwarded to cinder service to attach volume to instance.
12. Finally the request is passed to hypervisor to create a new instance .

No comments:

Post a Comment