~openstackbook/openstackbook/essex

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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?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. AWS have two popular services - Elastic Compute Cloud (EC2) and Simple Storage Service (S3), 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 (code) to power the Object Storage part of the OpenStack, while NASA contributed their "Nebula" platform (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 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. This makes Nova a Management Platform that manages compute resources, networking, authorization, and scalability needs of the OpenStack cloud. But, Nova does not provide any virtualization capabilities by itself; instead, it uses libvirt APIs to interact with the supported hypervisors. Nova exposes all its capabilities through a web services API that is compatible with the EC2 API 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. As an alternative to EC2 API, OpenStack also provides a native API called "OpenStack 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 user actions 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_-d1e271">
		<title>OpenStack Storage Infrastructure (Swift)</title>
		<para>Swift provides a distributed, eventually consistent virtual object store for OpenStack. It is analogous to Amazon Web Services - Simple Storage Service (S3). Swift is capable of storing billions of objects distributed across nodes. Swift has built-in redundancy and failover management and is capable of archiving and media streaming. It is extremely scalable in terms of both size (Several petabytes) and capacity (Number of objects).</para>
	<section xml:id="Functions_and_Features-d1e279">
		<title>Functions and Features</title>
		<itemizedlist>
			<listitem><para>Storage of large number of objects</para></listitem>
			<listitem><para>Storage of large sized objects</para></listitem>
			<listitem><para>Data Redundancy</para></listitem>
			<listitem><para>Archival capabilities - Work with large datasets</para></listitem>
			<listitem><para>Data container for virtual machines and cloud apps</para></listitem>
			<listitem><para>Media Streaming capabilities</para></listitem>
			<listitem><para>Secure storage of objects</para></listitem>
			<listitem><para>Backup and archival</para></listitem>
			<listitem><para>Extreme scalability</para></listitem>
		</itemizedlist>
    </section>

	<section xml:id="Components_of_Swift-d1e281">
		<title>Components of Swift</title>
		<itemizedlist>
			<listitem><para>Swift Account</para></listitem>
			<listitem><para>Swift Container</para></listitem>
			<listitem><para>Swift Object</para></listitem>
			<listitem><para>Swift Proxy</para></listitem>
			<listitem><para>The RING</para></listitem>
		</itemizedlist>
	</section>
	<section xml:id="Swift_Proxy_Server-d1e289">
	<title>Swift Proxy Server</title>
	<para>The consumers interact with the Swift setup through the proxy server using the Swift API. The proxy server acts as a gatekeeper and recieves requests from the world. It looks up the location of the appropriate entities and routes the requests to them. </para>
	<para>The proxy server also handles failures of entities by rerouting requests to failover entities (handoff entities)</para>
	</section>

	<section xml:id="Swift_Object_Server-d1e291">
	<title>Swift Object Server</title>
	<para>The Object server is a blob store. It's responsibility is to handle storage, retrieval and deletion of objects stored in the local storage. Objects are typically binary files stored in the filesystem with metadata contained as extended file attributes (xattr).</para>
 
	<para>Note: xattr is supported in several filesystems such as ext3, ext4, XFS, Btrfs, JFS and ReiserFS in Linux. But it is known to work best under XFS, JFS, ReiserFS, Reiser4, and ZFS. XFS is considered to be the best option.</para>
	</section>
	<section xml:id="Swift_Swift_Server-d1e294">
		<title>Swift Container server</title>
		<para>The container server lists the objects in a container. The lists are stored as SQLite files. The container server also tracks the statistics like the number of objects contained and the storage size occupied by a container.</para>
	</section>
	<section xml:id="Swift_Account_Server-d1e296">
	<title>Swift Account Server</title>
	<para>The account server lists containers the same way a container server lists objects.</para>
	</section>
	<section xml:id="The_Ring-d1e299">
	<title>The Ring</title>
	<para>The ring contains information about the physical location of the objects stored inside Swift. It is a virtual representation of mapping of names of entities to their real physical location. It is analogous to an indexing service that various processes use to lookup and locate the real physical location of entities within the cluster. Entities like Accounts, Containers, Objects have their own seperate rings.</para>
	</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>