Merge lp:~annegentle/nova/docs into lp:~hudson-openstack/nova/trunk

Proposed by Anne Gentle
Status: Merged
Approved by: Jay Pipes
Approved revision: 593
Merged at revision: 599
Proposed branch: lp:~annegentle/nova/docs
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 346 lines (+104/-68)
5 files modified
doc/source/adminguide/distros/ubuntu.10.04.rst (+1/-1)
doc/source/adminguide/index.rst (+2/-1)
doc/source/adminguide/multi.node.install.rst (+98/-63)
doc/source/adminguide/single.node.install.rst (+1/-1)
doc/source/index.rst (+2/-2)
To merge this branch: bzr merge lp:~annegentle/nova/docs
Reviewer Review Type Date Requested Status
Jay Pipes (community) Approve
Review via email: mp+46980@code.launchpad.net

Description of the change

Updated docs for db sync requirements; merged with Vish's similar doc updates

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi!

Need two newlines (you have one newline) after sys.exit(1) here to avoid pep8 fault:

21 + exit(1)

Other than that, looks good :)

-jay

review: Needs Fixing
Revision history for this message
Jay Pipes (jaypipes) wrote :

Also, unless I'm mistaken, exit(1) should be sys.exit(1), and please ensure that you have done:

import sys

in that file :)

-jay

Revision history for this message
Anne Gentle (annegentle) wrote :

Thanks for reviewing, Jay - though I think maybe I should exclude any changes to bin/nova-manage that I got from merging from here:

https://code.launchpad.net/~vishvananda/nova/friendly-db/+merge/46797

Eric Day thought there was a better approach so I don't want code changes, I just want this proposal to be for doc changes... hm. So, how do I remove bin/nova-manage? Just replace the file with the one from trunk, commit, push to this branch?

Revision history for this message
Jay Pipes (jaypipes) wrote :

Ah, I see.

OK, do this then on your laptop:

# I assume below your local branch of trunk is called "trunk"...
bzr branch trunk new-docs
cd new-docs
bzr merge -r revno:593:../docs

That should do the trick I think :)

bzr diff | less

and check the diff only include the doc fixes, then if it all looks good:

bzr commit -m "Merge doc changes for db sync"
bzr push --overwrite lp:~annegentle/nova/docs

-jay

lp:~annegentle/nova/docs updated
593. By Anne Gentle

Merge doc changes affected by db sync

Revision history for this message
Anne Gentle (annegentle) wrote :

Thanks Jay! That did what I hoped - only the RST files are changed now. Please re-review when you get a mo.

Revision history for this message
Jay Pipes (jaypipes) wrote :

w00tness.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/source/adminguide/distros/ubuntu.10.04.rst'
2--- doc/source/adminguide/distros/ubuntu.10.04.rst 2011-01-03 09:08:32 +0000
3+++ doc/source/adminguide/distros/ubuntu.10.04.rst 2011-01-21 16:50:35 +0000
4@@ -31,7 +31,7 @@
5
6 ::
7
8- sudo add-get install python-software-properties
9+ sudo apt-get install python-software-properties
10 sudo add-apt-repository ppa:nova-core/trunk
11 sudo apt-get update
12 sudo apt-get install python-twisted python-gflags
13
14=== modified file 'doc/source/adminguide/index.rst'
15--- doc/source/adminguide/index.rst 2011-01-04 22:58:08 +0000
16+++ doc/source/adminguide/index.rst 2011-01-21 16:50:35 +0000
17@@ -60,12 +60,13 @@
18 Deployment
19 ----------
20
21-.. todo:: talk about deployment scenarios
22+For a starting multi-node architecture, you would start with two nodes - a cloud controller node and a compute node. The cloud controller node contains the nova- services plus the Nova database. The compute node installs all the nova-services but then refers to the database installation, which is hosted by the cloud controller node. Ensure that the nova.conf file is identical on each node. If you find performance issues not related to database reads or writes, but due to the messaging queue backing up, you could add additional messaging services (rabbitmq).
23
24 .. toctree::
25 :maxdepth: 1
26
27 multi.node.install
28+ dbsync
29
30
31 Networking
32
33=== modified file 'doc/source/adminguide/multi.node.install.rst'
34--- doc/source/adminguide/multi.node.install.rst 2011-01-07 16:56:41 +0000
35+++ doc/source/adminguide/multi.node.install.rst 2011-01-21 16:50:35 +0000
36@@ -1,20 +1,3 @@
37-..
38- Copyright 2010-2011 United States Government as represented by the
39- Administrator of the National Aeronautics and Space Administration.
40-
41- All Rights Reserved.
42-
43- Licensed under the Apache License, Version 2.0 (the "License"); you may
44- not use this file except in compliance with the License. You may obtain
45- a copy of the License at
46-
47- http://www.apache.org/licenses/LICENSE-2.0
48-
49- Unless required by applicable law or agreed to in writing, software
50- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
51- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
52- License for the specific language governing permissions and limitations
53- under the License.
54
55 Installing Nova on Multiple Servers
56 ===================================
57@@ -26,13 +9,14 @@
58
59 You can install multiple nodes to increase performance and availability of the OpenStack Compute installation.
60
61-This setup is based on an Ubuntu Lucid 10.04 installation with the latest updates. Most of this works around issues that need to be resolved in the installation and configuration scripts as of October 18th 2010. It also needs to eventually be generalized, but the intent here is to get the multi-node configuration bootstrapped so folks can move forward.
62-
63-
64+This setup is based on an Ubuntu Lucid 10.04 installation with the latest updates. Most of this works around issues that need to be resolved either in packaging or bug-fixing. It also needs to eventually be generalized, but the intent here is to get the multi-node configuration bootstrapped so folks can move forward.
65+
66+For a starting architecture, these instructions describing installing a cloud controller node and a compute node. The cloud controller node contains the nova- services plus the database. The compute node installs all the nova-services but then refers to the database installation, which is hosted by the cloud controller node.
67+
68 Requirements for a multi-node installation
69 ------------------------------------------
70
71-* You need a real database, compatible with SQLAlchemy (mysql, postgresql) There's not a specific reason to choose one over another, it basically depends what you know. MySQL is easier to do High Availability (HA) with, but people may already know Postgres. We should document both configurations, though.
72+* You need a real database, compatible with SQLAlchemy (mysql, postgresql) There's not a specific reason to choose one over another, it basically depends what you know. MySQL is easier to do High Availability (HA) with, but people may already know PostgreSQL. We should document both configurations, though.
73 * For a recommended HA setup, consider a MySQL master/slave replication, with as many slaves as you like, and probably a heartbeat to kick one of the slaves into being a master if it dies.
74 * For performance optimization, split reads and writes to the database. MySQL proxy is the easiest way to make this work if running MySQL.
75
76@@ -41,7 +25,45 @@
77
78 * Networking is configured between/through the physical machines on a single subnet.
79 * Installation and execution are both performed by ROOT user.
80-
81+
82+Scripted Installation
83+---------------------
84+A script available to get your OpenStack cloud running quickly. You can copy the file to the server where you want to install OpenStack Compute services - typically you would install a compute node and a cloud controller node.
85+
86+You must run these scripts with root permissions.
87+
88+From a server you intend to use as a cloud controller node, use this command to get the cloud controller script. This script is a work-in-progress and the maintainer plans to keep it up, but it is offered "as-is." Feel free to collaborate on it in GitHub - https://github.com/dubsquared/OpenStack-NOVA-Installer-Script/.
89+
90+::
91+
92+ wget --no-check-certificate https://github.com/dubsquared/OpenStack-NOVA-Installer-Script/raw/master/Nova_CC_Installer_v0.1
93+
94+Ensure you can execute the script by modifying the permissions on the script file.
95+
96+::
97+
98+ sudo chmod 755 Nova_CC_Installer_v0.1
99+
100+
101+::
102+
103+ sudo ./Nova_CC_Installer_v0.1
104+
105+Next, from a server you intend to use as a compute node (doesn't contain the database), install the nova services. Copy the nova.conf from the cloud controller node to the compute node.
106+
107+Restart related services::
108+
109+ libvirtd restart; service nova-network restart; service nova-compute restart; service nova-api restart; service nova-objectstore restart; service nova-scheduler restart
110+
111+You can go to the `Configuration section`_ for next steps.
112+
113+Manual Installation - Step-by-Step
114+----------------------------------
115+The following sections show you how to install Nova manually with a cloud controller node and a separate compute node. The cloud controller node contains the database plus all nova- services, and the compute node runs nova- services only.
116+
117+Cloud Controller Installation
118+`````````````````````````````
119+On the cloud controller node, you install nova services and the related helper applications, and then configure with the nova.conf file. You will then copy the nova.conf file to the compute node, which you install as a second node in the `Compute Installation`_.
120
121 Step 1 - Use apt-get to get the latest code
122 -------------------------------------------
123@@ -59,19 +81,18 @@
124
125 sudo apt-get update
126
127-3. Install nova-pkgs (dependencies should be automatically installed).
128+3. Install python required packages, nova-packages, and helper apps.
129
130 ::
131
132- sudo apt-get install python-greenlet
133- sudo apt-get install nova-common nova-doc python-nova nova-api nova-network nova-objectstore nova-scheduler
134+ sudo apt-get install python-greenlet python-mysqldb python-nova nova-common nova-doc nova-api nova-network nova-objectstore nova-scheduler nova-compute euca2ools unzip
135
136 It is highly likely that there will be errors when the nova services come up since they are not yet configured. Don't worry, you're only at step 1!
137
138-Step 2 Setup configuration file (installed in /etc/nova)
139---------------------------------------------------------
140+Step 2 Set up configuration file (installed in /etc/nova)
141+---------------------------------------------------------
142
143-1. Nova development has consolidated all config files to nova.conf as of November 2010. There is a default set of options that are already configured in nova.conf:
144+1. Nova development has consolidated all config files to nova.conf as of November 2010. There is a default set of options that are already configured in nova.conf:
145
146 ::
147
148@@ -81,7 +102,7 @@
149 --logdir=/var/log/nova
150 --state_path=/var/lib/nova
151
152-The following items ALSO need to be defined in /etc/nova/nova.conf. I’ve added some explanation of the variables, as comments CANNOT be in nova.conf. There seems to be an issue with nova-manage not processing the comments/whitespace correctly:
153+The following items ALSO need to be defined in /etc/nova/nova.conf. I’ve added some explanation of the variables, as comments CANNOT be in nova.conf. There seems to be an issue with nova-manage not processing the comments/whitespace correctly:
154
155 --sql_connection ### Location of Nova SQL DB
156
157@@ -130,7 +151,7 @@
158 The Nova config file should have its owner set to root:nova, and mode set to 0644, since they contain your MySQL server's root password. ::
159
160 chown -R root:nova /etc/nova
161- chmod 644 /etc/nova/nova.conf
162+ chmod 644 /etc/nova/nova.conf
163
164 Step 3 - Setup the SQL DB (MySQL for this setup)
165 ------------------------------------------------
166@@ -153,10 +174,30 @@
167
168 sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
169 service mysql restart
170-
171-3. Network Configuration
172-
173-If you use FlatManager (as opposed to VlanManager that we set) as your network manager, there are some additional networking changes you’ll have to make to ensure connectivity between your nodes and VMs. If you chose VlanManager or FlatDHCP, you may skip this section, as it’s set up for you automatically.
174+
175+4. MySQL DB configuration:
176+
177+Create NOVA database::
178+
179+ mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
180+
181+Update the DB to include user 'root'@'%' with super user privileges::
182+
183+ mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;"
184+
185+Set mySQL root password::
186+
187+ mysql -uroot -p$MYSQL_PASS -e "SET PASSWORD FOR 'root'@'%' = PASSWORD('$MYSQL_PASS');"
188+
189+Compute Node Installation
190+`````````````````````````
191+
192+Repeat steps 1 and 2 from the Cloud Controller Installation section above, then configure the network for your Compute instances on the Compute node. Copy the nova.conf file from the Cloud Controller node to this node.
193+
194+Network Configuration
195+---------------------
196+
197+If you use FlatManager as your network manager (as opposed to VlanManager that is shown in the nova.conf example above), there are some additional networking changes you’ll have to make to ensure connectivity between your nodes and VMs. If you chose VlanManager or FlatDHCP, you may skip this section, as it’s set up for you automatically.
198
199 Nova defaults to a bridge device named 'br100'. This needs to be created and somehow integrated into YOUR network. To keep things as simple as possible, have all the VM guests on the same network as the VM hosts (the compute nodes). To do so, set the compute node's external IP address to be on the bridge and add eth0 to that bridge. To do this, edit your network interfaces config to look like the following::
200
201@@ -179,31 +220,24 @@
202
203 sudo /etc/init.d/networking restart
204
205-4. MySQL DB configuration:
206-
207-Create NOVA database::
208-
209- mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
210-
211-Update the DB to include user 'root'@'%' with super user privileges::
212-
213- mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;"
214-
215-Set mySQL root password::
216-
217- mysql -uroot -p$MYSQL_PASS -e "SET PASSWORD FOR 'root'@'%' = PASSWORD('$MYSQL_PASS');"
218-
219-Step 4 - Setup Nova environment
220--------------------------------
221-
222-These are the commands you run to set up a user and project::
223-
224+Configuration
225+`````````````
226+
227+On the Compute node, you should continue with these configuration steps.
228+
229+Step 1 - Set up the Nova environment
230+------------------------------------
231+
232+These are the commands you run to update the database if needed, and then set up a user and project::
233+
234+ /usr/bin/python /usr/bin/nova-manage db sync
235 /usr/bin/python /usr/bin/nova-manage user admin <user_name>
236 /usr/bin/python /usr/bin/nova-manage project create <project_name> <user_name>
237 /usr/bin/python /usr/bin/nova-manage network create <project-network> <number-of-networks-in-project> <IPs in project>
238
239 Here is an example of what this looks like with real data::
240
241+ /usr/bin/python /usr/bin/nova-manage db sync
242 /usr/bin/python /usr/bin/nova-manage user admin dub
243 /usr/bin/python /usr/bin/nova-manage project create dubproject dub
244 /usr/bin/python /usr/bin/nova-manage network create 192.168.0.0/24 1 255
245@@ -215,7 +249,7 @@
246 On running this command, entries are made in the 'networks' and 'fixed_ips' table. However, one of the networks listed in the 'networks' table needs to be marked as bridge in order for the code to know that a bridge exists. The Network is marked as bridged automatically based on the type of network manager selected. This is ONLY necessary if you chose FlatManager as your network type. More information can be found at the end of this document discussing setting up the bridge device.
247
248
249-Step 5 - Create Nova certifications
250+Step 2 - Create Nova certifications
251 -----------------------------------
252
253 1. Generate the certs as a zip file. These are the certs you will use to launch instances, bundle images, and all the other assorted api functions.
254@@ -229,18 +263,18 @@
255
256 ::
257
258- unzip /root/creds/novacreds.zip -d /root/creds/
259+ unzip /root/creds/novacreds.zip -d /root/creds/
260 cat /root/creds/novarc >> ~/.bashrc
261 source ~/.bashrc
262
263-Step 6 - Restart all relevant services
264+Step 3 - Restart all relevant services
265 --------------------------------------
266
267 Restart all six services in total, just to cover the entire spectrum::
268
269 libvirtd restart; service nova-network restart; service nova-compute restart; service nova-api restart; service nova-objectstore restart; service nova-scheduler restart
270
271-Step 7 - Closing steps, and cleaning up
272+Step 4 - Closing steps, and cleaning up
273 ---------------------------------------
274
275 One of the most commonly missed configuration areas is not allowing the proper access to VMs. Use the 'euca-authorize' command to enable access. Below, you will find the commands to allow 'ping' and 'ssh' to your VMs::
276@@ -253,8 +287,8 @@
277 killall dnsmasq
278 service nova-network restart
279
280-Step 8 – Testing the installation
281----------------------------------
282+Testing the Installation
283+````````````````````````
284
285 You can then use `euca2ools` to test some items::
286
287@@ -267,13 +301,15 @@
288
289 If you don’t get any immediate errors, you’re successfully making calls to your cloud!
290
291-Step 9 - Spinning up a VM for testing
292--------------------------------------
293+Spinning up a VM for Testing
294+````````````````````````````
295
296 (This excerpt is from Thierry Carrez's blog, with reference to http://wiki.openstack.org/GettingImages.)
297
298 The image that you will use here will be a ttylinux image, so this is a limited function server. You will be able to ping and SSH to this instance, but it is in no way a full production VM.
299
300+UPDATE: Due to `bug 661159 <https://bugs.launchpad.net/nova/+bug/661159>`_, we can’t use images without ramdisks yet, so we can’t use the classic Ubuntu cloud images from http://uec-images.ubuntu.com/releases/ yet. For the sake of this tutorial, we’ll use the `ttylinux images from Scott Moser instead <http://smoser.brickies.net/ubuntu/ttylinux-uec/>`_.
301+
302 Download the image, and publish to your bucket:
303
304 ::
305@@ -324,5 +360,4 @@
306
307 For more information in creating you own custom (production ready) instance images, please visit http://wiki.openstack.org/GettingImages for more information!
308
309-Enjoy your new private cloud, and play responsibly!
310-
311+Enjoy your new private cloud, and play responsibly!
312\ No newline at end of file
313
314=== modified file 'doc/source/adminguide/single.node.install.rst'
315--- doc/source/adminguide/single.node.install.rst 2010-12-07 22:48:42 +0000
316+++ doc/source/adminguide/single.node.install.rst 2011-01-21 16:50:35 +0000
317@@ -159,7 +159,7 @@
318 Resolving cblah2.cdn.cloudfiles.rackspacecloud.com... 208.111.196.6, 208.111.196.7
319 Connecting to cblah2.cdn.cloudfiles.rackspacecloud.com|208.111.196.6|:80... connected.
320 HTTP request sent, awaiting response... 200 OK
321- Length: 58520278 (56M) [appication/x-gzip]
322+ Length: 58520278 (56M) [application/x-gzip]
323 Saving to: `images.tgz'
324
325 100%[======================================>] 58,520,278 14.1M/s in 3.9s
326
327=== modified file 'doc/source/index.rst'
328--- doc/source/index.rst 2011-01-04 22:58:08 +0000
329+++ doc/source/index.rst 2011-01-21 16:50:35 +0000
330@@ -20,7 +20,7 @@
331
332 Nova is a cloud computing fabric controller, the main part of an IaaS system.
333 Individuals and organizations can use Nova to host and manage their own cloud
334-computing systems. Nova originated as a project out of NASA Ames Research Laboratory.
335+computing systems. Nova originated as a project out of NASA Ames Research Laboratory.
336
337 Nova is written with the following design guidelines in mind:
338
339@@ -32,7 +32,7 @@
340 * **API Compatibility**: Nova strives to provide API-compatible with popular systems like Amazon EC2
341
342 This documentation is generated by the Sphinx toolkit and lives in the source
343-tree. Additional documentation on Nova and other components of OpenStack can
344+tree. Additional documentation on Nova and other components of OpenStack can
345 be found on the `OpenStack wiki`_. Also see the :doc:`community` page for
346 other ways to interact with the community.
347