Behind the scenes - how it all works

We have seen the entire process of requesting a service using both the GUI and the CLI, so as a recap let's take a look at how the process works behind the scenes. If we had to write our own toolsets using the RESTful API, these are the steps that we would take. The following ones show the major calls that are made in the process.

Knowing this, we should also be able to troubleshoot where a problem is, by isolating the step at which the machine fails to build and by looking at the appropriate log file:

  1. Authenticate and generate a token: As the first step, a call is made to the Keystone service, the credentials are presented, the tenant and the user are authenticated and a token is retrieved. This token is used in all the subsequent API calls, either directly or through Horizon that determines the level of access across all the services.
  2. Make a call to Glance for images: As the second step, the user would make a call to the Glance service to retrieve the images that are allowed by the user, while using the token as the common authentication mechanism (if the token has not yet expired).
  3. Make a call to Nova for a list of flavors: The next call is made to Nova to determine the list of flavors (sizes) of the machine.
  4. Make a call to Nova for a list of available keys and security groups: The next call is made to Nova to determine the different security keys that are available, so we can choose the key name. Another call is made for the security groups and a list for these is obtained.
  5. Make a call to Neutron for available networks: The next call is made to Neutron for the available networks that can be used and connected to the Nova instance.

    The previously mentioned calls can be made sequentially or in parallel or can even be prefetched and kept. Once the calls are made, the parameters can be passed when the request is made to Nova.

  6. The Nova API accepts the call: The Nova API service accepts the call and puts the request in the messaging queue.
  7. The Nova scheduler chooses compute: The Nova scheduler service picks up the message and finds the appropriate compute node where the instance can be brought online and puts the message back in the queue.
  8. The Nova compute interacts with Hypervisor: The Nova compute service spins up the instance by sending the appropriate command to Hypervisor. The Nova compute can work with a variety of Hypervisors, such as Xen, KVM, and VMware.
  9. A call is made to the Neutron API: Nova makes a call to the Neutron API for a port where the VM can be connected. Neutron allocates a port in the network defined in the call.

This way the entire machine is booted and then given to the user. The user can then choose to attach additional services such as a block storage using Cinder and an elastic IP address using Neutron. The process almost remains similar.

Once the machine is booted, we can take a look at its Network topology to see how it is connected to the environment:

Behind the scenes - how it all works
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset