~0x44/nova/bug838466

« back to all changes in this revision

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

  • Committer: Brian Waldon
  • Date: 2011-07-29 16:54:55 UTC
  • mto: This revision was merged to the branch mainline in revision 1364.
  • Revision ID: brian.waldon@rackspace.com-20110729165455-4ebqwv8s5pkscmmg
one last change

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
 
Getting Started with Nova
19
 
=========================
20
 
 
21
 
 
22
 
GOTTA HAVE A nova.pth file added or it WONT WORK (will write setup.py file soon)
23
 
 
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/
27
 
directory).
28
 
 
29
 
DEPENDENCIES
30
 
------------
31
 
 
32
 
Related servers we rely on
33
 
 
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)
38
 
 
39
 
Python libraries we don't vendor
40
 
 
41
 
* M2Crypto: python library interface for openssl
42
 
* curl
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.
44
 
 
45
 
Vendored python libaries (don't require any installation)
46
 
 
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
51
 
 
52
 
Recommended
53
 
-----------------
54
 
 
55
 
* euca2ools: python implementation of aws ec2-tools and ami tools
56
 
* build tornado to use C module for evented section
57
 
 
58
 
 
59
 
Installation
60
 
--------------
61
 
::
62
 
 
63
 
    # system libraries and tools
64
 
    apt-get install -y aoetools vlan curl
65
 
    modprobe aoe
66
 
 
67
 
    # python libraries
68
 
    apt-get install -y python-setuptools python-dev python-pycurl python-m2crypto
69
 
 
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
76
 
 
77
 
    # ON VOLUME NODE:
78
 
    apt-get install -y vblade-persist
79
 
 
80
 
    # ON THE COMPUTE NODE:
81
 
    apt-get install -y python-libvirt
82
 
    apt-get install -y kpartx kvm libvirt-bin
83
 
    modprobe kvm
84
 
 
85
 
    # optional packages
86
 
    apt-get install -y euca2ools
87
 
 
88
 
Configuration
89
 
---------------
90
 
 
91
 
ON CLOUD CONTROLLER
92
 
 
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
95
 
::
96
 
 
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
99
 
 
100
 
 
101
 
* Configure NginX proxy (/etc/nginx/sites-enabled/default)
102
 
 
103
 
::
104
 
 
105
 
  server {
106
 
    listen 3333 default;
107
 
    server-name localhost;
108
 
    client_max_body_size 10m;
109
 
 
110
 
    access_log /var/log/nginx/localhost.access.log;
111
 
 
112
 
    location ~ /_images/.+ {
113
 
      root NOVA_PATH/images;
114
 
      rewrite ^/_images/(.*)$ /$1 break;
115
 
    }
116
 
 
117
 
    location / {
118
 
      proxy_pass http://localhost:3334/;
119
 
    }
120
 
  }
121
 
 
122
 
ON VOLUME NODE
123
 
 
124
 
* create a filesystem (you can use an actual disk if you have one spare, default is /dev/sdb)
125
 
 
126
 
::
127
 
 
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
133
 
 
134
 
Running
135
 
---------
136
 
 
137
 
Launch servers
138
 
 
139
 
* rabbitmq
140
 
* redis
141
 
* slapd
142
 
* nginx
143
 
 
144
 
Launch nova components
145
 
 
146
 
* nova-api
147
 
* nova-compute
148
 
* nova-objectstore
149
 
* nova-volume