
Mastering OpenStack
By :

Let's try to see how OpenStack works by chaining all the service cores covered in the previous sections in a series of steps:
The service catalog is a JSON structure that exposes the resources available upon a token request.
You can use the following example on querying by tenant to get a list of servers:
$ curl -v -H "X-Auth-Token:token" http://192.168.27.47:8774/v2/tenant_id/servers
A list of server details is returned on how to gain access to the servers:
{ "server": { "adminPass": "verysecuredpassword", "id": "5aaee3c3-12ee-7633-b32b-635489236232fbfbf", "links": [ { "href": "http://myopenstack.com/v2/openstack/servers/5aaee3c3-12ee-7633-b32b-635489236232fbfbf", "rel": "self" }, { "href": "http://myopenstack.com/v2/openstack/servers/5aaee3c3-12ee-7633-b32b-635489236232fbfbf", "rel": "bookmark" } ] } }
The next figure resumes the first blob pieces on how OpenStack works:
For anyone who is non-familiar with the queuing system, we can consider an example of a central airport:
You have booked a flight and have been assigned a specific gateway that only you are interested in. This gateway gets you directly to your seat on the plane. A queuing system allows you to tune in to the server or service that you are interested in.
A queuing system takes care of issues such as; who wants to do the work? By analogy, since everybody listens to the airport assistance speaker channel, only one person (same passenger's destination) listens to that information and makes it work by joining the gateway.
Now, we have this information in the queue.
If you have a look at the Python source tree, for any service, you will see a network directory for the network code, and there will be an api.py
file for every one of these services.
Let's take an example. If you want to create an instance and implement it in the compute node, it might say "import the nova-compute node API and there is method/function there to create the instance". So, it will do all the jobs of getting over the wire and spinning up the server instances and doing the same for the appropriate node.
When a new request comes in, the scheduler might notify "you will get from these available resources available."
The scheduling process in OpenStack can perform different algorithms such as simple, chance, and zone. An advanced way to do this is by deploying weight filtering by ranking the servers as its available resources.
Using this option, the node will spin up the server while you create your own rules. Here, you distribute your servers based on the number of processors and how much memory you may want in your spinning servers.
The last piece of this picture is that we need to get the information back. So, we have all these services that are doing something. Remember that they have a special airport gateway. Again, our queue performs some actions, and it sends notifications as these actions occur. They might be subscribed to find out certain things such as whether the network is up, the server is ready, or the server has crashed.
It is important to understand how different services in OpenStack work together, leading to a running virtual machine. We have already seen how a request is processed in OpenStack via APIs. Now, we can go further and closely check how such services and subsystems, which includes authentication, computing, images, networks, queuing, and databases, work in tandem with performing a complete workflow to provide an instance in OpenStack. The next series of steps describes how service components work together once a submission of an instance provisioning request has been done:
rpc.cast
). The call request will be sent to nova-scheduler to specify which host ID will run the instance.rpc.cast
) to start launching an instance that remains in the queue.rpc.call
) in order to get instance-related information such as the instance characteristics (CPU, RAM, and disk) and the host ID. The RPC call remains in the queue.The image URI will be obtained by the Image ID to find the requested one from the image repository.
If the images are stored in a Swift cluster, the images will be requested as Swift objects via the REST calls. Keep in mind that it is not the job of nova-compute to fetch from the swift storage. Swift will interface via APIs to perform object requests. More details about this will be covered in Chapter 4, Learning OpenStack Storage – Deploying the Hybrid Storage Model.
Dnsmasq is a software that provides a network infrastructure such as the DNS forwarder and the DHCP server.
rpc.call
) to nova-conductor.Let's figure out how things can be seen by referring to the following simple architecture diagram:
You may have certain limitations that are typically associated with network switches. Network switches create a lot of virtual LANs and virtual networks that specify whether there is a lot of input to data centers.
Let's imagine that we have 250 compute hosts scenario. You can conclude that a mesh of rack servers will be placed in the data center.
Now, you take the step to grow our data center, and to be geographically data-redundant in Europe and Africa: a data center in London, Amsterdam and Tunis.
We have a data center on each of these new locations and each of these locations are able to communicate with each other. At this point, a new terminology is introduced—cell concept.
To scale this out even further, we will take into consideration the entire system. We will take just the worker nodes and put them in other cells.
Another special scheduler works as a top-level cell and enforces the request into the child cell. Now, the child cells can do the work, and they can worry about VLAN and network issues.
The cells can share certain pieces of infrastructure, such as the database, authentication service Keystone, and some of the Glance image services. This is depicted in the following diagram:
More information about the concept of cells and configuration setup in OpenStack can be found for Havana release at the following reference: http://docs.openstack.org/havana/config-reference/content/section_compute-cells.html.
Change the font size
Change margin width
Change background colour