2
Copyright 2010 United States Government as represented by the
3
Administrator of the National Aeronautics and Space Administration.
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
10
http://www.apache.org/licenses/LICENSE-2.0
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
18
Getting Started with Nova
19
=========================
22
GOTTA HAVE A nova.pth file added or it WONT WORK (will write setup.py file soon)
24
Create a file named nova.pth in your python libraries directory
25
(usually /usr/local/lib/python2.6/dist-packages) with a single line that points
26
to the directory where you checked out the source (that contains the nova/
32
Related servers we rely on
34
* RabbitMQ: messaging queue, used for all communication between components
35
* OpenLDAP: users, groups (maybe cut)
36
* ReDIS: Remote Dictionary Store (for fast, shared state data)
37
* nginx: HTTP server to handle serving large files (because Tornado can't)
39
Python libraries we don't vendor
41
* M2Crypto: python library interface for openssl
43
* XenAPI: Needed only for Xen Cloud Platform or XenServer support. Available from http://wiki.xensource.com/xenwiki/XCP_SDK or http://community.citrix.com/cdn/xs/sdks.
45
Vendored python libaries (don't require any installation)
47
* Tornado: scalable non blocking web server for api requests
48
* Twisted: just for the twisted.internet.defer package
49
* boto: python api for aws api
50
* IPy: library for managing ip addresses
55
* euca2ools: python implementation of aws ec2-tools and ami tools
56
* build tornado to use C module for evented section
63
# system libraries and tools
64
apt-get install -y aoetools vlan curl
68
apt-get install -y python-setuptools python-dev python-pycurl python-m2crypto
70
# ON THE CLOUD CONTROLLER
71
apt-get install -y rabbitmq-server dnsmasq nginx
72
# build redis from 2.0.0-rc1 source
73
# setup ldap (slap.sh as root will remove ldap and reinstall it)
74
NOVA_PATH/nova/auth/slap.sh
75
/etc/init.d/rabbitmq-server start
78
apt-get install -y vblade-persist
80
# ON THE COMPUTE NODE:
81
apt-get install -y python-libvirt
82
apt-get install -y kpartx kvm libvirt-bin
86
apt-get install -y euca2ools
93
* Add yourself to the libvirtd group, log out, and log back in
94
* fix hardcoded ec2 metadata/userdata uri ($IP is the IP of the cloud), and masqurade all traffic from launched instances
97
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -d 169.254.169.254/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination $IP:8773
98
iptables --table nat --append POSTROUTING --out-interface $PUBLICIFACE -j MASQUERADE
101
* Configure NginX proxy (/etc/nginx/sites-enabled/default)
107
server-name localhost;
108
client_max_body_size 10m;
110
access_log /var/log/nginx/localhost.access.log;
112
location ~ /_images/.+ {
113
root NOVA_PATH/images;
114
rewrite ^/_images/(.*)$ /$1 break;
118
proxy_pass http://localhost:3334/;
124
* create a filesystem (you can use an actual disk if you have one spare, default is /dev/sdb)
128
# This creates a 1GB file to create volumes out of
129
dd if=/dev/zero of=MY_FILE_PATH bs=100M count=10
130
losetup --show -f MY_FILE_PATH
131
# replace loop0 below with whatever losetup returns
132
echo "--storage_dev=/dev/loop0" >> NOVA_PATH/bin/nova.conf
144
Launch nova components