VM provisioning in-depth
The request flow for provisioning an instance goes like
this:
The dashboard or CLI gets the user credentials and authenticates
with the Identity Service via REST API.
The Identity Service authenticates the user with the user
credentials, and then generates and sends back an auth-token
which will be used for sending the request to other components
through REST-call.
The dashboard or CLI converts the new instance request
specified in launch instance or
nova-boot form to a REST API request and
sends it to nova-api.
nova-api receives the
request and sends a request to the Identity Service for
validation of the auth-token and access permission.
The Identity Service validates the token and sends updated
authentication headers with roles and permissions.
nova-api checks for
conflicts with nova-database.
nova-api creates
initial database entry for a new instance.
nova-api sends the
rpc.call request to nova-scheduler expecting to get
updated instance entry with host ID specified.
nova-scheduler picks
up the request from the queue.
nova-scheduler
interacts with nova-database to find an
appropriate host via filtering and weighing.
nova-scheduler
returns the updated instance entry with the appropriate host
ID after filtering and weighing.
nova-scheduler sends
the rpc.cast request to nova-compute for launching an
instance on the appropriate host.
nova-compute picks up
the request from the queue.
nova-compute sends the
rpc.call request to nova-conductor to fetch the
instance information such as host ID and flavor (RAM, CPU,
Disk).
nova-conductor picks
up the request from the queue.
nova-conductor
interacts with nova-database.
nova-conductor
returns the instance information.
nova-compute picks up the
instance information from the queue.
nova-compute performs
the REST call by passing the auth-token to glance-api. Then, nova-compute uses the Image ID to
retrieve the Image URI from the Image Service, and loads the
image from the image storage.
glance-api validates
the auth-token with keystone.
nova-compute gets the
image metadata.
nova-compute performs
the REST-call by passing the auth-token to Network API to
allocate and configure the network so that the instance gets
the IP address.
neutron-server
validates the auth-token with keystone.
nova-compute
retrieves the network info.
nova-compute performs
the REST call by passing the auth-token to Volume API to attach
volumes to the instance.
cinder-api validates
the auth-token with keystone.
nova-compute retrieves the
block storage info.
nova-compute
generates data for the hypervisor driver and executes the
request on the hypervisor (via libvirt or API).