~citrix-openstack/nova/xenapi

« back to all changes in this revision

Viewing changes to doc/source/quickstart.rst

  • Committer: Tarmac
  • Author(s): Todd Willey, root, Vishvananda Ishaya, Joe Heck, root, Andy Smith, Anne Gentle, Dean Troyer, Devin Carlen
  • Date: 2010-11-16 02:34:47 UTC
  • mfrom: (386.2.71 trunkdoc)
  • Revision ID: hudson@openstack.org-20101116023447-pz7n6ps5rf0fnjea
Lots of documentation and docstring updates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
..
 
2
      Copyright 2010 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
Nova Quickstart
 
19
===============
 
20
 
 
21
.. todo:: 
 
22
    P1 (this is one example of how to use priority syntax)
 
23
    * Document the assumptions about pluggable interfaces (sqlite3 instead of
 
24
      mysql, etc) (todd)
 
25
    * Document env vars that can change things (USE_MYSQL, HOST_IP) (todd)
 
26
 
 
27
Recommended System Configuration
 
28
--------------------------------
 
29
 
 
30
Although Nova can be run on a variety of system architectures, for most users the following will be simplest:
 
31
 
 
32
* Ubuntu Lucid
 
33
* 10GB Hard Disk Space
 
34
* 512MB RAM
 
35
 
 
36
For development, Nova can run from within a VM.
 
37
 
 
38
 
 
39
Getting the Code
 
40
----------------
 
41
 
 
42
Nova is hosted on launchpad.  You can get the code with the following command
 
43
 
 
44
::
 
45
 
 
46
    bzr clone lp:nova
 
47
 
 
48
The `contrib/nova.sh` file in the source distribution is a script that
 
49
will quickly set up nova to run on a single machine.  It is tested against
 
50
Ubuntu only, but other distributions are forthcoming.
 
51
 
 
52
Environment Variables
 
53
---------------------
 
54
 
 
55
By tweaking the environment that nova.sh run in, you can build slightly
 
56
different configurations (though for more complex setups you should see
 
57
:doc:`/adminguide/getting.started` and :doc:`/adminguide/multi.node.install`).
 
58
 
 
59
* HOST_IP
 
60
    * Default: address of first interface from the ifconfig command
 
61
    * Values: 127.0.0.1, or any other valid address
 
62
 
 
63
TEST
 
64
~~~~
 
65
 
 
66
**Default**: 0
 
67
**Values**: 1, run tests after checkout and initial setup
 
68
 
 
69
USE_MYSQL
 
70
~~~~~~~~~
 
71
 
 
72
**Default**: 0, use sqlite3
 
73
**Values**: 1, use mysql instead of sqlite3
 
74
 
 
75
MYSQL_PASS
 
76
~~~~~~~~~~
 
77
 
 
78
Only useful if $USE_MYSQL=1.
 
79
 
 
80
**Default**: nova
 
81
**Values**: value of root password for mysql
 
82
 
 
83
USE_LDAP
 
84
~~~~~~~~
 
85
 
 
86
**Default**: 0, use :mod:`nova.auth.dbdriver`
 
87
**Values**: 1, use :mod:`nova.auth.ldapdriver`
 
88
 
 
89
LIBVIRT_TYPE
 
90
~~~~~~~~~~~~
 
91
 
 
92
**Default**: qemu
 
93
**Values**: uml, kvm
 
94
 
 
95
Usage
 
96
-----
 
97
 
 
98
Unless you want to spend a lot of time fiddling with permissions and sudoers,
 
99
you should probably run nova as root.
 
100
 
 
101
::
 
102
 
 
103
    sudo -i
 
104
 
 
105
If you are concerned about security, nova runs just fine inside a virtual
 
106
machine.
 
107
 
 
108
Use the script to install and run the current trunk. You can also specify a
 
109
specific branch by putting `lp:~someone/nova/some-branch` after the branch
 
110
command
 
111
 
 
112
::
 
113
 
 
114
    ./nova.sh branch
 
115
    ./nova.sh install
 
116
    ./nova.sh run
 
117
 
 
118
The run command will drop you into a screen session with all of the workers
 
119
running in different windows  You can use eucatools to run commands against the
 
120
cloud.
 
121
 
 
122
::
 
123
 
 
124
    euca-add-keypair test > test.pem
 
125
    euca-run-instances -k test -t m1.tiny ami-tiny
 
126
    euca-describe-instances
 
127
 
 
128
To see output from the various workers, switch screen windows
 
129
 
 
130
::
 
131
 
 
132
    <ctrl-a> "
 
133
 
 
134
will give you a list of running windows.
 
135
 
 
136
When the instance is running, you should be able to ssh to it.
 
137
 
 
138
::
 
139
 
 
140
    chmod 600 test.pem
 
141
    ssh -i test.pem root@10.0.0.3
 
142
 
 
143
When you exit screen
 
144
 
 
145
::
 
146
 
 
147
    <ctrl-a> <ctrl-d>
 
148
 
 
149
nova will terminate.  It may take a while for nova to finish cleaning up.  If
 
150
you exit the process before it is done because there were some problems in your
 
151
build, you may have to clean up the nova processes manually.  If you had any
 
152
instances running, you can attempt to kill them through the api:
 
153
 
 
154
::
 
155
 
 
156
    ./nova.sh terminate
 
157
 
 
158
Then you can destroy the screen:
 
159
 
 
160
::
 
161
 
 
162
    ./nova.sh clean
 
163
 
 
164
If things get particularly messed up, you might need to do some more intense
 
165
cleanup.  Be careful, the following command will manually destroy all runnning
 
166
virsh instances and attempt to delete all vlans and bridges.
 
167
 
 
168
:: 
 
169
 
 
170
        ./nova.sh scrub
 
171
 
 
172
You can edit files in the install directory or do a bzr pull to pick up new versions. You only need to do
 
173
 
 
174
::
 
175
 
 
176
        ./nova.sh run
 
177
 
 
178
to run nova after the first install. The database should be cleaned up on each run.
 
 
b'\\ No newline at end of file'