Browse code

update docs

Jesse Andrews authored on 2011/09/14 05:17:22
Showing 1 changed files
... ...
@@ -124,18 +124,13 @@ sudo usermod -a -G libvirtd `whoami`
124 124
 # if kvm wasn't running before we need to restart libvirt to enable it
125 125
 sudo /etc/init.d/libvirt-bin restart
126 126
 
127
-# FIXME(ja): should LIBVIRT_TYPE be kvm if kvm module is loaded?
127
+## FIXME(ja): should LIBVIRT_TYPE be kvm if kvm module is loaded?
128 128
 
129
-# setup nova instance directory
130
-mkdir -p $NOVA_DIR/instances
129
+# add useful screenrc
130
+cp $DIR/files/screenrc ~/.screenrc
131
+
132
+# TODO: update current user to allow sudo for all commands in files/sudo/*
131 133
 
132
-# if there is a partition labeled nova-instances use it (ext filesystems
133
-# can be labeled via e2label)
134
-# FIXME: if already mounted this blows up...
135
-if [ -L /dev/disk/by-label/nova-instances ]; then
136
-    sudo mount -L nova-instances $NOVA_DIR/instances
137
-    sudo chown -R `whoami` $NOVA_DIR/instances
138
-fi
139 134
 
140 135
 # Dashboard
141 136
 # ---------
... ...
@@ -153,36 +148,37 @@ cd $DASH_DIR/openstack-dashboard
153 153
 cp local/local_settings.py.example local/local_settings.py
154 154
 dashboard/manage.py syncdb
155 155
 
156
-# setup apache
157
-# create an empty directory to use as our 
156
+# create an empty directory that apache uses as docroot
158 157
 mkdir $DASH_DIR/.blackhole
159 158
 
160
-# FIXME(ja): can't figure out how to make $DASH_DIR work in sed, also install to available/a2e it 
159
+## FIXME(ja): can't figure out how to make $DASH_DIR work in sed, also install to available/a2e it 
161 160
 cat $DIR/files/000-default.template | sed 's/%DASH_DIR%/\/opt\/dash/g' > /tmp/000-default
162 161
 sudo mv /tmp/000-default /etc/apache2/sites-enabled
163 162
 
164
-# ``python setup.py develop`` left some files owned by root in $DASH_DIR and
163
+# ``python setup.py develop`` left some files owned by root in ``DASH_DIR`` and
165 164
 # others by the original owner.  We need to change the owner to apache so
166 165
 # dashboard can run
167 166
 sudo chown -R www-data:www-data $DASH_DIR
168 167
 
168
+
169 169
 # Glance
170 170
 # ------
171 171
 
172
+# Glance uses ``/var/lib/glance`` and ``/var/log/glance`` by default, so
173
+# we need to insure that our user has permissions to use them.
172 174
 sudo mkdir -p /var/log/glance
173
-sudo chown `whoami` /var/log/glance 
175
+sudo chown -R `whoami` /var/log/glance 
176
+sudo mkdir -p /var/lib/glance
177
+sudo chown -R `whoami` /var/lib/glance
174 178
 
175
-# add useful screenrc
176
-cp $DIR/files/screenrc ~/.screenrc
179
+# Delete existing images/database as glance will recreate the db on startup
180
+rm -rf /var/lib/glance/images/*
181
+rm -f $GLANCE_DIR/glance.sqlite
177 182
 
178
-# TODO: update current user to allow sudo for all commands in files/sudo/*
179 183
 
180 184
 # Nova
181 185
 # ----
182 186
 
183
-NL=`echo -ne '\015'`
184
-
185
-
186 187
 function add_nova_flag {
187 188
     echo "$1" >> $NOVA_DIR/bin/nova.conf
188 189
 }
... ...
@@ -211,6 +207,17 @@ fi
211 211
 screen -d -m -S nova -t nova
212 212
 sleep 1
213 213
 
214
+# setup nova instance directory
215
+mkdir -p $NOVA_DIR/instances
216
+
217
+# if there is a partition labeled nova-instances use it (ext filesystems
218
+# can be labeled via e2label)
219
+## FIXME: if already mounted this blows up...
220
+if [ -L /dev/disk/by-label/nova-instances ]; then
221
+    sudo mount -L nova-instances $NOVA_DIR/instances
222
+    sudo chown -R `whoami` $NOVA_DIR/instances
223
+fi
224
+
214 225
 # Clean out the instances directory
215 226
 rm -rf $NOVA_DIR/instances/*
216 227
 
... ...
@@ -239,21 +246,17 @@ $NOVA_DIR/bin/nova-manage network create private $FIXED_RANGE 1 32
239 239
 # create some floating ips
240 240
 $NOVA_DIR/bin/nova-manage floating create $FLOATING_RANGE
241 241
 
242
-# delete existing glance images/database.  Glance will recreate the db
243
-# when it is ran.
244
-# FIXME: configure glance not to shove files in /var/lib/glance?
245
-sudo mkdir -p /var/lib/glance
246
-sudo chown -R `whoami` /var/lib/glance
247
-rm -rf /var/lib/glance/images/*
248
-rm -f $GLANCE_DIR/glance.sqlite
249 242
 
250 243
 # Launch Services
251 244
 # ===============
252 245
 
253 246
 # nova api crashes if we start it with a regular screen command,
254 247
 # so send the start command by forcing text into the window.
248
+# Only run the services specified in ``ENABLED_SERVICES``
249
+
250
+NL=`echo -ne '\015'`
251
+
255 252
 function screen_it {
256
-    # only run the services specified in $ENABLED_SERVICES
257 253
     if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then
258 254
         screen -S nova -X screen -t $1
259 255
         screen -S nova -p $1 -X stuff "$2$NL"