~0x44/nova/extdoc

« back to all changes in this revision

Viewing changes to doc/source/runnova/getting.started.rst

  • Committer: NTT PF Lab.
  • Date: 2010-12-24 11:38:49 UTC
  • mto: This revision was merged to the branch mainline in revision 564.
  • Revision ID: openstack@lab.ntt.co.jp-20101224113849-z9nemzmki17bxnvw
SupportĀ IPv6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
..
2
 
      Copyright 2010-2011 United States Government as represented by the
3
 
      Administrator of the National Aeronautics and Space Administration.
4
 
      All Rights Reserved.
5
 
 
6
 
      Licensed under the Apache License, Version 2.0 (the "License"); you may
7
 
      not use this file except in compliance with the License. You may obtain
8
 
      a copy of the License at
9
 
 
10
 
          http://www.apache.org/licenses/LICENSE-2.0
11
 
 
12
 
      Unless required by applicable law or agreed to in writing, software
13
 
      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 
      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
 
      License for the specific language governing permissions and limitations
16
 
      under the License.
17
 
 
18
 
Getting Started with Nova
19
 
=========================
20
 
 
21
 
This code base is continually changing, so dependencies also change.  If you
22
 
encounter any problems, see the :doc:`../community` page.
23
 
The `contrib/nova.sh` script should be kept up to date, and may be a good
24
 
resource to review when debugging.
25
 
 
26
 
The purpose of this document is to get a system installed that you can use to
27
 
test your setup assumptions.  Working from this base installtion you can
28
 
tweak configurations and work with different flags to monitor interaction with
29
 
your hardware, network, and other factors that will allow you to determine
30
 
suitability for your deployment.  After following this setup method, you should
31
 
be able to experiment with different managers, drivers, and flags to get the
32
 
best performance.
33
 
 
34
 
Dependencies
35
 
------------
36
 
 
37
 
Related servers we rely on
38
 
 
39
 
* **RabbitMQ**: messaging queue, used for all communication between components
40
 
 
41
 
Optional servers
42
 
 
43
 
* **OpenLDAP**: By default, the auth server uses the RDBMS-backed datastore by
44
 
  setting FLAGS.auth_driver to `nova.auth.dbdriver.DbDriver`. But OpenLDAP
45
 
  (or LDAP) could be configured by specifying `nova.auth.ldapdriver.LdapDriver`.
46
 
  There is a script in the sources (`nova/auth/slap.sh`) to install a very basic
47
 
  openldap server on ubuntu.
48
 
* **ReDIS**: There is a fake ldap auth driver
49
 
  `nova.auth.ldapdriver.FakeLdapDriver` that backends to redis. This was
50
 
  created for testing ldap implementation on systems that don't have an easy
51
 
  means to install ldap.
52
 
* **MySQL**: Either MySQL or another database supported by sqlalchemy needs to
53
 
  be avilable.  Currently, only sqlite3 an mysql have been tested.
54
 
 
55
 
Python libraries that we use (from pip-requires):
56
 
 
57
 
.. literalinclude:: ../../../tools/pip-requires
58
 
 
59
 
Other libraries:
60
 
 
61
 
* **XenAPI**: Needed only for Xen Cloud Platform or XenServer support. Available
62
 
  from http://wiki.xensource.com/xenwiki/XCP_SDK or
63
 
  http://community.citrix.com/cdn/xs/sdks.
64
 
 
65
 
External unix tools that are required:
66
 
 
67
 
* iptables
68
 
* ebtables
69
 
* gawk
70
 
* curl
71
 
* kvm
72
 
* libvirt
73
 
* dnsmasq
74
 
* vlan
75
 
* open-iscsi and iscsitarget (if you use iscsi volumes)
76
 
* aoetools and vblade-persist (if you use aoe-volumes)
77
 
 
78
 
Nova uses cutting-edge versions of many packages. There are ubuntu packages in
79
 
the nova-core trunk ppa.  You can use add this ppa to your sources list on an
80
 
ubuntu machine with the following commands::
81
 
 
82
 
  sudo apt-get install -y python-software-properties
83
 
  sudo add-apt-repository ppa:nova-core/trunk
84
 
 
85
 
Recommended
86
 
-----------
87
 
 
88
 
* euca2ools: python implementation of aws ec2-tools and ami tools
89
 
* build tornado to use C module for evented section
90
 
 
91
 
 
92
 
Installation
93
 
--------------
94
 
 
95
 
You can install from packages for your particular Linux distribution if they are
96
 
available.  Otherwise you can install from source by checking out the source
97
 
files from the `Nova Source Code Repository <http://code.launchpad.net/nova>`_
98
 
and running::
99
 
 
100
 
    python setup.py install
101
 
 
102
 
Configuration
103
 
---------------
104
 
 
105
 
Configuring the host system
106
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
107
 
 
108
 
Nova can be configured in many different ways. In this "Getting Started with Nova" document, we only provide what you need to get started as quickly as possible. For a more detailed description of system
109
 
configuration, start reading through `Installing and Configuring OpenStack Compute <http://docs.openstack.org/openstack-compute/admin/content/ch03.html>`_.
110
 
 
111
 
`Detailed instructions for creating a volume group are available <http://docs.openstack.org/openstack-compute/admin/content/ch05s07.html>`_, or use these quick instructions. 
112
 
 
113
 
* Create a volume group (you can use an actual disk for the volume group as
114
 
  well)::
115
 
 
116
 
    # This creates a 1GB file to create volumes out of
117
 
    dd if=/dev/zero of=MY_FILE_PATH bs=100M count=10
118
 
    losetup --show -f MY_FILE_PATH
119
 
    # replace /dev/loop0 below with whatever losetup returns
120
 
    # nova-volumes is the default for the --volume_group flag
121
 
    vgcreate nova-volumes /dev/loop0
122
 
 
123
 
 
124
 
Configuring Nova
125
 
~~~~~~~~~~~~~~~~
126
 
 
127
 
Configuration of the entire system is performed through python-gflags.  The
128
 
best way to track configuration is through the use of a flagfile.
129
 
 
130
 
A flagfile is specified with the ``--flagfile=FILEPATH`` argument to the binary
131
 
when you launch it.  Flagfiles for nova are typically stored in
132
 
``/etc/nova/nova.conf``, and flags specific to a certain program are stored in
133
 
``/etc/nova/nova-COMMAND.conf``.  Each configuration file can include another
134
 
flagfile, so typically a file like ``nova-manage.conf`` would have as its first
135
 
line ``--flagfile=/etc/nova/nova.conf`` to load the common flags before
136
 
specifying overrides or additional options.
137
 
 
138
 
To get a current comprehensive list of flag file options, run bin/nova-<servicename> --help, or refer to a static list at `Reference for Flags in nova.conf <http://docs.openstack.org/openstack-compute/admin/content/ch05s08.html>`_.
139
 
 
140
 
A sample configuration to test the system follows::
141
 
 
142
 
    --verbose
143
 
    --nodaemon
144
 
    --auth_driver=nova.auth.dbdriver.DbDriver
145
 
 
146
 
Running
147
 
-------
148
 
 
149
 
There are many parts to the nova system, each with a specific function.  They
150
 
are built to be highly-available, so there are may configurations they can be
151
 
run in (ie: on many machines, many listeners per machine, etc).  This part
152
 
of the guide only gets you started quickly, to learn about HA options, see
153
 
`Installing and Configuring OpenStack Compute <http://docs.openstack.org/openstack-compute/admin/content/ch03.html>`_.
154
 
 
155
 
Launch supporting services
156
 
 
157
 
* rabbitmq
158
 
* redis (optional)
159
 
* mysql (optional)
160
 
* openldap (optional)
161
 
 
162
 
Launch nova components, each should have ``--flagfile=/etc/nova/nova.conf``
163
 
 
164
 
* nova-api
165
 
* nova-compute
166
 
* nova-objectstore
167
 
* nova-volume
168
 
* nova-scheduler