diff options
| author | Ryan Lane <rlane@wikimedia.org> | 2011-01-24 19:05:31 +0000 |
|---|---|---|
| committer | Ryan Lane <rlane@wikimedia.org> | 2011-01-24 19:05:31 +0000 |
| commit | 2e6a5713d86b487c0b26a72b111531781745aeb2 (patch) | |
| tree | 8841c85c25808bfc60a866fa6bd869d222949467 /doc/source | |
| parent | 6cc743de02ee3993b3301bfe34c645ba63881e38 (diff) | |
| parent | 671557507ae65ff5521e32f0d6cf2342e3a5af55 (diff) | |
| download | nova-2e6a5713d86b487c0b26a72b111531781745aeb2.tar.gz nova-2e6a5713d86b487c0b26a72b111531781745aeb2.tar.xz nova-2e6a5713d86b487c0b26a72b111531781745aeb2.zip | |
Merge from trunk.
Diffstat (limited to 'doc/source')
| -rw-r--r-- | doc/source/adminguide/distros/ubuntu.10.04.rst | 2 | ||||
| -rw-r--r-- | doc/source/adminguide/index.rst | 3 | ||||
| -rw-r--r-- | doc/source/adminguide/multi.node.install.rst | 149 | ||||
| -rw-r--r-- | doc/source/adminguide/single.node.install.rst | 2 | ||||
| -rw-r--r-- | doc/source/index.rst | 4 |
5 files changed, 98 insertions, 62 deletions
diff --git a/doc/source/adminguide/distros/ubuntu.10.04.rst b/doc/source/adminguide/distros/ubuntu.10.04.rst index 9d856458a..bd0693c46 100644 --- a/doc/source/adminguide/distros/ubuntu.10.04.rst +++ b/doc/source/adminguide/distros/ubuntu.10.04.rst @@ -31,7 +31,7 @@ If you're running on Ubuntu 10.04, you'll need to install Twisted and python-gfl :: - sudo add-get install python-software-properties + sudo apt-get install python-software-properties sudo add-apt-repository ppa:nova-core/trunk sudo apt-get update sudo apt-get install python-twisted python-gflags diff --git a/doc/source/adminguide/index.rst b/doc/source/adminguide/index.rst index e653c9e8b..3bd72cfdc 100644 --- a/doc/source/adminguide/index.rst +++ b/doc/source/adminguide/index.rst @@ -60,12 +60,13 @@ For background on the core objects referenced in this section, see :doc:`../obje Deployment ---------- -.. todo:: talk about deployment scenarios +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). .. toctree:: :maxdepth: 1 multi.node.install + dbsync Networking diff --git a/doc/source/adminguide/multi.node.install.rst b/doc/source/adminguide/multi.node.install.rst index 5918b0d38..df7078180 100644 --- a/doc/source/adminguide/multi.node.install.rst +++ b/doc/source/adminguide/multi.node.install.rst @@ -1,20 +1,3 @@ -.. - Copyright 2010-2011 United States Government as represented by the - Administrator of the National Aeronautics and Space Administration. - - All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); you may - not use this file except in compliance with the License. You may obtain - a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations - under the License. Installing Nova on Multiple Servers =================================== @@ -26,13 +9,14 @@ through that process. You can install multiple nodes to increase performance and availability of the OpenStack Compute installation. -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. - - +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. + +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. + Requirements for a multi-node installation ------------------------------------------ -* 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. +* 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. * 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. * For performance optimization, split reads and writes to the database. MySQL proxy is the easiest way to make this work if running MySQL. @@ -41,7 +25,45 @@ Assumptions * Networking is configured between/through the physical machines on a single subnet. * Installation and execution are both performed by ROOT user. - + +Scripted Installation +--------------------- +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. + +You must run these scripts with root permissions. + +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/. + +:: + + wget --no-check-certificate https://github.com/dubsquared/OpenStack-NOVA-Installer-Script/raw/master/Nova_CC_Installer_v0.1 + +Ensure you can execute the script by modifying the permissions on the script file. + +:: + + sudo chmod 755 Nova_CC_Installer_v0.1 + + +:: + + sudo ./Nova_CC_Installer_v0.1 + +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. + +Restart related services:: + + libvirtd restart; service nova-network restart; service nova-compute restart; service nova-api restart; service nova-objectstore restart; service nova-scheduler restart + +You can go to the `Configuration section`_ for next steps. + +Manual Installation - Step-by-Step +---------------------------------- +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. + +Cloud Controller Installation +````````````````````````````` +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`_. Step 1 - Use apt-get to get the latest code ------------------------------------------- @@ -59,19 +81,18 @@ Step 1 - Use apt-get to get the latest code sudo apt-get update -3. Install nova-pkgs (dependencies should be automatically installed). +3. Install python required packages, nova-packages, and helper apps. :: - sudo apt-get install python-greenlet - sudo apt-get install nova-common nova-doc python-nova nova-api nova-network nova-objectstore nova-scheduler + 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 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! -Step 2 Setup configuration file (installed in /etc/nova) --------------------------------------------------------- +Step 2 Set up configuration file (installed in /etc/nova) +--------------------------------------------------------- -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: +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: :: @@ -81,7 +102,7 @@ Step 2 Setup configuration file (installed in /etc/nova) --logdir=/var/log/nova --state_path=/var/lib/nova -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: +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: --sql_connection ### Location of Nova SQL DB @@ -130,7 +151,7 @@ Detailed explanation of the following example is available above. 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. :: chown -R root:nova /etc/nova - chmod 644 /etc/nova/nova.conf + chmod 644 /etc/nova/nova.conf Step 3 - Setup the SQL DB (MySQL for this setup) ------------------------------------------------ @@ -153,10 +174,30 @@ Step 3 - Setup the SQL DB (MySQL for this setup) sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf service mysql restart + +4. MySQL DB configuration: + +Create NOVA database:: + + mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE nova;' + +Update the DB to include user 'root'@'%' with super user privileges:: + + mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;" + +Set mySQL root password:: + + mysql -uroot -p$MYSQL_PASS -e "SET PASSWORD FOR 'root'@'%' = PASSWORD('$MYSQL_PASS');" + +Compute Node Installation +````````````````````````` -3. Network Configuration +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. -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. +Network Configuration +--------------------- + +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. 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:: @@ -179,31 +220,24 @@ Next, restart networking to apply the changes:: sudo /etc/init.d/networking restart -4. MySQL DB configuration: - -Create NOVA database:: - - mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE nova;' - -Update the DB to include user 'root'@'%' with super user privileges:: +Configuration +````````````` - mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;" - -Set mySQL root password:: +On the Compute node, you should continue with these configuration steps. - mysql -uroot -p$MYSQL_PASS -e "SET PASSWORD FOR 'root'@'%' = PASSWORD('$MYSQL_PASS');" - -Step 4 - Setup Nova environment -------------------------------- +Step 1 - Set up the Nova environment +------------------------------------ -These are the commands you run to set up a user and project:: +These are the commands you run to update the database if needed, and then set up a user and project:: + /usr/bin/python /usr/bin/nova-manage db sync /usr/bin/python /usr/bin/nova-manage user admin <user_name> /usr/bin/python /usr/bin/nova-manage project create <project_name> <user_name> /usr/bin/python /usr/bin/nova-manage network create <project-network> <number-of-networks-in-project> <IPs in project> Here is an example of what this looks like with real data:: + /usr/bin/python /usr/bin/nova-manage db sync /usr/bin/python /usr/bin/nova-manage user admin dub /usr/bin/python /usr/bin/nova-manage project create dubproject dub /usr/bin/python /usr/bin/nova-manage network create 192.168.0.0/24 1 255 @@ -215,7 +249,7 @@ Note: The nova-manage service assumes that the first IP address is your network 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. -Step 5 - Create Nova certifications +Step 2 - Create Nova certifications ----------------------------------- 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. @@ -229,18 +263,18 @@ Step 5 - Create Nova certifications :: - unzip /root/creds/novacreds.zip -d /root/creds/ + unzip /root/creds/novacreds.zip -d /root/creds/ cat /root/creds/novarc >> ~/.bashrc source ~/.bashrc -Step 6 - Restart all relevant services +Step 3 - Restart all relevant services -------------------------------------- Restart all six services in total, just to cover the entire spectrum:: libvirtd restart; service nova-network restart; service nova-compute restart; service nova-api restart; service nova-objectstore restart; service nova-scheduler restart -Step 7 - Closing steps, and cleaning up +Step 4 - Closing steps, and cleaning up --------------------------------------- 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:: @@ -253,8 +287,8 @@ Another common issue is you cannot ping or SSH your instances after issusing the killall dnsmasq service nova-network restart -Step 8 – Testing the installation ---------------------------------- +Testing the Installation +```````````````````````` You can then use `euca2ools` to test some items:: @@ -267,13 +301,15 @@ If you have issues with the API key, you may need to re-source your creds file:: If you don’t get any immediate errors, you’re successfully making calls to your cloud! -Step 9 - Spinning up a VM for testing -------------------------------------- +Spinning up a VM for Testing +```````````````````````````` (This excerpt is from Thierry Carrez's blog, with reference to http://wiki.openstack.org/GettingImages.) 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. +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/>`_. + Download the image, and publish to your bucket: :: @@ -324,5 +360,4 @@ You can determine the instance-id with `euca-describe-instances`, and the format For more information in creating you own custom (production ready) instance images, please visit http://wiki.openstack.org/GettingImages for more information! -Enjoy your new private cloud, and play responsibly! - +Enjoy your new private cloud, and play responsibly!
\ No newline at end of file diff --git a/doc/source/adminguide/single.node.install.rst b/doc/source/adminguide/single.node.install.rst index 8572c5a4a..119e3855b 100644 --- a/doc/source/adminguide/single.node.install.rst +++ b/doc/source/adminguide/single.node.install.rst @@ -159,7 +159,7 @@ To make things easier, we've provided a small image on the Rackspace CDN. Use th Resolving cblah2.cdn.cloudfiles.rackspacecloud.com... 208.111.196.6, 208.111.196.7 Connecting to cblah2.cdn.cloudfiles.rackspacecloud.com|208.111.196.6|:80... connected. HTTP request sent, awaiting response... 200 OK - Length: 58520278 (56M) [appication/x-gzip] + Length: 58520278 (56M) [application/x-gzip] Saving to: `images.tgz' 100%[======================================>] 58,520,278 14.1M/s in 3.9s diff --git a/doc/source/index.rst b/doc/source/index.rst index 6eec09acb..d337fb69f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -20,7 +20,7 @@ Welcome to Nova's documentation! Nova is a cloud computing fabric controller, the main part of an IaaS system. Individuals and organizations can use Nova to host and manage their own cloud -computing systems. Nova originated as a project out of NASA Ames Research Laboratory. +computing systems. Nova originated as a project out of NASA Ames Research Laboratory. Nova is written with the following design guidelines in mind: @@ -32,7 +32,7 @@ Nova is written with the following design guidelines in mind: * **API Compatibility**: Nova strives to provide API-compatible with popular systems like Amazon EC2 This documentation is generated by the Sphinx toolkit and lives in the source -tree. Additional documentation on Nova and other components of OpenStack can +tree. Additional documentation on Nova and other components of OpenStack can be found on the `OpenStack wiki`_. Also see the :doc:`community` page for other ways to interact with the community. |
