Request Flow for Provisioning Instance in Openstack

One of the most important use-case in any cloud is provisioning a VM . In this article we shall do a walk through about an instance(VM) being provisioned in a Openstack based cloud. This article deals with the request flow and the component interaction of various projects under Openstack. The end result will be booting up a VM.

request flow

Provisioning a new instance involves the interaction between multiple components inside OpenStack :

  • CLI Command Line Interpreter for submitting commands to OpenStack Compute.
  • Dashboard (“Horizon”) provides the interface for all the OpenStack services.
  • Compute (“Nova”) retrieves virtual disks images(“Glance”) , attach flavor and associated metadata and transforms end user API requests into running instances.
  •  Network (“Quantum”) provides virtual networking for Compute which allows users to create their own networks and then link them to the instances.
  • Block Storage (“Cinder”) provides persistent storage volumes for Compute instances.
  • Image (“Glance”) can store the actual virtual disk files in the Image Store.
  • Identity (“Keystone”) provides authentication and authorization for all OpenStack services.
  • Message Queue(“RabbitMQ”) handles the internal communication within Openstack components such as Nova , Quantum and Cinder.

The request flow for provisioning an Instance goes like this:

  1. Dashboard or CLI gets the user credential and does the REST call to Keystone for authentication.
  2. Keystone authenticate the credentials and generate & send back auth-token which will be used for sending request to other Components through REST-call.
  3. Dashboard or CLI convert the new instance request specified in  ‘launch instance’ or ‘nova-boot’ form to REST API request and send it to nova-api.
  4. nova-api receive the request and sends the request for validation auth-token and access permission to keystone.
  5. Keystone validates the token and sends updated auth headers with roles and permissions.
  6. nova-api interacts with nova-database.
  7. Creates initial db entry for new instance.
  8.  nova-api sends the rpc.call request to nova-scheduler excepting to get  updated instance entry with host ID specified.
  9. nova-scheduler picks the request from the queue.
  10. nova-scheduler interacts with nova-database to find an appropriate host via filtering and weighing.
  11. Returns the updated instance entry with appropriate host ID after filtering and weighing.
  12. nova-scheduler sends the rpc.cast request to nova-compute for ‘launching instance’ on appropriate host .
  13. nova-compute picks the request from the queue.
  14. nova-compute send the rpc.call request to nova-conductor to fetch the instance information such as host ID and flavor( Ram , CPU ,Disk).
  15. nova-conductor picks the request from the queue.
  16. nova-conductor interacts with nova-database.
  17. Return the instance information.
  18. nova-compute picks the instance information from the queue.
  19. nova-compute does the REST call by passing auth-token to glance-api  to get the Image URI by Image ID from glance and upload image from image storage.
  20. glance-api validates the auth-token with keystone. 
  21. nova-compute get the image metadata.
  22. nova-compute does the REST-call by passing auth-token to Network API to allocate and configure the network such that instance gets the IP address. 
  23. quantum-server validates the auth-token with keystone.
  24. nova-compute get the network info.
  25. nova-compute does the REST call by passing auth-token to Volume API to attach volumes to instance.
  26. cinder-api validates the auth-token with keystone.
  27. nova-compute gets the block storage info.
  28. nova-compute generates data for hypervisor driver and executes request on Hypervisor( via libvirt or api).

The table represents the Instance state at various steps during the provisioning :

Status Task Power state Steps
Build scheduling None 3-12
Build networking None 22-24
Build block_device_mapping None 25-27
Build spawing None 28
Active none Running
Advertisements

About Romil Gupta
" Learn , Earn , Discover and share the knowledge ". I feel enthusiastic in working on Openstack Cloud, programming in Python.

19 Responses to Request Flow for Provisioning Instance in Openstack

  1. Vinnie Paul says:

    Nice one! Thanks.

  2. micro job says:

    Hi! I just want to give you a big thumbs up for your great information you’ve received here on this publish. I’ll be returning for your blog for much more quickly.

  3. Pingback: OpenStack Hacker养成指南 | UnitedStack Inc.

  4. Pingback: 如何成为OpenStack工程师 | Way Forever

  5. Pingback: OpenStack Hacker养成指南 | M2M

  6. Pingback: Request Flow for Provisioning Instance in Openstack | iLearnStack | OpenStackうぉっち

  7. Pingback: OpenStack Hacker养成指南 « OpenStack中国社区

  8. Deepan says:

    Great Information

  9. Pingback: OpenStack Hacker养成指南 | 李立辉的技术与网络营销博客

  10. Pingback: OpenStack Hacker养成指南 | 新世纪Linux社区

  11. I truly love your blog.. Great colors & theme.
    Did you develop this amazing site yourself? Please reply
    back as I’m planning to create my very own website and would like to learn where you got this from or what the theme is called.

    Appreciate it!

  12. Hem says:

    Thanks for the wonderful information you have been providing

  13. Pingback: 别以为真懂Openstack: 虚拟机创建的50个步骤和100个知识点(1) | 易鸣

  14. Pingback: 别以为真懂Openstack: 虚拟机创建的50个步骤和100个知识点(1) – popsuper1982 | 查问题

  15. Pingback: ssssssss | user's Blog!

  16. Pingback: [Note] Openstack的初步探索 | Pilla 技術宅

  17. Pingback: OpenStack Hacker养成指南 | OpenStack Pub

  18. Pingback: OpenStack Hacker养成指南 | Geekwolf's Blog

  19. Pingback: OpenStack Hacker养成指南 | 点滴

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: