~openstackbook/openstackbook/cactus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0" encoding="UTF-8"?><chapter xmlns:db="http://docbook.org/ns/docbook" xmlns="http://docbook.org/ns/docbook" xml:id="Introduction_to_OpenStack_and_its_components-d1e59" version="5.0" xml:base="Introduction.xml">
	<title>Introduction to OpenStack and Its Components</title>
	<section xml:id="Cloud_Computing-d1e64">
		<title>Cloud Computing</title>
		<para>Cloud computing is a computing model, where resources such as computing power, storage, network and software are abstracted and provided as services on the Internet in a remotely accessible fashion. Billing models for these services are generally similar to the ones adopted for public utilities. On-demand availability, ease of provisioning, dynamic and virtually infinite scalability are some of the key attributes of cloud computing.</para>
		<para>An infrastructure setup using the cloud computing model is generally referred to as the "cloud". The following are the broad categories of services available on the cloud:</para>
		<itemizedlist>
			<listitem><para>Infrastructure as a Service (IaaS)</para></listitem>
			<listitem><para>Platform as a Service (PaaS)</para></listitem>
			<listitem><para>Software as a Service (SaaS)</para></listitem>
		</itemizedlist>
		<para>Amazon Web Services (AWS) is one of the major players providing IAAS. They have two popular services - Elastic Compute Cloud (EC2) and Simple Storage Service (S3). These services are available through web services.</para>
	</section>
	<section xml:id="OpenStack-d1e94">
		<title>OpenStack</title>
		<para>OpenStack is a collection of open source software projects that enterprises/service providers can use to setup and run their cloud compute and storage infrastructure. Rackspace and NASA are the key initial contributors to the stack. Rackspace contributed their "Cloud Files" platform to power the Object Storage part of the OpenStack, while NASA contributed their "Nebula" code to power the Compute part.  OpenStack consortium has managed to have more than 100 members including Canonical, Dell, Citrix etc. in less than a year.</para>
		<para>OpenStack makes its services available through Amazon EC2/S3 compatible APIs and hence the client tools written for AWS can be used with OpenStack as well.</para>
		<para>There are 3 main service families under OpenStack</para>
		<itemizedlist>
			<listitem><para>Compute Infrastructure (Nova)</para></listitem>
			<listitem><para>Storage Infrastructure (Swift)</para></listitem>
			<listitem><para>Imaging Service (Glance)</para></listitem>
		</itemizedlist>
<section xml:id="Open_Stack_Compute_Infrastructure_Nova_-d1e124">
		<title>Open Stack Compute Infrastructure ( Nova )</title>
		<para>Nova is the underlying cloud computing fabric controller for the OpenStack cloud. All activities needed to support the life cycle of instances within the OpenStack cloud are handled by Nova. It manages all the compute resources, networking, authorization, and scalability needs of the OpenStack cloud. Nova is a management platform and does not provide any virtualization capabilities by itself; instead, it uses libvirt APIs to interact with the supported hypervisors. Nova exposes its capabilities through a web services API that is compatible with that of EC2 of Amazon Web Services.</para>
    <section xml:id="Functions_and_Features-d1e132">
		<title>Functions and Features:</title>
		<itemizedlist>
			<listitem><para>Instance life cycle management</para></listitem>
			<listitem><para>Management of compute resources</para></listitem>
			<listitem><para>Networking and Authorization</para></listitem>
			<listitem><para>REST-based API</para></listitem>
			<listitem><para>Asynchronous eventually consistent communication</para></listitem>
			<listitem><para>Hypervisor agnostic : support for Xen, XenServer/XCP, KVM, UML, VMware vSphere and Hyper-V</para></listitem>
		</itemizedlist>
    </section>
<section xml:id="Components_of_OpenStack-Compute-d1e166">
		<title>Components of OpenStack Compute</title>
		<para>Nova Cloud Fabric is composed of the following major components:</para>
		<itemizedlist>
			<listitem><para>API Server ( nova-api )</para></listitem>
			<listitem><para>Message Queue ( rabbit-mq server )</para></listitem>
			<listitem><para>Compute Workers ( nova-compute )</para></listitem>
			<listitem><para>Network Controller ( nova-network )</para></listitem>
			<listitem><para>Volume Worker ( nova-volume )</para></listitem>
			<listitem><para>Scheduler ( nova-scheduler )</para></listitem>
		</itemizedlist>
<para>
<mediaobject>
		<imageobject role="fo">
			<imagedata fileref="images/Arch.png"
				format="PNG" scale="60"/>
		</imageobject>
		<imageobject role="html">
			<imagedata fileref="images/Archhtml.png"
				format="PNG" />
		</imageobject>
</mediaobject>
</para>
<section xml:id="API_Server_nova-api_-d1e213">
		<title>API Server ( nova-api )</title>
		<para>The API Server provides an interface to the outside world to interact with the cloud infrastructure. API server is the only component that the outside world uses to manage the infrastructure. The management is done through web services calls using EC2 API. The API Server then, in turn, communicates with the relevant components of the cloud infrastructure through the Message Queue. Also there is an OpenStack API as well now, as an alternative to the EC2 API.</para>
	</section>
    <section xml:id="Message_Queue_Rabbit_MQ_Server_-d1e223">
		<title>Message Queue ( Rabbit MQ Server )</title>
        <para>The OpenStack Cloud Controller communicates with other nova components such as the Scheduler, Network Controller, and Volume Controller via AMQP(Advanced Message Queue Protocol). Nova uses asynchronous calls for request response, with a call-back that gets triggered once a response is received. Since asynchronous communication is used, none of the end points get stuck for long in a waiting state. This is especially true since many actions expected by the API calls such as launching an instance or uploading an image are time consuming.</para>
    </section>
    <section xml:id="Compute_Worker_nova-compute_-d1e232">
		<title>Compute Worker ( nova-compute )</title>
		<para>Compute workers deal with instance management life cycle. they receive the requests for life cycle management via the Message Queue and carry out operations. There are several Compute Workers in a typical production cloud deployment. An instance is deployed on any of the available compute worker based on the scheduling algorithm used.</para>
    </section>
    <section xml:id="Network_Controller_nova-network_-d1e241">
		<title>Network Controller ( nova-network )</title>
		<para>The Network Controller deals with the network configuration of host machines. It does operations like allocating IP addresses, configuring VLANs for projects, implementing security groups and configuring networks for compute nodes.</para>
    </section>
    <section xml:id="Volume_Workers_nova-volume_-d1e250">
		<title>Volume Workers ( nova-volume )</title>
		<para>Volume workers are used for the management of LVM-based instance volumes. Volume Workers perform volume related functions such as creation, deletion, attaching a volume to an instance, and detaching a volume from an instance. Volumes provide a way of providing persistent storage for use by instances, as the main disk attached to an instance is non-persistent and any changes made to it are lost when the volume is detached or the instance is terminated. When a volume is detached from an instance or when an instance, to which the volume is attached, is terminated, it retains the data that was stored on it when it was attached to an instance earlier. This data can be accessed by reattaching the volume to the same instance or by attaching it to another instances.</para>
		<para>Any valuable data that gets accumulated during the life cycle of an instance should be written to a volume, so that it can be accessed later. This typically applies to the storage needs of database servers etc.</para>
    </section>
    <section xml:id="Scheduler_nova-scheduler_-d1e262">
        <title>Scheduler (nova-scheduler)</title>
        <para>The scheduler maps the nova-API calls to the appropriate openstack components. It runs as a daemon named nova-schedule and picks up a compute/network/volume server from a pool of available resources depending upon the scheduling algorithm in place. A scheduler can base its decisions on various factors such as load, memory, physical distance of the availability zone, CPU architecture, etc. The nova scheduler implements a pluggable architecture.</para>
        <para>Currently the nova-scheduler implements a few basic scheduling algorithms:</para>
    <itemizedlist>
        <listitem><para>chance: In this method, a compute host is chosen randomly across availability zones.</para></listitem>
        <listitem><para>availability zone: Similar to chance, but the compute host is chosen randomly from within a specified availability zone.</para></listitem>
        <listitem><para>simple: In this method, hosts whose load is least are chosen to run the instance. The load information may be fetched from a load balancer.</para></listitem>
    </itemizedlist>
</section>
</section>
</section>
<section xml:id="OpenStack_Storage_Infrastructure_Swift_-d1e291">
		<title>OpenStack Storage Infrastructure ( Swift )</title>
		<para>Swift is an object store that stores a large number of objects distributed across commodity hardware. Swift has built-in redundancy and failover management and features like backing up or archiving data, serving graphics or videos. It is scalable to multiple petabytes and to billions of objects. Swift provides elasticity and flexibility of cloud-based storage for your web applications.</para>
	<section xml:id="Functions_and_Features-d1e299">
		<title>Functions and Features</title>
		<itemizedlist>
			<listitem><para>Storing the machine images</para></listitem>
			<listitem><para>Working as an independent data container</para></listitem>
			<listitem><para>Redundancy and failover</para></listitem>
			<listitem><para>Backup and archival</para></listitem>
			<listitem><para>Extremely scalable</para></listitem>
		</itemizedlist>
    </section>
 </section>
    <section xml:id="OpenStack_Imaging_Service_Glance_-d1e329">
		<title>OpenStack Imaging Service ( Glance )</title>
		<para>OpenStack Imaging Service is a lookup and retrieval system for virtual machine images. It can be configured to use any one of the following 3 storage backends:</para>
		<itemizedlist>
			<listitem><para>OpenStack Object Store to store images</para></listitem>
			<listitem><para>S3 storage directly</para></listitem>
			<listitem><para>S3 storage with Object Store as the intermediate for S3 access.</para></listitem>
		</itemizedlist>
        <section xml:id="Functions_and_Features_Glance_-d1e352">
        <title>Functions and Features ( Glance )</title>
		<itemizedlist>
			<listitem><para>Provides imaging service</para></listitem>
		</itemizedlist>
    </section>
    <section xml:id="Components_of_OpenStack_Imaging_Service_Glance_-d1e365">
		<title>Components of OpenStack Imaging Service ( Glance )</title>
		<itemizedlist>
			<listitem><para>Glance-control</para></listitem>
			<listitem><para>Glance-registry</para></listitem>
		</itemizedlist>
    </section>
    </section>
</section>
</chapter>